From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from math.gatech.edu (euclid.skiles.gatech.edu [130.207.146.50]) by werple.net.au (8.7/8.7.1) with SMTP id DAA14938 for ; Fri, 17 Nov 1995 03:26:09 +1100 (EST) Received: by math.gatech.edu (5.x/SMI-SVR4) id AA01725; Thu, 16 Nov 1995 10:57:21 -0500 Resent-Date: Thu, 16 Nov 1995 16:57:47 +0100 Old-Return-Path: Message-Id: <9511161557.AA20201@sgi.ifh.de> To: zsh-workers@math.gatech.edu (Zsh hackers list) Subject: Pid or not pid Date: Thu, 16 Nov 1995 16:57:47 +0100 From: Peter William Stephenson Resent-Message-Id: <"Hflv.0.tQ.Xzrgm"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/619 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Some of the code in execcmd() is getting executed in the parent rather than the child, presumably since the last rearrangement... in particular, nice(5) is getting called if fork() returned a non-zero pid, i.e. in the parent (line 1350 of exec.c). This means each time a background process is forked, the parent shell has a lower priority. This may be a good way to deal with process hogs, but I don't think it's what's intended. % ps -l -p$$ F S UID PID PPID C PRI NI P SZ:RSS WCHAN TTY TIME COMD 30 S 2082 18544 21831 2 39 20 * 775:366 801bf9c0 pts/54 0:01 zsh % sleep 3 & [1] 19247 +4:52% ps -l -p$$ F S UID PID PPID C PRI NI P SZ:RSS WCHAN TTY TIME COMD 30 S 2082 18544 21831 1 39 25 * 775:361 801bf9c0 pts/54 0:01 zsh % -- Peter Stephenson Tel: +49 33762 77366 WWW: http://www.ifh.de/~pws/ Fax: +49 33762 77330 Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen DESY-IfH, 15735 Zeuthen, Germany.