Struggling with rcmd

Mikhail Teterin mi+mx at aldan.algebra.com
Fri Jun 30 20:32:18 UTC 2006


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


More information about the freebsd-net mailing list