// Locate on list and remove
tPTY **prev_np;
- if( pty->NumericName == 0 ) {
+ if( pty->NumericName == -1 ) {
RWLock_AcquireWrite(&glPTY_NamedPTYs);
prev_np = &gpPTY_FirstNamedPTY;
}
}
// Clean up lock
- if( pty->NumericName == 0 ) {
+ if( pty->NumericName == -1 ) {
RWLock_Release(&glPTY_NamedPTYs);
giPTY_NamedCount --;
}
giPTY_NumCount --;
}
+ // TODO: Send SIGHUP to controly PGID?
+
// If there are no open children, we can safely free this PTY
if( pty->ClientNode.ReferenceCount == 0 ) {
free(Node);