From: John Hodge Date: Sat, 27 Jul 2013 10:26:15 +0000 (+0800) Subject: Kernel/PTYs - Fixed server-end of user closing prematurely X-Git-Tag: rel0.15~323 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=01f3ca563b67a2d0f9171b2a301aff1dfebe1465;p=tpg%2Facess2.git Kernel/PTYs - Fixed server-end of user closing prematurely --- diff --git a/KernelLand/Kernel/drv/pty.c b/KernelLand/Kernel/drv/pty.c index 8f4302d2..3b59c7e4 100644 --- a/KernelLand/Kernel/drv/pty.c +++ b/KernelLand/Kernel/drv/pty.c @@ -519,8 +519,11 @@ tVFS_Node *PTY_FindDir(tVFS_Node *Node, const char *Name, Uint Flags) } RWLock_Release(&glPTY_NamedPTYs); } - if( ret ) - return (isServer ? &ret->ServerNode : &ret->ClientNode); + if( ret ) { + tVFS_Node *retnode = (isServer ? &ret->ServerNode : &ret->ClientNode); + retnode->ReferenceCount ++; + return retnode; + } else return NULL; }