Re: For review: timer_create.2

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

 



On Wed, Feb 11, 2009 at 9:34 PM, Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> wrote:
> On Tue, 2009-02-10 at 14:53 +1300, Michael Kerrisk wrote:
>>        static void
>>        handler(int sig, siginfo_t *si, void *uc)
>>        {
>>            /* Note: calling printf() from a signal handler is not
>>               strictly correct, since printf() is not async-signal-safe;
>>               see signal(7) */
>>
>>            printf("Caught signal %d\n", sig);
>>            print_siginfo(si);
>>            signal(SIG, SIG_IGN);
>>        }
>
> signal(sig, SIG_IGN);

Good point.  The ode works because SIG and sig have the same value at
this point, but of course the line shold be as you suggest.  Fixed
now.Thanks,

Michael


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git
man-pages online: http://www.kernel.org/doc/man-pages/online_pages.html
Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux 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