Annotation of 43BSDTahoe/man/man3/rexec.3, revision 1.1

1.1     ! root        1: .\" Copyright (c) 1983 Regents of the University of California.
        !             2: .\" All rights reserved.  The Berkeley software License Agreement
        !             3: .\" specifies the terms and conditions for redistribution.
        !             4: .\"
        !             5: .\"    @(#)rexec.3     6.5 (Berkeley) 5/14/86
        !             6: .\"
        !             7: .TH REXEC 3 "May 14, 1986"
        !             8: .UC 5
        !             9: .SH NAME
        !            10: rexec \- return stream to a remote command
        !            11: .SH SYNOPSIS
        !            12: .nf
        !            13: .PP
        !            14: .B "rem = rexec(ahost, inport, user, passwd, cmd, fd2p);"
        !            15: .B char **ahost;
        !            16: .B int inport;
        !            17: .B "char *user, *passwd, *cmd;"
        !            18: .B int *fd2p;
        !            19: .fi
        !            20: .SH DESCRIPTION
        !            21: .I Rexec
        !            22: looks up the host
        !            23: .I *ahost
        !            24: using
        !            25: .IR gethostbyname (3N),
        !            26: returning \-1 if the host does not exist.
        !            27: Otherwise
        !            28: .I *ahost
        !            29: is set to the standard name of the host.
        !            30: If a username and password are both specified, then these
        !            31: are used to authenticate to the foreign host; otherwise
        !            32: the environment and then the user's
        !            33: .I .netrc
        !            34: file in his
        !            35: home directory are searched for appropriate information.
        !            36: If all this fails, the user is prompted for the information.
        !            37: .PP
        !            38: The port
        !            39: .I inport
        !            40: specifies which well-known DARPA Internet port to use for
        !            41: the connection; the call ``getservbyname("exec", "tcp")'' (see 
        !            42: .IR getservent (3N))
        !            43: will return a pointer to a structure, which contains the
        !            44: necessary port.
        !            45: The protocol for connection is described in detail in
        !            46: .IR rexecd (8C).
        !            47: .PP
        !            48: If the connection succeeds,
        !            49: a socket in the Internet domain of type SOCK_STREAM is returned to
        !            50: the caller, and given to the remote command as
        !            51: .B stdin
        !            52: and
        !            53: .BR stdout .
        !            54: If
        !            55: .I fd2p
        !            56: is non-zero, then an auxiliary channel to a control
        !            57: process will be setup, and a descriptor for it will be placed
        !            58: in
        !            59: .IR *fd2p .
        !            60: The control process will return diagnostic
        !            61: output from the command (unit 2) on this channel, and will also
        !            62: accept bytes on this channel as being UNIX signal numbers, to be
        !            63: forwarded to the process group of the command.  The diagnostic
        !            64: information returned does not include remote authorization failure,
        !            65: as the secondary connection is set up after authorization has been
        !            66: verified.
        !            67: If
        !            68: .I fd2p
        !            69: is 0, then the 
        !            70: .B stderr
        !            71: (unit 2 of the remote
        !            72: command) will be made the same as the 
        !            73: .B stdout
        !            74: and no
        !            75: provision is made for sending arbitrary signals to the remote process,
        !            76: although you may be able to get its attention by using out-of-band data.
        !            77: .SH SEE ALSO
        !            78: rcmd(3), rexecd(8C)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.