Closed sdirkse67 closed 1 year ago
I think this is all expected. processx sets the stdout of dumper
, but if you want to start another process and receive the output of that, then that process will have to inherit stdout. I don't think processx can do anything about this.
But please tell me if I am missing something.
I have a failure in a process that is started via
process$new('dumper',stdout='|')
that only happens with stdout sent to a pipe. If I take off thestdout
arg things work OK. Perhaps this is an issue with processx that can be addressed. Or perhaps I am doing something wrong with my dumper code. Any insights or help appreciated.The executable
dumper.exe
calls a windows batch filedd.cmd
, and the batch file redirects stdout to a file. Callingdumper.exe
from a Windows command prompt works, but calling it as below fails:The redirection inside the cmd file fails: this is reflected in the exitcode of 1. If I adjust dumper.c to run with inheritHandles=TRUE and leave the USESTDHANDLES bit alone, it works as hoped. But for other reasons we want to run with inheritHandles=FALSE.
dumper.c.txt
The content of dd.cmd: