version 1.200, 2006/10/10 10:12:45 |
version 1.201, 2007/08/23 03:23:26 |
|
|
char *command_string, *tmp; |
char *command_string, *tmp; |
int pin[2], pout[2]; |
int pin[2], pout[2]; |
pid_t pid; |
pid_t pid; |
char strport[NI_MAXSERV]; |
char *shell, strport[NI_MAXSERV]; |
|
|
|
if ((shell = getenv("SHELL")) == NULL) |
|
shell = _PATH_BSHELL; |
|
|
/* Convert the port number into a string. */ |
/* Convert the port number into a string. */ |
snprintf(strport, sizeof strport, "%hu", port); |
snprintf(strport, sizeof strport, "%hu", port); |
|
|
|
|
|
|
/* Stderr is left as it is so that error messages get |
/* Stderr is left as it is so that error messages get |
printed on the user's terminal. */ |
printed on the user's terminal. */ |
argv[0] = _PATH_BSHELL; |
argv[0] = shell; |
argv[1] = "-c"; |
argv[1] = "-c"; |
argv[2] = command_string; |
argv[2] = command_string; |
argv[3] = NULL; |
argv[3] = NULL; |