Mm, give a try to Win32::Daemon for creating truly background processes. | [reply] |
I'm not quite sure whether Windows sends kill-like signals to running processes. Maybe you could catch the signal and let the script close itsself. | [reply] |
Already tried. No signals are sent (though tried to trap all possible)..
| [reply] |
You could write a C wrapper that responds to the message CTRL_LOGOFF_EVENT if running in a console or WM_QUERYENDSESSION and WM_ENDSESSION if running as a Window. I don't know how to write a callback in perl, maybe POE? | [reply] |
In fact, I'm struggling with C wrapper now.. But it turns out that WM_QUERYENDSESSION is sent only to visible windows (only catching it on Win98+ allows to kill a child in time, without getting that "close application" dialog to appear); but I don't want any window to be visible (and an icon inside a tray is not acceptable either)..
BTW, any hints how to make window to be visible from system POV, but invisible from user POV (e.g. offscreen windows or zero-sized windows?)
| [reply] |
| [reply] |
| [reply] |
I found a solution with a help of my colleague - I need to use 'wperl' instead of 'perl' for running my scripts! So simple.. | [reply] |
Not to be cruel... but I hope to hell by Win9x you mean Win98. Win95 is deprecated (as in Microsoft doesn't do anything for it anymore), and even Win98 is soon to follow. So, though this probably doesn't help you very much, I'd say upgrade to a newer version of Windows. *Relives the painful days of Windows 95*
| [reply] |
Yes, Win9x means Win98 and WinME. Unfortunately there is no luxury of ignoring Win98 and WinME for me.
| [reply] |