version 1.78, 2000/12/19 23:17:58 |
version 1.79, 2000/12/27 11:51:54 |
|
|
|
|
/* Flag indicating whether a tty should be allocated */ |
/* Flag indicating whether a tty should be allocated */ |
int tty_flag = 0; |
int tty_flag = 0; |
|
int no_tty_flag = 0; |
|
int force_tty_flag = 0; |
|
|
/* don't exec a shell */ |
/* don't exec a shell */ |
int no_shell_flag = 0; |
int no_shell_flag = 0; |
int no_tty_flag = 0; |
|
|
|
/* |
/* |
* Flag indicating that nothing should be read from stdin. This can be set |
* Flag indicating that nothing should be read from stdin. This can be set |
|
|
options.identity_files[options.num_identity_files++] = xstrdup(optarg); |
options.identity_files[options.num_identity_files++] = xstrdup(optarg); |
break; |
break; |
case 't': |
case 't': |
|
if (tty_flag) |
|
force_tty_flag = 1; |
tty_flag = 1; |
tty_flag = 1; |
break; |
break; |
case 'v': |
case 'v': |
|
|
if (no_tty_flag) |
if (no_tty_flag) |
tty_flag = 0; |
tty_flag = 0; |
/* Do not allocate a tty if stdin is not a tty. */ |
/* Do not allocate a tty if stdin is not a tty. */ |
if (!isatty(fileno(stdin))) { |
if (!isatty(fileno(stdin)) && !force_tty_flag) { |
if (tty_flag) |
if (tty_flag) |
fprintf(stderr, "Pseudo-terminal will not be allocated because stdin is not a terminal.\n"); |
fprintf(stderr, "Pseudo-terminal will not be allocated because stdin is not a terminal.\n"); |
tty_flag = 0; |
tty_flag = 0; |