killWorker :: Worker -> IO ()
killWorker worker =
    do s <- trivCommand worker killPacket
       if s
          then do sClose $ worker_fd worker
                  writeIORef (worker_alive worker) False
                  modifyIORef nrForkedWorkers $ \x -> x - 1
          else error "can't kill worker?"
killWorker :: Worker -> IO ()
killWorker worker =
    do s <- trivCommand worker killPacket
       if s
          then do sClose $ worker_fd worker
                  writeIORef (worker_alive worker) False
                  modifyIORef nrForkedWorkers $ \x -> x - 1
          else error "can't kill worker?"
killWorker worker =
    do s <- trivCommand worker killPacket
       if s
          then do sClose $ worker_fd worker
                  writeIORef (worker_alive worker) False
                  modifyIORef nrForkedWorkers $ \x -> x - 1
          else error "can't kill worker?"