I'm working a bit with getting Pike to compile with MinGW. In pike_threadlib, when using NT_THREADS there is no th_kill. How solve that?
HTTPLoop/timeout.c uses th_kill, so a default-configured Pike doesn't compile otherwise under MinGW.
It should compile anyway since the definition of th_kill() in pike_threadlib.h is wrapped in a configure test.
On Tue, Nov 09, 2004 at 05:10:03PM +0100, Martin Nilsson (DivX Networks) @ Pike (-) developers forum wrote:
pike_threadlib, when using NT_THREADS there is no th_kill. How solve that?
There is TerminateThread() in Win32 API, but I doubt it can be used safely... Any non-isolated thread killed out of context (i.e. if not exited gracefully) is a danger to process. Not that it may cause segfaults, but resource leaks are most likely consequence...
Regards, /Al
In the last episode (Nov 09), Alexander Demenshin said:
On Tue, Nov 09, 2004 at 05:10:03PM +0100, Martin Nilsson (DivX Networks) @ Pike (-) developers forum wrote:
pike_threadlib, when using NT_THREADS there is no th_kill. How solve that?
There is TerminateThread() in Win32 API, but I doubt it can be used safely... Any non-isolated thread killed out of context (i.e. if not exited gracefully) is a danger to process. Not that it may cause segfaults, but resource leaks are most likely consequence...
th_kill is not used to terminate threads; it simply is a more focused version of kill() that lets you decide which thread will receive the signal. The signal still acts on the entire process, so SIGQUIT/SIGSTOP will affect all threads. The only place it is currently used is in modules/HTTPLoop/timeout.c, to send SIGCLD to a thread. Regular win32 pike seems to work well enough without it, so mingw pike should be able to also.
pike-devel@lists.lysator.liu.se