4 ms·
Hence the interrobang in the title. I hope that someone smarter than me can alleviate those two issues.
by jeroenjanssens 12y ago
Hence the interrobang in the title. I hope that someone smarter than me can alleviate those two issues.
- laumars 12y agoWithout looking at the code, I'd guess these two issues are actually just symptoms of the same problem. It will be down to the way you're shell executing your commands. Python isn't my strongest language, but there will be other ways to launch an external process while forwarding STDERR / STDOUT streams in real time. Maybe instead of forking a shell, run the command as a process. You can still execute from within a shell using -c flag, eg $ bash -c 'export a=$(echo "hello world"); echo $a' hello world $ echo $a # demonstrates that the envs aren't passed backwards $ If you do this then you need to be careful about your quotes / escaping. But it would still be less work than reinventing a Bash script parser.