From b98ebf5470da68c0ab4a3877c453ac82c12974ae Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sat, 28 Apr 2001 23:48:28 +0000 Subject: Throughout, change 'tty_attached' to 'real_tty_attached', for clarity. Throughout, change 'OutputStopped' to 'output_stopped', for consistency. * dtable.cc (stdio_init): Set controlling tty if not set by stdio opens. * exceptions.cc (ctrl_c_handler): Avoid special pgid checking if no tty is associated with the process. (Suggested by Tim Baker ) * external.cc (fillout_pinfo): Return actual tty number for ctty. * fhandler_console.cc (get_tty_stuff): Set ctty when shared memory is allocated. Accept flags input from open(). (set_console_ctty): New function. (fhandler_console::open): Pass flags to get_tty_stuff and rely on this function to set the ctty, if appropriate. * fhandler_termios.cc (fhandler_termios::set_ctty): Move to tty_min class. * fhandler_tty.cc (fhandler_tty_slave::open): Use tc field to access set_ctty(). * tty.h (TTY_CONSOLE): Move to include/sys/cygwin.h. (tty_min): Add set_ctty class here. * include/sys/cygwin.h (TTY_CONSOLE): New home here. * path.cc (symlink_info): Make contents an actual buffer. Pass more flags to case_check. (path_conv::check): Reorganize to do parsing based on posix path rather than native path. (symlink_info::check): Expect posix path as input. Translate to native path here. Accept path_conv flags. Stop parsing if not a symlink regardless of whether previous path was a symlink. --- winsup/cygwin/tty.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'winsup/cygwin/tty.h') diff --git a/winsup/cygwin/tty.h b/winsup/cygwin/tty.h index 6eb32b387..4b2ad7f4b 100644 --- a/winsup/cygwin/tty.h +++ b/winsup/cygwin/tty.h @@ -14,8 +14,7 @@ details. */ #define INP_BUFFER_SIZE 256 #define OUT_BUFFER_SIZE 256 #define NTTYS 128 -#define TTY_CONSOLE 0x40000000 -#define tty_attached(p) ((p)->ctty >= 0 && (p)->ctty != TTY_CONSOLE) +#define real_tty_attached(p) ((p)->ctty >= 0 && (p)->ctty != TTY_CONSOLE) /* Input/Output/ioctl events */ @@ -52,7 +51,7 @@ class tty_min public: DWORD status; pid_t pgid; - int OutputStopped; + int output_stopped; int ntty; DWORD last_ctrl_c; // tick count of last ctrl-c @@ -62,6 +61,7 @@ public: void setpgid (int pid) {pgid = pid;} int getsid () {return sid;} void setsid (pid_t tsid) {sid = tsid;} + void set_ctty (int ttynum, int flags); struct termios ti; struct winsize winsize; -- cgit v1.2.3