[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: signal() vs sigaction()
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 28 Feb 2018 11:42:51 -0300
> The code for lua.c includes signal.h and contains several references
> to signal(). Since I know nothing about this, I have consulted the
> manpage for signal(). It starts thus:
>
> The behavior of signal() varies across UNIX versions, and has also var‐
> ied historically across different versions of Linux. Avoid its use:
> use sigaction(2) instead. See Portability below.
>
> Is there a good reason, maybe something to do with other systems, why
> the Lua source uses signal() rather than sigaction()?
signal is ISO C, sigaction is not.
-- Roberto