[patch] fsck.minix.c, mkfs.minix.c: use bsd_signal()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



s/signal/bsd_signal/ to make it evident which  semantics
are expected.

helps klibc porting.

Signed-off-by: maximilian attems <max@xxxxxxx>

diff --git a/disk-utils/fsck.minix.c b/disk-utils/fsck.minix.c
index 5c577f6..f4385c6 100644
--- a/disk-utils/fsck.minix.c
+++ b/disk-utils/fsck.minix.c
@@ -195,7 +195,7 @@ fatalsig(int sig) {
 	 * so that the parent process knows which signal actually
 	 * caused our death.
 	 */
-	signal(sig, SIG_DFL);
+	bsd_signal(sig, SIG_DFL);
 	reset();
 	raise(sig);
 }
@@ -1347,9 +1347,9 @@ main(int argc, char ** argv) {
 	/* Restore the terminal state on fatal signals.
 	 * We don't do this for SIGALRM, SIGUSR1 or SIGUSR2.
 	 */
-	signal(SIGINT, fatalsig);
-	signal(SIGQUIT, fatalsig);
-	signal(SIGTERM, fatalsig);
+	bsd_signal(SIGINT, fatalsig);
+	bsd_signal(SIGQUIT, fatalsig);
+	bsd_signal(SIGTERM, fatalsig);
 
 	if (repair && !automatic) {
 		tcgetattr(0,&termios);
diff --git a/disk-utils/mkfs.minix.c b/disk-utils/mkfs.minix.c
index f97df27..dcc421c 100644
--- a/disk-utils/mkfs.minix.c
+++ b/disk-utils/mkfs.minix.c
@@ -490,7 +490,7 @@ static void
 alarm_intr(int alnum) {
 	if (currently_testing >= ZONES)
 		return;
-	signal(SIGALRM,alarm_intr);
+	bsd_signal(SIGALRM, alarm_intr);
 	alarm(5);
 	if (!currently_testing)
 		return;
@@ -504,7 +504,7 @@ check_blocks(void) {
 	static char buffer[BLOCK_SIZE * TEST_BUFFER_BLOCKS];
 
 	currently_testing=0;
-	signal(SIGALRM,alarm_intr);
+	bsd_signal(SIGALRM, alarm_intr);
 	alarm(5);
 	while (currently_testing < ZONES) {
 		if (lseek(DEV,currently_testing*BLOCK_SIZE,SEEK_SET) !=
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux