diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 43fedbbd5..42f67e1d2 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,10 @@ +2011-06-16 Christopher Faylor + + * fhandler_console.cc (fhandler_console::set_unit): Set + pc.file_attributes() to reflect existence. + * fhandler.h (fhandler_pty_common::fhandler_pty_common): Ditto. + * pinfo.cc (_pinfo::set_ctty): Output device numbers in hex. + 2011-06-15 Christopher Faylor * errno.cc (EIO): Lowercase "o" representative string. diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 34da53a87..8268a9ae7 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1140,7 +1140,7 @@ class fhandler_pty_common: public fhandler_termios output_mutex (NULL), input_mutex (NULL), input_available_event (NULL) { - // nothing to do + pc.file_attributes (FILE_ATTRIBUTE_NORMAL); } HANDLE output_mutex, input_mutex; HANDLE input_available_event; diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index b4a341b81..ce036a361 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -156,6 +156,8 @@ fhandler_console::set_unit () } dev ().parse (devset); + if (devset != FH_ERROR) + pc.file_attributes (FILE_ATTRIBUTE_NORMAL); return created; } diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 8a1780c82..a526770f9 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -375,7 +375,7 @@ _pinfo::_ctty (char *buf) void _pinfo::set_ctty (tty_min *tc, int flags, fhandler_termios *fh) { - debug_printf ("old %s, ctty %d, tc->ntty %d flags & O_NOCTTY %p", __ctty (), ctty, tc->ntty, flags & O_NOCTTY); + debug_printf ("old %s, ctty device number %p, tc->ntty device number %p flags & O_NOCTTY %p", __ctty (), ctty, tc->ntty, flags & O_NOCTTY); if ((ctty <= 0 || ctty == tc->ntty) && !(flags & O_NOCTTY)) { ctty = tc->ntty;