Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Apr 1998 00:58:37 +0200
From:      Martin Cracauer <cracauer@cons.org>
To:        Bruce Evans <bde@zeta.org.au>, cracauer@cons.org
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: make/SIGINT (Re: cvs commit: src/bin/sh jobs.c)
Message-ID:  <19980404005837.44468@cons.org>
In-Reply-To: <199803131513.CAA27634@godzilla.zeta.org.au>; from Bruce Evans on Sat, Mar 14, 1998 at 02:13:11AM %2B1100
References:  <199803131513.CAA27634@godzilla.zeta.org.au>

next in thread | previous in thread | raw e-mail | index | archive | help
In <199803131513.CAA27634@godzilla.zeta.org.au>, Bruce Evans wrote: 
> >The appended fix seems to treat signals right for compat mode,
> >too. I'll do some make world's with patched make and sh over the
> >weekend and look for further trouble.
> 
> I changed the handling of SIGQUIT and fixed the style bugs:
> 
> diff -c2 compat.c~ compat.c
> *** compat.c~	Mon Feb 24 01:43:20 1997
> --- compat.c	Sat Mar 14 01:53:45 1998
> ***************
> *** 126,130 ****
>   
>       }
> !     exit (signo);
>   }
>   
> --- 126,133 ----
>   
>       }
> !     if (signo == SIGQUIT)
> ! 	exit(signo);
> !     (void) signal(signo, SIG_DFL);
> !     (void) kill(getpid(), signo);
>   }
>   
> diff -c2 job.c~ job.c
> *** job.c~	Mon Feb 24 01:43:21 1997
> --- job.c	Fri Feb 13 05:06:16 1998
> ***************
> *** 2905,2909 ****
>       }
>       (void) eunlink(tfile);
> -     exit(signo);
>   }
>   
> --- 2905,2908 ----
> 
> SIGQUIT handling is still buggy.  For the simple Makefile:
> ---
> foo:
> 	sleep 1000
> ---
> killing make with SIGQUIT gives the following behaviours:
> 
> 1. make:      exits with status 3 (SIGQUIT) (per the above change).
> 2. make -j4:  hangs (broken).
> 3: gmake:     exits with status 1.
> 3: gmake -j4: exits with status 1.
> 
> POSIX.2 only requires a nonzero exit status for SIGQUIT.  We've just
> fixed the handling of SIGINT, SIGTERM and SIGHUP.

I'm not sure why you treat SIGQUIT specially. That way the script
can't end immedeatly after the current job. And the user requests
that all jobs in the current forground process group should dump core,
so why not just resend SIGQUIT as well?

Martin
-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Martin Cracauer <cracauer@cons.org> http://www.cons.org/cracauer
  cracauer@wavehh.hanse.de (batched, preferred for large mails)
  Tel.: (daytime) +4940 41478712 Fax.: (daytime) +4940 41478715
  Tel.: (private) +4940 5221829 Fax.: (private) +4940 5228536
  Paper: (private) Waldstrasse 200, 22846 Norderstedt, Germany

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980404005837.44468>