]> sourceware.org Git - newlib-cygwin.git/blobdiff - winsup/cygwin/fhandler_tty.cc
Cygwin: pty: Stop to use PID_NEW_PG flag as a marker for GDB.
[newlib-cygwin.git] / winsup / cygwin / fhandler_tty.cc
index c7588a073dc50088326852319bd83bcc175fe677..3332fefd6e1b84edd4ae04cbc6c18c8c8e255207 100644 (file)
@@ -116,8 +116,9 @@ fhandler_pty_common::get_console_process_id (DWORD pid, bool match,
   return res_pri ?: res;
 }
 
-static bool isHybrid; /* Set true if the active pipe is set to nat pipe even
-                        though the current process is a cygwin process. */
+static bool isHybrid; /* Set true if the active pipe is set to nat pipe
+                        owned by myself even though the current process
+                        is a cygwin process. */
 static HANDLE h_gdb_inferior; /* Handle of GDB inferior process. */
 
 static void
@@ -1079,8 +1080,9 @@ fhandler_pty_slave::set_switch_to_nat_pipe (void)
     {
       isHybrid = true;
       setup_locale ();
-      myself->exec_dwProcessId = myself->dwProcessId;
-      myself->process_state |= PID_NEW_PG; /* Marker for nat_fg */
+      myself->exec_dwProcessId = myself->dwProcessId; /* Set this as a marker
+                                                        for tty::nat_fg()
+                                                        and process_sigs() */
       bool stdin_is_ptys = GetStdHandle (STD_INPUT_HANDLE) == get_handle ();
       setup_for_non_cygwin_app (false, NULL, stdin_is_ptys);
     }
@@ -1199,7 +1201,6 @@ fhandler_pty_slave::reset_switch_to_nat_pipe (void)
                    }
                }
              myself->exec_dwProcessId = 0;
-             myself->process_state &= ~PID_NEW_PG;
              isHybrid = false;
            }
        }
This page took 0.027759 seconds and 5 git commands to generate.