[Buildbot] #3512: [windows] pid file missing

Buildbot trac trac at buildbot.net
Sun May 8 13:25:46 UTC 2016


#3512: [windows] pid file missing
-----------------------------+------------------------
Reporter:  xonqnopp          |       Owner:
    Type:  defect            |      Status:  new
Priority:  patches-accepted  |   Milestone:  undecided
 Version:  0.8.12            |  Resolution:
Keywords:  windows pid       |
-----------------------------+------------------------

Comment (by rutsky):

 Related Twisted issues:
 https://twistedmatrix.com/trac/ticket/2646
 https://twistedmatrix.com/trac/ticket/4073

 Looks like Twisted on Windows doesn't support daemonization — Windows is
 not POSIX complaint and requires custom approach for launching processes
 as daemons.

 I don't think it's feasible to wait for daemonization on Windows support
 in Twisted (just look at how stale are those bugs), so we need to handle
 this issue at our side.

 Currently Buildbot master/worker on Windows just don't daemonize, so we
 can say that on Windows master and workers are effectively run with
 `--nodaemon` and raise error if commands like `stop` or `restart` are used
 (they don't work anyway).

 Other option would be to try some cheap solution that will look like
 daemonization, e.g. spawning `twistd` script with
 [https://docs.python.org/2.7/library/os.html?highlight=detach#os.P_DETACH
 os.P_DETACH] and explicitly writing/reading pid files.
 This will not be proper daemonization (I believe such "daemons" won't
 survive user logoff/logon on Windows), but this will good enough for local
 testing/developing on Windows (and for e2e tests that I'm trying to
 implement).

 @xonqnopp I see in SO question that you added workaround for PID file
 creation, can you share your code and experience of how good/bad you
 solution works?

--
Ticket URL: <http://trac.buildbot.net/ticket/3512#comment:3>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the bugs mailing list