zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: prob: fg not sending CONT to 'make' children
Date: Mon, 30 Aug 1999 10:21:44 +0200 (MET DST)	[thread overview]
Message-ID: <199908300821.KAA20279@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Sun, 29 Aug 1999 18:42:15 +0000


Bart Schaefer wrote:

> Note the negated PID, which turns the kill() into a killpg().  So gmake is
> a process group leader, though whether it did that itself or zsh did it,
> I'm not entirely sure; but I tend to "blame" zsh because 3.0.5 and 3.1.5
> do not have the same problem.
> 
> I think this must be a case where process group management was updated
> elsewhere but the change was not reflected in killjb().  The following
> patch resumes the make properly in this particular example, but I'm not
> sure it isn't an over-use of killpg() -- Sven, can you comment?

I hope: this is connected to 6824 which allowed such processes
(started from a function, no pipe) to use their own process group --
more precisely, it tried to handle such processes in their own group
correctly. I just didn't remember to change killjb() for that. Never
tried it with a command that actually needed that, it seems.

I think we could add some extra safety by first trying killpg() and
then using kill() if that fails.

Bye
 Sven

--- os/signals.c	Mon Aug 30 10:01:46 1999
+++ Src/signals.c	Mon Aug 30 10:21:42 1999
@@ -591,7 +591,8 @@
         if (jn->stat & STAT_SUPERJOB) {
             if (sig == SIGCONT) {
                 for (pn = jobtab[jn->other].procs; pn; pn = pn->next)
-                    killpg(pn->pid, sig);
+                    if (killpg(pn->pid, sig) == -1)
+			kill(pn->pid, sig);
  
                 for (pn = jn->procs; pn->next; pn = pn->next)
                     err = kill(pn->pid, sig);

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


             reply	other threads:[~1999-08-30  8:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-30  8:21 Sven Wischnowsky [this message]
1999-08-30 14:43 ` Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
1999-09-01 12:11 Sven Wischnowsky
1999-09-01  8:08 Sven Wischnowsky
1999-09-01 16:46 ` Bart Schaefer
1999-08-31 11:25 Sven Wischnowsky
1999-08-31 16:40 ` Bart Schaefer
1999-08-29  7:35 Will Day
1999-08-29 18:42 ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199908300821.KAA20279@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).