Windows doesn't do signals much.
This commit is contained in:
parent
31fe10bf5d
commit
fd691cfaf6
|
@ -21,7 +21,6 @@ static char rcs_id[] = "$Id$";
|
||||||
static char rcs_ack[] = RCS_ACK;
|
static char rcs_ack[] = RCS_ACK;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int sigs[] = { SIGINT, SIGHUP, SIGTERM, 0 };
|
|
||||||
static int arg_count;
|
static int arg_count;
|
||||||
|
|
||||||
static char* srcvar(void);
|
static char* srcvar(void);
|
||||||
|
@ -85,13 +84,8 @@ int main(int argc, char** argv)
|
||||||
if (n_error && !k_flag)
|
if (n_error && !k_flag)
|
||||||
exit(n_error);
|
exit(n_error);
|
||||||
|
|
||||||
for (n_sig = sigs; *n_sig; n_sig++)
|
if (signal(SIGINT, noodstop) == SIG_IGN)
|
||||||
{
|
signal(SIGINT, SIG_IGN);
|
||||||
if (signal(*n_sig, noodstop) == SIG_IGN)
|
|
||||||
{
|
|
||||||
signal(*n_sig, SIG_IGN);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
scanlist(l_first(arguments), elem)
|
scanlist(l_first(arguments), elem)
|
||||||
{
|
{
|
||||||
|
|
|
@ -179,18 +179,9 @@ static int run_exec(trf* phase, const char* prog)
|
||||||
|
|
||||||
if (status)
|
if (status)
|
||||||
{
|
{
|
||||||
switch (status & 0177)
|
if (status & 0177)
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
break;
|
|
||||||
case SIGHUP:
|
|
||||||
case SIGINT:
|
|
||||||
case SIGQUIT:
|
|
||||||
case SIGTERM:
|
|
||||||
quit(-5);
|
|
||||||
default:
|
|
||||||
error("%s died with signal %d", prog, status & 0177);
|
error("%s died with signal %d", prog, status & 0177);
|
||||||
}
|
|
||||||
/* The assumption is that processes voluntarely
|
/* The assumption is that processes voluntarely
|
||||||
dying with a non-zero status already produced
|
dying with a non-zero status already produced
|
||||||
some sort of error message to the outside world.
|
some sort of error message to the outside world.
|
||||||
|
|
Loading…
Reference in a new issue