Пример #1
0
/****************************************************************************
**
*F  KillChild(<stream>) . . . . . . . . . . . . . . . .  kill the child process
*/
void KillChild (UInt stream)
{
    if ( PtyIOStreams[stream].childPID != -1 )
    {
        close(PtyIOStreams[stream].ptyFD);
        SignalChild( stream, SIGKILL );
    }
}
Пример #2
0
Obj FuncSIGNAL_CHILD_IOSTREAM( Obj self, Obj stream , Obj sig)
{
  UInt pty = INT_INTOBJ(stream);
  while (!PtyIOStreams[pty].inuse)
    pty = INT_INTOBJ(ErrorReturnObj("IOSTREAM %d is not in use",pty,0L,
                                    "you can replace stream number <num> via 'return <num>;'"));
  /* Don't check for child having changes status */
  SignalChild( pty, INT_INTOBJ(sig) );
  return 0;
}
Пример #3
0
/****************************************************************************
**
*F  KillChild(<stream>) . . . . . . . . . . . . . . . .  kill the child process
*/
void KillChild (UInt stream)
{
    HashLock(PtyIOStreams);
    if ( PtyIOStreams[stream].childPID != -1 )
    {
        close(PtyIOStreams[stream].ptyFD);
        SignalChild( stream, SIGKILL );
    }
    HashUnlock(PtyIOStreams);
}