I believe write would get a SIGPIPE if the read end of the pipe closes.  The parent class `BgJob` passes resets SIGPIPE to SIG_DFL by passing in a preexec_fn to Popen, because apparently Python ignores SIGPIPE by default.  There is a description [here](http://blog.nelhage.com/2010/02/a-very-subtle-bug/)  with explains why SIGPIPE is needed.