[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to get make to terminate itself at the first error?

From: Paul Smith
Subject: Re: how to get make to terminate itself at the first error?
Date: Wed, 04 Feb 2009 14:28:31 -0500

On Wed, 2009-02-04 at 09:40 -0500, Martin d Anjou wrote:
> > It may be more correct for make to send the SIGTERM to the child's
> > process group, rather than just to the PID itself.  However, I think
> > that this could cause problems because all of the sub-processes are
> > actually in the same process group (normally).  It's something that
> > would need to be considered carefully, for sure.
> This is not familiar territory for me. Does make run in the same process 
> group as its children?

Make does not set process groups, so unless one of its children changes
is process group yes, they all run in the same process group.

However, make handles SIGTERM so it won't be a problem that it receives
its own SIGTERM.

As I say, that _might_ be the best way to manage this.  But, it would
definitely need some thorough testing.  These kinds of things often lead
to bizarre corner cases.

> If I wanted the same effect as hitting control-c on the command line, 
> wouldn't it be the way to do it: kill the process group rather than just 
> the PID itself?

Yes, that would be the way.  Except, to REALLY emulate ^C you would send

reply via email to

[Prev in Thread] Current Thread [Next in Thread]