From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20390 invoked from network); 28 Jun 1999 06:05:24 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 28 Jun 1999 06:05:24 -0000 Received: (qmail 29283 invoked by alias); 28 Jun 1999 06:05:07 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6886 Received: (qmail 29276 invoked from network); 28 Jun 1999 06:05:06 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: "Bart Schaefer" , Subject: RE: 3.0.6-pre-5 problem and loop killing Date: Mon, 28 Jun 1999 10:04:48 +0400 Message-ID: <000001bec12c$21186040$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal In-Reply-To: <990625171454.ZM5335@candle.brasslantern.com> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 > > Which of course is the one thing Sven hasn't tried patching yet ... but I'm > not sure WHY zsh is going through the third branch. All of Sven's patches > have been to the second branch. > > What's odd is that over in the 6860 "Re: PATCH: loop killing" thread, zsh > DOESN'T get the signal when it's supposed to. Maybe Sven's got the cases > in which zsh takes the second and third branches, reversed? > Looking a bit more closely on truss of the two cases reveal, that they are quite different: this is from xterm -e zsh (the case, when ^Z does not work): bor@itsrm2:~%> fgrep 'fork execve SIGCLD' /tmp/foo 8323: execve("/usr/bin/X11/xterm", 0x000000FFFFFEEC30, 0x000000FFFFFEEC40) argc = 1 8323: fork() = 8324 8324: fork() (returning as child ...) = 8323 8324: sighold(SIGCLD) = SIG_DFL 8324: fork() = 8326 8323: signal(SIGCLD, 0x00000000004068E0) = SIG_DFL 8326: fork() (returning as child ...) = 8324 8326: execve("/usr/lib/pt_chmod", 0x000000007FFEE07C, 0x000000007FFEEDD4) argc = 2 8324: sigrelse(SIGCLD) = SIG_DFL 8324: Received signal #18, SIGCLD [default] 8324: siginfo: SIGCLD CLD_EXITED pid=8326 uid=1 status=0x0000 8324: signal(SIGCLD, SIG_DFL) = SIG_DFL 8324: execve("/tools/bin/zsh", 0x000000007FFEE0CC, 0x000000000049CE90) argc = 1 8324: sigaction(SIGCLD, 0x000000007FFEEC60, 0x0000000000000000) = 0 8324: fork() = 8331 8331: fork() (returning as child ...) = 8324 8331: execve("/usr/bin/zcat", 0x0000000000502B28, 0x0000000000505780) argc = 1 8324: Received signal #18, SIGCLD, in sigsuspend() [caught] 8324: siginfo: SIGCLD CLD_KILLED pid=8331 uid=0 status=0x0002 8323: Received signal #18, SIGCLD, in poll() [caught] 8323: siginfo: SIGCLD CLD_EXITED pid=8324 uid=61 status=0x0082 bor@itsrm2:~%> Note, that zsh doe exactly one fork/execve for zcat And here is the same for the simple case zsh started from other zsh: bor@itsrm2:/tools/src/zsh-3.1.5-pws-23%> fgrep 'fork execve SIGCLD' /tmp/zsh.1} 12558: execve("/tools/bin/zsh", 0x000000FFFFFEECF0, 0x000000FFFFFEED00) argc = 1 12558: sigaction(SIGCLD, 0x000000007FFEED00, 0x0000000000000000) = 0 12558: fork() = 12559 12559: fork() (returning as child ...) = 12558 12559: execve("/usr/bin/zcat", 0x0000000000502D60, 0x00000000004FE5A0) argc = 1 12558: Received signal #18, SIGCLD, in sigsuspend() [caught] 12558: siginfo: SIGCLD CLD_STOPPED pid=12559 uid=0 status=0x0018 12558: fork() = 12561 12561: fork() (returning as child ...) = 12558 12558: Received signal #18, SIGCLD [caught] 12558: siginfo: SIGCLD CLD_STOPPED pid=12561 uid=0 status=0x0017 12558: Received signal #18, SIGCLD, in sigsuspend() [caught] 12558: siginfo: SIGCLD CLD_CONTINUED pid=12559 uid=0 status=0x0019 12558: Received signal #18, SIGCLD, in sigsuspend() [caught] 12558: siginfo: SIGCLD CLD_KILLED pid=12559 uid=0 status=0x0002 12558: Received signal #18, SIGCLD [caught] 12558: siginfo: SIGCLD CLD_CONTINUED pid=12561 uid=0 status=0x0019 12558: Received signal #18, SIGCLD [caught] 12558: siginfo: SIGCLD CLD_KILLED pid=12561 uid=0 status=0x0002 bor@itsrm2:/tools/src/zsh-3.1.5-pws-23%> Here zsh forks once more. I have no idea, where lies the difference (apart from these PGID/SID). Both are equally *not* login shells and source the same scripts. /andrej