Windows doesn't do signals much.

This commit is contained in:
David Given 2022-07-16 22:45:08 +02:00
parent 31fe10bf5d
commit fd691cfaf6
2 changed files with 5 additions and 20 deletions

View file

@ -21,7 +21,6 @@ static char rcs_id[] = "$Id$";
static char rcs_ack[] = RCS_ACK;
#endif
static int sigs[] = { SIGINT, SIGHUP, SIGTERM, 0 };
static int arg_count;
static char* srcvar(void);
@ -85,13 +84,8 @@ int main(int argc, char** argv)
if (n_error && !k_flag)
exit(n_error);
for (n_sig = sigs; *n_sig; n_sig++)
{
if (signal(*n_sig, noodstop) == SIG_IGN)
{
signal(*n_sig, SIG_IGN);
}
}
if (signal(SIGINT, noodstop) == SIG_IGN)
signal(SIGINT, SIG_IGN);
scanlist(l_first(arguments), elem)
{

View file

@ -179,18 +179,9 @@ static int run_exec(trf* phase, const char* prog)
if (status)
{
switch (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);
}
if (status & 0177)
error("%s died with signal %d", prog, status & 0177);
/* The assumption is that processes voluntarely
dying with a non-zero status already produced
some sort of error message to the outside world.