Lines Matching defs:slave
72 * Pseudo-terminal slave device file names start with the following
78 * Specify the maximum suffix length for the control and slave device
84 * Set the maximum length of the master and slave terminal device filenames,
115 static int pty_child(const char *prog, int slave, char *argv[]);
132 int slave = -1; /* The fd of the pseudo-terminal slave device */
135 char slave_name[PTY_MAX_NAME]; /* The filename of the slave end of the */
170 * slave end of the pseudo-terminal.
204 close(cntrl); /* The child doesn't use the slave device */
206 if((slave = pty_open_slave(prog, slave_name)) >= 0) {
207 status = pty_child(prog, slave, argv + 1);
208 close(slave);
219 * slave end of the pseudo-terminal.
225 * slave_name char * The file-name of the pseudo-terminal slave device
251 * Get the filename of the slave side of the pseudo-terminal.
261 * If unable to get the slave name, discard the controller file descriptor,
290 * Get the common extension of the control and slave filenames.
305 * Attempt to open the matching slave file.
325 * grant access to the slave side of the pseudo-terminal.
342 * Open the slave end of a pseudo-terminal.
346 * slave_name char * The filename of the slave device.
349 * slave device, or < 0 on error.
353 int fd; /* The file descriptor of the slave device */
369 fprintf(stderr, "%s: Unable to open pseudo-terminal slave device (%s).\n",
376 * Solaris, which pushes these automatically when a slave is opened,
501 * slave end of the psuedo-terminal.
505 * slave int The file descriptor of the slave end of the
517 static int pty_child(const char *prog, int slave, char *argv[])
523 if(tcgetattr(slave, &attr)) {
529 while(tcsetattr(slave, TCSADRAIN, &attr)) {
536 * Arrange for stdin, stdout and stderr to be connected to the slave device,
539 while(dup2(slave, STDIN_FILENO) < 0 && errno==EINTR)
541 while(dup2(slave, STDOUT_FILENO) < 0 && errno==EINTR)
543 while(dup2(slave, STDERR_FILENO) < 0 && errno==EINTR)
689 * the slave end of the terminal, so that gl_get_line() in the parent