[PATCH 1/8] xfstests: fix compile warning in doio.c

Dave Chinner david at fromorbit.com
Tue Jan 19 21:38:01 CST 2010


Use of sigblock is deprecated. Use sigprocmask instead.

Signed-off-by: Dave Chinner <david at fromorbit.com>
---
 ltp/doio.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/ltp/doio.c b/ltp/doio.c
index a1c92c9..0fe206d 100644
--- a/ltp/doio.c
+++ b/ltp/doio.c
@@ -350,7 +350,7 @@ char	**argv;
 {
 	int	    	    	i, pid, stat, ex_stat;
 	struct sigaction	sa;
-	int omask;
+	sigset_t		block_mask, old_mask;
 	umask(0);		/* force new file modes to known values */
 #if _CRAYMPP
 	Npes = sysconf(_SC_CRAY_NPES);	/* must do this before parse_cmdline */
@@ -434,7 +434,9 @@ char	**argv;
 		Children[i] = -1;
 	}
 
-	omask = sigblock(sigmask(SIGCLD));
+	sigemptyset(&block_mask);
+	sigaddset(&block_mask, SIGCHLD);
+	sigprocmask(SIG_BLOCK, &block_mask, &old_mask);
 
 	/*
 	 * Fork Nprocs.  This [parent] process is a watchdog, to notify the
-- 
1.6.5




More information about the xfs mailing list