in reply to inconsistent eval timeout
You're trying to use the Unix signal handling model on Windows. Windows doesn't support signals, but Perl tries to provide some compatibility, though it varies depending on which perl you use. Strawberry perl has a lot less support for simulating unix than Cygwin perl does. (and I don't have experience with ActiveState)
But the first question is what should be expected to happen on Unix. I tested with sleep 20; vs. `sleep 20;`; and it appears that when the alarm goes off, it does not send any signal to the child process, only to the perl script. The child 'sleep' command goes on running which you can observe with ps fax | grep sleep from the terminal. So, assuming you plan was to interrupt the child process, it doesn't work on Unix and definitely won't work on Windows, where signals don't even exist.
Assuming "lp_solve" is a native windows program, you will need to use the Windows API to run and kill it. Try Proc::Background for a nice wrapper around Win32::Process.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: inconsistent eval timeout
by Sanjay (Sexton) on Nov 04, 2019 at 15:22 UTC |