-
I have not used Subprocess before so probably missing something basic. In this code snippet I would expect to see debug message "DOES NOT GET HERE":
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I assume Context is also important. This seems like it's in Mojolicious application context so the IOLoop should already be running. If it was not, you would have to run it in order for the subprocess to be executed. |
Beta Was this translation helpful? Give feedback.
I assume
Mojo::IOLoop->Subprocess
is a typo. Regardless you should create it usingMojo::IOLoop->subprocess(sub {}, sub {})
, or better yetMojo::IOLoop->subprocess->run_p
: https://metacpan.org/pod/Mojo::IOLoop#subprocessContext is also important. This seems like it's in Mojolicious application context so the IOLoop should already be running. If it was not, you would have to run it in order for the subprocess to be executed.