]> andersk Git - openssh.git/blobdiff - scp.c
- (djm) Merge cygwin support from Corinna Vinschen <vinschen@cygnus.com>
[openssh.git] / scp.c
diff --git a/scp.c b/scp.c
index 33bd0a5ff7ad40cde3a7c7b57c9b39010f7ec773..23ecc41ca76c7fb6d7391d8836b1fff15de9df7b 100644 (file)
--- a/scp.c
+++ b/scp.c
@@ -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
This page took 0.232288 seconds and 4 git commands to generate.