Request for help on background shell processing
Phil Pfeiffer
pfeiffer at rsch.WISC.EDU
Tue Sep 16 10:28:46 AEST 1986
The systems in question are 4.3BSD Unix and Ultrix.
The problem is as follows:
Assume file "nxf" does not exist.
Assume 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.
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?
--
-- Phil Pfeiffer
...!{harvard,ihnp4,seismo,topaz}!uwvax!pfeiffer
(608) 263-7308
More information about the Comp.unix
mailing list