Fixed signal races in shadow tools.
Some of the supplied tools use functions which are not signal-safe. Most of the times it's exit() vs. _exit(). In other times it's how the standard output or standard error is handled. FILE-related functions shall be avoided, therefore I replaced them with write(). Also there is no need to call closelog(). At worst, it allows to trigger a deadlock by issuing different signal types at bad timings. But as these fixes are about race conditions, expect bad timings in general for these bugs to be triggered. :)
This commit is contained in:
@@ -70,7 +70,7 @@ static RETSIGTYPE catch_signals (int);
|
||||
|
||||
static RETSIGTYPE catch_signals (unused int sig)
|
||||
{
|
||||
exit (1);
|
||||
_exit (1);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user