From: Roland G. <r.g...@xs...> - 2001-01-25 09:43:35
|
Ryan Heatwole schrieb: > I have been trying to find a way to determine the return value (that > is: success/fail) of a spawned process (specifically scp). You mean the exit status of the spawned process? Or do you just want to check if the process got spawned OK? For the first, there is $exp->exp_exitstatus(), but I haven't tested if this gives you the right thing. Another way to do this manually is to add "; echo EXIT $?" to the end of your command and expect for qr/^EXIT (\d)/. =20 In the second case, you would see the error as first line from the=20 forked process, saying something like "Cannot exec `command=B4: file not found". Hope this helps, Roland -- RGi...@cp... |