Date: Fri, 30 Jun 2006 16:31:43 -0400 From: Mikhail Teterin <mi+mx@aldan.algebra.com> To: net@freebsd.org Cc: question@freebsd.org Subject: Struggling with rcmd Message-ID: <200606301631.44061.mi%2Bmx@aldan.algebra.com>
index | next in thread | raw e-mail
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
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606301631.44061.mi%2Bmx>
