diff options
author | djm <djm> | 2000-09-05 05:13:06 +0000 |
---|---|---|
committer | djm <djm> | 2000-09-05 05:13:06 +0000 |
commit | ef6b288652255f4efeee427d80c1dc88f8661c6b (patch) | |
tree | 134fa639cff379ad40914eb85aa445ad864b0697 /scp.c | |
parent | a55bea016086bffe9a2b8295468d833a8ebc99c4 (diff) | |
download | openssh-ef6b288652255f4efeee427d80c1dc88f8661c6b.tar.gz |
- (djm) Merge cygwin support from Corinna Vinschen <vinschen@cygnus.com>
Diffstat (limited to 'scp.c')
-rw-r--r-- | scp.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1117,8 +1117,17 @@ foregroundproc() if (pgrp == -1) pgrp = getpgrp(); +#ifdef HAVE_CYGWIN + /* + * Cygwin only supports tcgetpgrp() for getting the controlling tty + * currently. + */ + return ((ctty_pgrp = tcgetpgrp(STDOUT_FILENO)) != -1 && + ctty_pgrp == pgrp); +#else return ((ioctl(STDOUT_FILENO, TIOCGPGRP, &ctty_pgrp) != -1 && ctty_pgrp == pgrp)); +#endif } void |