From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28566 invoked from network); 14 Jun 1999 10:12:57 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 14 Jun 1999 10:12:56 -0000 Received: (qmail 10099 invoked by alias); 14 Jun 1999 10:12:34 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2386 Received: (qmail 10092 invoked from network); 14 Jun 1999 10:12:32 -0000 Date: Mon, 14 Jun 1999 12:12:16 -0600 From: Dominik Vogt To: zsh-users@sunsite.auc.dk Subject: killing commands in a pipe? Message-ID: <19990614121216.A799@hp.com> Reply-To: dominik.vogt@gmx.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i I have a problem with a shell script: #!/usr/bin/zsh setopt NOHUP some_command_that_never_exits | while true; do read LINE ... done I start the script from another script with my_script & and I try to kill it with killall some_command_that_never_exits The problem is that although some_command_that_never_exits is killed as expected, the 'while' part of the pipe doesn't exit. Actually it's worse than that because the zsh running the command refuses to be killed, even with kill -9. If I unset the NOHUP option instead: unsetopt NOHUP it works ok. The manpage says this about the (NO)HUP option: HUP Send the HUP signal to running jobs when the shell exits. So this doesn't explain the behaviour. Shouldn't the pipe exit completely when the input stream is broken, regardless of the HUP/NOHUP option? I am using zsh 3.0.5 u'on a Linux 2.2.5 kernel. (please cc me, I'm not on the list) Bye Dominik ^_^ -- Dominik Vogt, Hewlett-Packard GmbH, Dept. BVS Herrenberger Str.130, 71034 Boeblingen, Germany phone: 07031/14-4596, fax: 07031/14-3883, dominik_vogt@hp.com