Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!husc6!uwvax!pfeiffer From: pfeiffer@rsch.WISC.EDU (Phil Pfeiffer) Newsgroups: net.unix Subject: Concerning request for help on shell background processes Message-ID: <2725@rsch.WISC.EDU> Date: Tue, 16-Sep-86 17:17:12 EDT Article-I.D.: rsch.2725 Posted: Tue Sep 16 17:17:12 1986 Date-Received: Wed, 17-Sep-86 03:26:10 EDT Distribution: na Organization: U of Wisconsin CS Dept Lines: 47 Keywords: Error in first posting Sorry, I mistyped an important character in the original request. Let's try again. + + The systems in question are 4.3BSD Unix and Ultrix. + The problem is as follows: + + + Assume that file "nxf" does not exist. + Assume that the following lines are in shell script 'cmd': + + #!/bin/csh + rm nxf >& cmd_out + echo $status > cmd_stat + + + Assume the following lines are in shell script 'master': + + #!( doesn't matter whether master is executed using "/bin/sh" or "/bin/csh" ) + cmd + + 'master', as is, executes just fine. The "cannot find file" error message and + error status values are written into cmd_out and cmd_stat, respectively. + Let me clarify this: the "cmd_stat" file contains a "1". so far, all well and good. + + Assume the following lines are in shell script 'bgmaster': + + #!( doesn't matter whether master is executed using "/bin/sh" or "/bin/csh" ) + cmd & + wait + + Now "cmd_out" is empty on return, and "cmd_stat=1". Why? ^^^^^^^^^^ This phrase in the original message should have asserted that "cmd_stat=0". Have I failed to understand something about /bin/csh background processing? -- -- Phil Pfeiffer ...!{harvard,ihnp4,seismo,topaz}!uwvax!pfeiffer (608) 263-7308