diff options
Diffstat (limited to 'scp.c')
-rw-r--r-- | scp.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1117,8 +1117,17 @@ foregroundproc() | |||
1117 | if (pgrp == -1) | 1117 | if (pgrp == -1) |
1118 | pgrp = getpgrp(); | 1118 | pgrp = getpgrp(); |
1119 | 1119 | ||
1120 | #ifdef HAVE_CYGWIN | ||
1121 | /* | ||
1122 | * Cygwin only supports tcgetpgrp() for getting the controlling tty | ||
1123 | * currently. | ||
1124 | */ | ||
1125 | return ((ctty_pgrp = tcgetpgrp(STDOUT_FILENO)) != -1 && | ||
1126 | ctty_pgrp == pgrp); | ||
1127 | #else | ||
1120 | return ((ioctl(STDOUT_FILENO, TIOCGPGRP, &ctty_pgrp) != -1 && | 1128 | return ((ioctl(STDOUT_FILENO, TIOCGPGRP, &ctty_pgrp) != -1 && |
1121 | ctty_pgrp == pgrp)); | 1129 | ctty_pgrp == pgrp)); |
1130 | #endif | ||
1122 | } | 1131 | } |
1123 | 1132 | ||
1124 | void | 1133 | void |