This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin] cygwin: only expose /dev/con{in, out, sole} when started from a Windows console


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=b706c6b479422d31f0124b92c21b4cb536bbddff

commit b706c6b479422d31f0124b92c21b4cb536bbddff
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Wed Aug 23 17:43:41 2017 +0200

    cygwin: only expose /dev/con{in,out,sole} when started from a Windows console
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/fhandler.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index 153e384..cd73e6e 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -1439,7 +1439,7 @@ private:
   ssize_t __stdcall write (const void *ptr, size_t len);
   void doecho (const void *str, DWORD len) { (void) write (str, len); }
   int close ();
-  static bool exists () {return !!GetConsoleCP ();}
+  static bool exists () {return shared_console_info && !!GetConsoleCP ();}
 
   int tcflush (int);
   int tcsetattr (int a, const struct termios *t);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]