mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-06 14:30:38 +08:00
* exceptions.cc (try_to_debug): Fix off-by-one problem when resetting
environment variable after error_start detected. * fhandler_tty_slave.cc (fhandler_tty_slave::close): Clarify debug message. * syscalls.cc (setsid): Don't increment usecount here, since it will be automatically decremented on close.
This commit is contained in:
parent
6dc18ca4d3
commit
56b5feb639
@ -1,3 +1,13 @@
|
|||||||
|
2003-12-26 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* exceptions.cc (try_to_debug): Fix off-by-one problem when resetting
|
||||||
|
environment variable after error_start detected.
|
||||||
|
|
||||||
|
* fhandler_tty_slave.cc (fhandler_tty_slave::close): Clarify debug
|
||||||
|
message.
|
||||||
|
* syscalls.cc (setsid): Don't increment usecount here, since it will be
|
||||||
|
automatically decremented on close.
|
||||||
|
|
||||||
2003-12-26 Christopher Faylor <cgf@redhat.com>
|
2003-12-26 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* exceptions.cc (setup_handler): Protect against a race.
|
* exceptions.cc (setup_handler): Protect against a race.
|
||||||
|
@ -350,12 +350,15 @@ try_to_debug (bool waitloop)
|
|||||||
char* rawenv = GetEnvironmentStrings () ;
|
char* rawenv = GetEnvironmentStrings () ;
|
||||||
for (char* p = rawenv; *p != '\0'; p = strchr (p, '\0') + 1)
|
for (char* p = rawenv; *p != '\0'; p = strchr (p, '\0') + 1)
|
||||||
{
|
{
|
||||||
if (strncmp (p, "CYGWIN=", sizeof ("CYGWIN=") - 1) == 0)
|
if (strncmp (p, "CYGWIN=", strlen ("CYGWIN=")) == 0)
|
||||||
{
|
{
|
||||||
char* q = strstr (p, "error_start") ;
|
char* q = strstr (p, "error_start") ;
|
||||||
/* replace 'error_start=...' with '_rror_start=...' */
|
/* replace 'error_start=...' with '_rror_start=...' */
|
||||||
if (q) *q = '_' ;
|
if (q)
|
||||||
SetEnvironmentVariable ("CYGWIN", p + sizeof ("CYGWIN=")) ;
|
{
|
||||||
|
*q = '_' ;
|
||||||
|
SetEnvironmentVariable ("CYGWIN", p + strlen ("CYGWIN=")) ;
|
||||||
|
}
|
||||||
break ;
|
break ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -620,7 +620,7 @@ fhandler_tty_slave::close ()
|
|||||||
if (archetype->usecount < 0)
|
if (archetype->usecount < 0)
|
||||||
system_printf ("usecount %d", archetype->usecount);
|
system_printf ("usecount %d", archetype->usecount);
|
||||||
#endif
|
#endif
|
||||||
termios_printf ("just exiting because archetype usecount is > 0");
|
termios_printf ("just returning because archetype usecount is > 0");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -335,7 +335,7 @@ setsid (void)
|
|||||||
myself->pgid, myself->ctty, fhandler_console::open_fhs);
|
myself->pgid, myself->ctty, fhandler_console::open_fhs);
|
||||||
if (cygheap->ctty)
|
if (cygheap->ctty)
|
||||||
{
|
{
|
||||||
if (!--cygheap->ctty->usecount)
|
if (cygheap->ctty->usecount == 1)
|
||||||
cygheap->ctty->close ();
|
cygheap->ctty->close ();
|
||||||
cygheap->ctty = NULL;
|
cygheap->ctty = NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user