diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-12-01 20:29:52 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-12-01 20:29:52 +0000 |
commit | fbb32ad9b6a4b6cffea1c5b4292b18c72cdadaf6 (patch) | |
tree | 0e3c04e3e9141adb9f9d47329c6ff46d6e5a5335 | |
parent | 513720b73b403c3c9aca3f25c085422f4132c292 (diff) |
on Bernd's request, remove commented-out code snippets
-rw-r--r-- | libc/misc/syslog/syslog.c | 4 | ||||
-rw-r--r-- | libc/pwd_grp/lckpwdf.c | 1 | ||||
-rw-r--r-- | libc/signal/sigignore.c | 2 | ||||
-rw-r--r-- | libc/signal/sigset.c | 2 | ||||
-rw-r--r-- | libc/stdlib/abort.c | 1 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/ssp.c | 1 | ||||
-rw-r--r-- | libpthread/linuxthreads.old/pthread.c | 6 | ||||
-rw-r--r-- | libpthread/linuxthreads.old/signals.c | 2 | ||||
-rw-r--r-- | libpthread/linuxthreads/pthread.c | 8 |
9 files changed, 1 insertions, 26 deletions
diff --git a/libc/misc/syslog/syslog.c b/libc/misc/syslog/syslog.c index 32fcd1f2b..da60874b3 100644 --- a/libc/misc/syslog/syslog.c +++ b/libc/misc/syslog/syslog.c @@ -207,10 +207,6 @@ vsyslog(int pri, const char *fmt, va_list ap) memset(&action, 0, sizeof(action)); action.sa_handler = closelog_intern; - /* __sigemptyset(&action.sa_mask); - memset already did it */ - /* Only two errors are possible for sigaction: - * EFAULT (bad address of &oldaction) and EINVAL (invalid signo) - * none of which can happen here. */ sigaction(SIGPIPE, &action, &oldaction); saved_errno = errno; diff --git a/libc/pwd_grp/lckpwdf.c b/libc/pwd_grp/lckpwdf.c index ff98dcb76..9b0b604e0 100644 --- a/libc/pwd_grp/lckpwdf.c +++ b/libc/pwd_grp/lckpwdf.c @@ -111,7 +111,6 @@ lckpwdf (void) memset (&new_act, '\0', sizeof (struct sigaction)); new_act.sa_handler = noop_handler; __sigfillset (&new_act.sa_mask); - /* new_act.sa_flags = 0; */ /* Install new action handler for alarm and save old. */ if (sigaction (SIGALRM, &new_act, &saved_act) < 0) { diff --git a/libc/signal/sigignore.c b/libc/signal/sigignore.c index 9e658c6c6..f484e29fc 100644 --- a/libc/signal/sigignore.c +++ b/libc/signal/sigignore.c @@ -31,8 +31,6 @@ int sigignore (int sig) struct sigaction act; memset(&act, 0, sizeof(act)); - /*__sigemptyset (&act.sa_mask);*/ - /*act.sa_flags = 0;*/ act.sa_handler = SIG_IGN; return sigaction (sig, &act, NULL); diff --git a/libc/signal/sigset.c b/libc/signal/sigset.c index 3efbf3ea3..91f433661 100644 --- a/libc/signal/sigset.c +++ b/libc/signal/sigset.c @@ -55,8 +55,6 @@ __sighandler_t sigset (int sig, __sighandler_t disp) #endif /* SIG_HOLD */ memset(&act, 0, sizeof(act)); - //__sigemptyset (&act.sa_mask); - //act.sa_flags = 0; act.sa_handler = disp; if (sigaction (sig, &act, &oact) < 0) return SIG_ERR; diff --git a/libc/stdlib/abort.c b/libc/stdlib/abort.c index 901218f8d..9f0fe54b8 100644 --- a/libc/stdlib/abort.c +++ b/libc/stdlib/abort.c @@ -94,7 +94,6 @@ abort_it: if (SIG_DFL) /* if it's constant zero, already done */ act.sa_handler = SIG_DFL; __sigfillset(&act.sa_mask); - /*act.sa_flags = 0; - memset did it */ sigaction(SIGABRT, &act, NULL); goto abort_it; diff --git a/libc/sysdeps/linux/common/ssp.c b/libc/sysdeps/linux/common/ssp.c index 564e14d71..8a84e4893 100644 --- a/libc/sysdeps/linux/common/ssp.c +++ b/libc/sysdeps/linux/common/ssp.c @@ -58,7 +58,6 @@ static void block_signals(void) /* Make the default handler associated with the signal handler */ memset(&sa, 0, sizeof(sa)); __sigfillset(&sa.sa_mask); /* Block all signals */ - /* sa.sa_flags = 0; - memset did it */ if (SIG_DFL) /* if it's constant zero, it's already done */ sa.sa_handler = SIG_DFL; sigaction(SSP_SIGTYPE, &sa, NULL); diff --git a/libpthread/linuxthreads.old/pthread.c b/libpthread/linuxthreads.old/pthread.c index c13c63208..391527e62 100644 --- a/libpthread/linuxthreads.old/pthread.c +++ b/libpthread/linuxthreads.old/pthread.c @@ -473,17 +473,13 @@ static void pthread_initialize(void) will be inherited by all other threads. */ memset(&sa, 0, sizeof(sa)); sa.sa_handler = pthread_handle_sigrestart; - /* __sigemptyset(&sa.sa_mask); */ - /* sa.sa_flags = 0; */ __libc_sigaction(__pthread_sig_restart, &sa, NULL); sa.sa_handler = pthread_handle_sigcancel; sigaddset(&sa.sa_mask, __pthread_sig_restart); - /* sa.sa_flags = 0; */ __libc_sigaction(__pthread_sig_cancel, &sa, NULL); if (__pthread_sig_debug > 0) { sa.sa_handler = pthread_handle_sigdebug; __sigemptyset(&sa.sa_mask); - /* sa.sa_flags = 0; */ __libc_sigaction(__pthread_sig_debug, &sa, NULL); } /* Initially, block __pthread_sig_restart. Will be unblocked on demand. */ @@ -930,8 +926,6 @@ void __pthread_kill_other_threads_np(void) implementation uses since this would be passed to the new process. */ memset(&sa, 0, sizeof(sa)); - /*__sigemptyset(&sa.sa_mask);*/ - /*sa.sa_flags = 0;*/ if (SIG_DFL) /* if it's constant zero, it's already done */ sa.sa_handler = SIG_DFL; __libc_sigaction(__pthread_sig_restart, &sa, NULL); diff --git a/libpthread/linuxthreads.old/signals.c b/libpthread/linuxthreads.old/signals.c index 90655f8c1..2a451f3d2 100644 --- a/libpthread/linuxthreads.old/signals.c +++ b/libpthread/linuxthreads.old/signals.c @@ -209,8 +209,6 @@ int sigwait(const sigset_t * set, int * sig) sighandler[s].old == (arch_sighandler_t) SIG_IGN) { memset(&sa, 0, sizeof(sa)); sa.sa_handler = pthread_null_sighandler; - /* __sigemptyset(&sa.sa_mask); */ - /* sa.sa_flags = 0; */ sigaction(s, &sa, NULL); } } diff --git a/libpthread/linuxthreads/pthread.c b/libpthread/linuxthreads/pthread.c index 8cc9916cf..7f4f86b46 100644 --- a/libpthread/linuxthreads/pthread.c +++ b/libpthread/linuxthreads/pthread.c @@ -563,17 +563,13 @@ static void pthread_initialize(void) will be inherited by all other threads. */ memset(&sa, 0, sizeof(sa)); sa.sa_handler = pthread_handle_sigrestart; - /* __sigemptyset(&sa.sa_mask); */ - /* sa.sa_flags = 0; */ __libc_sigaction(__pthread_sig_restart, &sa, NULL); sa.sa_handler = pthread_handle_sigcancel; sigaddset(&sa.sa_mask, __pthread_sig_restart); - /* sa.sa_flags = 0; */ __libc_sigaction(__pthread_sig_cancel, &sa, NULL); if (__pthread_sig_debug > 0) { sa.sa_handler = pthread_handle_sigdebug; __sigemptyset(&sa.sa_mask); - /* sa.sa_flags = 0; */ __libc_sigaction(__pthread_sig_debug, &sa, NULL); } /* Initially, block __pthread_sig_restart. Will be unblocked on demand. */ @@ -1153,9 +1149,7 @@ void __pthread_kill_other_threads_np(void) implementation uses since this would be passed to the new process. */ memset(&sa, 0, sizeof(sa)); - /*__sigemptyset(&sa.sa_mask);*/ - /*sa.sa_flags = 0;*/ - if (SIG_DFL) /* if it's constant zero, it's already done too */ + if (SIG_DFL) /* if it's constant zero, it's already done */ sa.sa_handler = SIG_DFL; __libc_sigaction(__pthread_sig_restart, &sa, NULL); __libc_sigaction(__pthread_sig_cancel, &sa, NULL); |