📄 rexec.3x
字号:
.\" SCCSID: @(#)rexec.3x 8.1 9/11/90.TH rexec 3x.SH Namerexec \- return stream to a remote command.SH Syntax.nf.B "rem = rexec(ahost, inport, user, passwd, cmd, fd2p);".B char **ahost;.B u_short inport;.B "char *user, *passwd, *cmd;".B int *fd2p;.fi.SH Description.NXR "rexec subroutine".NXAM "rmt program" "rexec subroutine".NXR "stream" "returning to remote command"The.PN rexecsubroutine looks up the host.I *ahostusing.PN gethostbyname ,returning \-1 if the host does not exist.For further information, see .MS gethostent 3n .Otherwise.I *ahostis set to the standard name of the host.If a username and password are both specified, then theseare used to authenticate to the foreign host.If all this fails, the user is prompted for the information..PPThe port.I inportspecifies which well-known DARPA Internet port to use forthe connection; it will normally be the value returned fromthe call ``getservbyname("exec", "tcp")''. For furtherinformation, see .MS getservent 3n .The protocol for connection is described in detail in.MS rexecd 8c ..PPIf the call succeeds, a socket of type SOCK_STREAM is returned tothe caller and given to the remote command as.B stdinand.BR stdout .If.I fd2pis nonzero, then an auxiliary channel to a controlprocess will be set up, and a descriptor for it will be placedin.IR *fd2p .The control process will return diagnosticoutput from the command (unit 2) on this channel and will alsoaccept bytes on this channel as being UNIX signal numbers, to beforwarded to the process group of the command.If.I fd2pis 0, then the .B stderr(unit 2 of the remotecommand) will be made the same as the .B stdoutand noprovision is made for sending arbitrary signals to the remote process,although you may be able to get its attention by using out-of-band data..SH See Alsogethostent(3n), getservent(3n), rcmd(3x), rexecd(8c)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -