// job.c inside reap_children() near line 500:
if (err && block)
   {
     static int printed = 0;
     fflush (stdout);
     if (!printed)
     {
       error (NILF, _("*** Waiting for unfinished jobs...."));
       fatal_error_signal(SIGTERM);
     }
     printed = 1;
   }

However, looking more closely at fatal_error_signal() it appears that if
you send it SIGTERM it WILL try to kill every existing child process by

SIGTERM works better, although looking at the code in command.c I am not sure why.

Now, I am getting different result depending on what the commands for the target are.

When the target is like this, ps -ef reveals that "sleep 60" keeps running, eventhough the prompt returns right away:

# CASE 1
all: t1 t2
t1:
        sleep 60 && echo
t2:
        exit 1

But when the target is like this, "sleep 60" dies for good:

# CASE 2
all: t1 t2
t1:
        sleep 60
t2:
        exit 1

Now if I use process substitution with the CASE 1 makefile
  t=$(make -j 2)
the assignment does not return until the sleep 60 is over, but if I ^C out of it, "sleep 60" dies immediately.

So sending SIGTERM is not quite like hitting ^C. I'd really like to understand the difference and get it to work like ^C.

Martin


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to