I want to run an external process in Julia for a given amount of time (say 10 seconds) and capture its output.
I tried something like readchomp(`timeout 5 sleep 10`) (substitute sleep 10 by an arbitrary external process). However, a ProcessFailedException is thrown if the process was killed by timeout and I can not read the output of the program it produced until it was killed.