Tim Peters wrote: >=20 > [MAL] > > I'm no Win32 expert, just though that the code in the win32process > > module (which is part of win32all) probably already provides code in > > this area. >=20 > With a Win32 flavor, which isn't what I need here. There is no distinc= t > "wait for process" function in Win32, it's just another application of = the > very cool WaitFor{Single,Multiple}Object(s)[Ex] APIs (which can "wait" = for > sets of "handles" to "do something": kinda like Unix select(), except = not > braindead <wink>). >=20 > That's fine, but what I specifically needed (for a Zope Corp project) w= as a > Unixish waitpid() workalike. MS already did most of the work for that = in > their _cwait function, so it would be silly not to reuse it. BTW, a go= ogle > search suggested Borland also supports a cwait function, but I have nei= ther > a Borland compiler nor time to worry about that platform. You didn't w= orry > much about the Cray T3E when implementing Unicode either <wink>. Touch=E9 :-) > > Another candidate for Windows emulation would be os.kill(). > > win32process has TerminateProcess() which could probably be used > > for this (no idea however, how you get from a PID to a process handle > > on Windows). >=20 > I'm not looking for random functions to implement; if I *need* an > os.kill()-alike, I'll do one, but I don't expect the need. > TerminateProcess() is a dangerous function on Windows (read the docs). = If > you want to risk it, you go from process pid to process handle via the = Win32 > OpenProcess() function. Too bad, because I have will have a need for porting a multi-process application to Windows sometime soon :-) Here's an article I found on the topic: http://www.wdj.com/articles/1999/9907/9907c/9907c.htm What a hack... now I know why you don't want to use Win32 APIs ;-) --=20 Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4