in reply to unix rcp command within a system call

I assume that this is a problem from the rcp command itself,
because if you try the same in a terminal you also get 0 as return value.
rcp mine.txt cmd1.txt; echo $? /bin/cp: mine.txt:cannot access min.txt 0
but if you use cp you'll get a correct return value:
cp mine.txt cmd1.txt; echo $? /bin/cp: mine.txt:cannot access min.txt 1

maybe it's possible for you to use cp instead of rcp.

MP

Replies are listed 'Best First'.
Re: Re: unix rcp command within a system call
by jalebie (Acolyte) on Aug 28, 2001 at 21:38 UTC
    I know, but I have to use the rcp command to copy files across different machines. This code is actually a part of a larger program that i said earlier.