Cygwin: console: Fix deadlock at calling fork().
- Calling fork() on console occasionally falls into deadlock. The reason is not clear, however, this patch fixes this problem anyway.
This commit is contained in:
parent
744b90c996
commit
92e2c1ad9d
@ -168,8 +168,12 @@ fhandler_console::set_unit ()
|
||||
if (created)
|
||||
con.owner = getpid ();
|
||||
}
|
||||
if (!created && shared_console_info && kill (con.owner, 0) == -1)
|
||||
con.owner = getpid ();
|
||||
if (!created && shared_console_info)
|
||||
{
|
||||
pinfo p (con.owner);
|
||||
if (!p)
|
||||
con.owner = getpid ();
|
||||
}
|
||||
|
||||
dev ().parse (devset);
|
||||
if (devset != FH_ERROR)
|
||||
|
Loading…
x
Reference in New Issue
Block a user