[x265] Fix signal handler
SF Markus Elfring
elfring at users.sourceforge.net
Wed Sep 18 20:33:25 CEST 2013
> Sorry, I'm not seeing the point. If the CLI app is calling exit(), why do I
> care if the SIGINT handler can set a flag or not?
I try to point out that there are risks involved with the current
implementation. The calling of a sync-signal-unsafe function by a signal handler
has got the general potential to result in a deadlock of your program, hasn't it?
It is a matter if you design also this source code place for software correctness.
Would you like to consider the other approaches for such an use case?
- self-pipe trick
http://cr.yp.to/docs/selfpipe.html
- sigwait
http://pubs.opengroup.org/onlinepubs/9699919799/functions/sigwait.html
Regards,
Markus
More information about the x265-devel
mailing list