def _installHandlerUsingSignal(fd):
 if (fd == (-1)):
  previous = signal.signal(signal.SIGCHLD, signal.SIG_DFL)
 else:
  previous = signal.signal(signal.SIGCHLD, _Handler(fd))
 if isinstance(previous, _Handler):
  return previous.fd
 return (-1)

def _installHandlerUsingSignal ( fd ) : if ( fd == ( - 1 ) ) : previous = signal . signal ( signal . SIGCHLD , signal . SIG_DFL ) else : previous = signal . signal ( signal . SIGCHLD , _Handler ( fd ) ) if isinstance ( previous , _Handler ) : return previous . fd return ( - 1 )
install a signal handler which will write a byte to c{fd} when i{sigchld} is received .