Lines Matching defs:prog
113 static int pty_open_master(const char *prog, int *cntrl, char *slave_name);
114 static int pty_open_slave(const char *prog, char *slave_name);
115 static int pty_child(const char *prog, int slave, char *argv[]);
116 static int pty_parent(const char *prog, int cntrl);
137 char *prog; /* The name of the program (ie. argv[0]) */
148 prog = argv[0];
161 fprintf(stderr, "%s: Unable to execute %s (%s).\n", prog, argv[1],
172 if(pty_open_master(prog, &cntrl, slave_name))
193 fprintf(stderr, "%s: Unable to fork child process (%s).\n", prog,
201 status = pty_parent(prog, cntrl);
206 if((slave = pty_open_slave(prog, slave_name)) >= 0) {
207 status = pty_child(prog, slave, argv + 1);
222 * prog const char * The name of this program.
232 static int pty_open_master(const char *prog, int *cntrl, char *slave_name)
256 fprintf(stderr, "%s: Slave pty filename too long.\n", prog);
279 fprintf(stderr, "%s: Couldn't open %s (%s)\n", prog, PTY_DEV_DIR,
320 fprintf(stderr, "%s: Unable to find a free pseudo-terminal.\n", prog);
330 fprintf(stderr, "%s: Unable to unlock terminal (%s).\n", prog,
345 * prog const char * The name of this program.
351 static int pty_open_slave(const char *prog, char *slave_name)
360 fprintf(stderr, "%s: Unable to form new process group (%s).\n", prog,
370 prog, strerror(errno));
394 prog, strerror(errno));
410 * prog const char * The name of this program.
417 static int pty_parent(const char *prog, int cntrl)
504 * prog const char * The name of this program.
517 static int pty_child(const char *prog, int slave, char *argv[])
524 fprintf(stderr, "%s: Can't get pseudo-terminal attributes (%s).\n", prog,
531 fprintf(stderr, "%s: tcsetattr error: %s\n", prog, strerror(errno));
549 fprintf(stderr, "%s: Unable to execute %s (%s).\n", prog, argv[0],