Open sugar84 opened 12 years ago
This is weird indeed.
Can you tell me more about your environment? OS, kernel, perl version?
Seems like some streams are not reported as closed by mojo::ioloop (
However, you're having a bug in your code.
If you're spawning a sub it's return value will be returned in result structure, not stdout/stderr; so line 13 should be:
return "_\__hello world!__/_";
Bug? Are sure? I use "spawn", not "spawn_sub", and in your test you are doing the same thing. And send data to stdout, and MojoX::Run catches it.
On server: perl 5.10.0, Mojolicious 1.11, Linux 2.6.33.2, there is running first snippet of code
On desktop: perl 5.12.4, Mojolicious 1.11, Linux 3.0.4, there i've run this script
But why DESTROY was triggered? The object was not flushed, ref count is >= 1. And kills were made from DESTROY
oh, you're right :)
ok =) Please, take look at this script at the END section. You will see that 2 of 7 process got KILL signal. In my real app i had 3 of 5 killed processes before they print result to STDOUT. Is it bug? If yes how to fix it? Can you produce this behavior on your own machine?
Hello, Brane.
I have this code and have some problems with it, it has started 4 processes and 2 of them killed (exit_signal => 9). Why does this triggered? And piece of stdout is broken (odd symbols), but it's less problem, because it is simply solved with RE. And why some of process had killed by SIGKILL? It's a bug? Why DESTROY method started with ref_count to object about 4?
And in this script in my desktop i had in 7 processe 1-2 killed. Can you explain this behavior? In this small example proccesses after kill made stdout, but in real app when message is larger, stdout after kill was blank. And code did not work well.
Best regards, Anton Ukolov