Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!think!snorkelwacker!bloom-beacon!eru!luth!sunic!mcsun!ukc!stl!stc!datlog!scm From: scm@dlcq15.datlog.co.uk (Steve Mawer) Newsgroups: comp.unix.questions Subject: Bourne sh/subshell question Message-ID: <1989Nov17.105828.2894@dlcq15.datlog.co.uk> Date: 17 Nov 89 10:58:28 GMT Organization: Data Logic Ltd, Financial Systems Division. Lines: 27 I have a small problem with the following script: ---------------------SCRIPT STARTS---------- ( echo subshell - $$ sleep 10 ) & echo shell - $! ----------------------SCRIPT ENDS----------- When run, it produces the following output: $ sh script subshell - 25654 shell - 25655 $ My question is twofold, firstly why aren't the two PIDs identical, and secondly, as they're not, why is the PID of the last background process 1 greater than the current process PID of the subshell? E-mail replies for preference, I'll summarize if there's sufficient interest. -- Steve C. Mawer or < {backbone}!ukc!datlog!scm > Voice: +44 1 863 0383 (x2153)