[x265] Fix signal handler

Steve Borho steve at borho.org
Wed Sep 18 18:31:52 CEST 2013


On Wed, Sep 18, 2013 at 7:44 AM, SF Markus Elfring <
elfring at users.sourceforge.net> wrote:

> Hello,
>
> 1. The data type of the variable "local" should be "sig_atomic_t" for
> better
> portability.
>
> https://bitbucket.org/multicoreware/x265/src/d11de33521cf/source/x265.cpp#cl-79


Thanks, patch on the way


>
> 2. The function "exit" does not belong to the list of async-signal-safe
> functions.
>
>
> https://www.securecoding.cert.org/confluence/display/cplusplus/SIG30-CPP.+Call+only+asynchronous-safe+functions+within+signal+handlers
>
>   I guess that a different program design will be needed for your function
> "sigint_handler".
>

The sigint handler is only for early-exiting the encode loop; all of the
exit() calls would happen before the encode loop is entered, so I don't
think this is a problem.

-- 
Steve Borho
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20130918/f6fa5e98/attachment.html>


More information about the x265-devel mailing list