pfeiffer@rsch.WISC.EDU (Phil Pfeiffer) (09/17/86)
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