HP-UX Reference (11i v1 00/12) - 3 Library Functions N-Z (vol 7)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/nan.3m
________________________________________________________________
___ ___
r
rcmd(3N) rcmd(3N)
FILE *fp;
char ch;
int rem;
sp = getservbyname("shell","tcp");
pwd = getpwuid(getuid());
rem = rcmd(host, sp->s_port, pwd->pw_name, ruser, cmd, 0);
if (rem < 0)
exit(1); /* rcmd outputs its own error messages */
fp = fdopen(rem, "r");
while ((ch = getc(fp)) != EOF)
putchar(ch);
}
WARNINGS
There is no way to specify options to the socket() call that rcmd() makes. Since rcmd() replaces the
pointer to the host name (*ahost) with a pointer to the standard name of the host in a static data area, this
value must be copied into the user’s data area if it is to be used later. Otherwise, unpredictable results will
occur.
AUTHOR
rcmd() was developed by the University of California, Berkeley.
SEE ALSO
login(1), rlogin(1), remsh(1), named(1M), remshd(1M), rexecd(1M), gethostent(3N), rexec(3N),
hosts.equiv(4).
Section 3−−748 − 4 − HP-UX Release 11i: December 2000
___
___