sxm@philabs.philips.com (Sandeep Mehta) (02/16/90)
According to the documentation on rexec(), when a non-zero value is used as the (last) argument then an auxiliary channel (simply, a socket descriptor) is set up between the master and the control process of the slave. the control process is supposed to accept signal numbers (as bytes written to it) which are passed onto the process group of the command invoked by in.rexecd. I can get rexec to behave as described in all the other aspects (i.e., I/O using the default and auxiliary channels (sockets)) except using signals to control it via the aux channel. the only other option is to use OOB data (which according to TFM, *may* work). the synopsis of rexec is as follows: sd = rexec (char **host, u_short port, char *user, char *passwd, char *cmd, int *fd2p) sd is the SOCK_STREAM channel fd2p is the auxiliary channel. port is (getservbyname("exec","tcp"))->s_port Has anyone gotten this feature of rexec working. any clues or code frags welcome. sxm@philabs.philips.com ...to be or not to bop ?
nancy@cs.utexas.edu (02/20/90)
Data that is read from the aux channel is the stderr of the command. Data that is written to the aux channel should be a signal number (integer, 4 bytes long) with which rexecd kill()'s the command. Does your command receive signals that you send on the aux port? The version of both rexec() and rcmd() on my BSD4.3 machine works fine. You might want to write a test program that has a signal routine set up. Then you can send its signal number on the aux channel and see if the signal routine is invoked. Nancy Buehmann UUCP: ...!uunet!ingr!b11!nancy Intergraph Corporation Internet: b11!nancy@ingr.com Huntsville, Alabama 35894-0001