Struggling with rcmd
- From: Mikhail Teterin <mi+mx@xxxxxxxxxxxxxxxxx>
- Date: Fri, 30 Jun 2006 16:31:43 -0400
Why does not the following work?
rem = rcmd(&host, sp->s_port, pwd->pw_name, user, copyargs(argv), &remerr);
if (rem < 0)
exit(EX_UNAVAILABLE);
if (remerr < 0)
warn("Can't establish stderr channel (%d)", remerr);
It only works, the specified remote commands is entirely self-contained
(like "touch /tmp/tag" -- the /tmp/tag appears on the remote system).
However, the remerr is never filled with the file descriptor -- whatever value
it has before the rcmd call, stays in it:
rcmd: Can't establish stderr channel (-3): Unknown error: 0
Thanks!
-mi
_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"