mirror of
https://github.com/gnustep/libs-ec.git
synced 2025-02-21 02:41:11 +00:00
Only ignore SIGHUP if running as daemon
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/ec/trunk@36989 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
dc4f189470
commit
02ab3e067b
1 changed files with 12 additions and 2 deletions
14
EcProcess.m
14
EcProcess.m
|
@ -144,7 +144,7 @@ qhandler(int sig)
|
|||
{
|
||||
signal(sig, ihandler);
|
||||
/* We store the signal value in a global variable and return to normal
|
||||
* processing ... that way later code can check on the sttate of the
|
||||
* processing ... that way later code can check on the state of the
|
||||
* variable and take action outside the handler.
|
||||
* We can't act immediately here inside the handler as the signal may
|
||||
* have interrupted some vital library (eg malloc()) and left it in a
|
||||
|
@ -3385,7 +3385,6 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
|||
case SIGPIPE:
|
||||
case SIGTTOU:
|
||||
case SIGTTIN:
|
||||
case SIGHUP:
|
||||
case SIGCHLD:
|
||||
|
||||
/* SIGWINCH is generated when the terminal size
|
||||
|
@ -3398,6 +3397,17 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
|||
signal(i, SIG_IGN);
|
||||
break;
|
||||
|
||||
case SIGHUP:
|
||||
if ([cmdDefs boolForKey: @"Daemon"] == YES)
|
||||
{
|
||||
signal(i, SIG_IGN);
|
||||
}
|
||||
else
|
||||
{
|
||||
signal(i, qhandler);
|
||||
}
|
||||
break;
|
||||
|
||||
case SIGINT:
|
||||
case SIGTERM:
|
||||
signal(i, qhandler);
|
||||
|
|
Loading…
Reference in a new issue