Re^5: thread save calling an external commandby BrowserUk (Patriarch)
|on Jul 06, 2016 at 12:54 UTC||Need Help??|
I have chosen to use backticks while the thread has to wait on the completion of the external command.
I also find backticks simplest for many purposes.
The primary advantage of using the piped-open is that it allows you to inject code -- time out; remote abort etc. -- into the read loop:
It's not perfect. If the child process stops producing output, it will hang at the read, but it is good for most things.
A similar thing can be done directly on *nix.
My conclusion, do not use IPC::Run3 or Capture::Tiny in multi threaded scripts.
I concur. Though I would also go further and remove the qualification; both modules (and all the others attempting to do the same thing) are just so overcomplicated that they create more problems than they attempt (and fail) to solve.
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.