* syscalls.cc (setsid): Don't call FreeConsole if ctty is already < 0.
This commit is contained in:
parent
09f7abda72
commit
4e837e7368
@ -1,3 +1,7 @@
|
||||
2003-04-17 Christopher Faylor <cgf@redhat.com>
|
||||
|
||||
* syscalls.cc (setsid): Don't call FreeConsole if ctty is already < 0.
|
||||
|
||||
2003-04-17 Thomas Pfaff <tpfaff@gmx.net>
|
||||
|
||||
* Makefile.in: Add finline-functions optimization to CXXFLAGS.
|
||||
|
@ -283,13 +283,13 @@ setsid (void)
|
||||
|
||||
if (myself->pgid != myself->pid)
|
||||
{
|
||||
myself->ctty = -1;
|
||||
if (fhandler_console::open_fhs <= 0)
|
||||
if (myself->ctty >= 0 && fhandler_console::open_fhs <= 0)
|
||||
{
|
||||
syscall_printf ("open_fhs %d, freeing console",
|
||||
fhandler_console::open_fhs);
|
||||
FreeConsole ();
|
||||
}
|
||||
myself->ctty = -1;
|
||||
myself->sid = getpid ();
|
||||
myself->pgid = getpid ();
|
||||
syscall_printf ("sid %d, pgid %d, ctty %d", myself->sid, myself->pgid, myself->ctty);
|
||||
|
Loading…
Reference in New Issue
Block a user