[Zope-Coders] testDaemon.py failure
Shane Hathaway
shane@zope.com
Thu, 25 Apr 2002 15:43:48 -0400
Jeremy Hylton wrote:
>>>>>>"CW" == Chris Withers <chrisw@nipltd.com> writes:
>>>>>
>
> CW> Can whoever put the platform specific code in the HEAD version
> CW> of testDaemon.py sort it out please?
>
> So you're calling me "whoever" this week? Well, it wasn't me this
> time.
>
> It looks like the platform-dependent code has *always* been in
> zdaemon, but there were never any tests for zdaemon. I added a couple
> of tests for it on Monday, and the mere fact that we now have a test
> of zdaemon uncovers the long-standing problem.
>
> I'm not sure what needs to be done -- perhaps Shane can help, since he
> made the original checkin. Is zdaemon even used on Windows? Do we
> want it to work there?
>
> Toby added some calls recently that use posix.close(). We can easily
> change those to os.close(). But posix.setsid() is not available on
> Windows. I don't know what it does or whether it is crucial to have
> it.
I actually only translated it from a module to a package, so I'm not
100% sure, but I think zdaemon is intended only for POSIX-compliant
systems. So the zdaemon tests should probably be disabled if os.name !=
'posix'.
Shane