[Computer-go] Zombie processes

Petr Baudis pasky at ucw.cz
Mon Oct 27 02:08:32 PDT 2014


  Hi!

On Sun, Oct 26, 2014 at 10:30:10AM +0000, Nick Wedd wrote:
> I wonder how practicable it would be for a bot, on startup, to search
> for other copies of itself running, and issue a warning if it finds any.

  I think it would be much easier in practice if the program made sure
it does not keep running when its parent process (kgsGtp) dies.  This
can happen in multiple ways - either by doing this explicitly,

	http://stackoverflow.com/questions/284325/how-to-make-child-process-die-after-parent-exits

has a couple of ideas, but even a much more elegant way is simply not
overriding SIGPIPE.  Then your process will get that signal when trying
to reply to a deceased kgsGtp and die automatically.

  I suspect these problems stem from disabling SIGPIPE which really
shouldn't be necessary for anything in this context anyway.

				Petr Baudis



More information about the Computer-go mailing list