I have a C# console app that I've created that amongst other things runs a (sub?) process. When using the exec node to run the compiled binary the process that the exe creates seems to get picked up by node red. Can see the process id change and get two messages with the same msg id, one for when each process completes even though the node is set for only on completion. Does anyone had experience with this?
This was the closest discussion I could find but was in regards to python and didn't seem to give me any ideas of things to try.
https://discourse.nodered.org/t/exec-node-send-an-output-payload-on-more-than-one-message/74590
Whilst I know .NET - I don't full understand, Node JS's process module, but 1 thing to maybe look at..
Is the Process
object in .NET set to RedirectStandardOutput = false
- that might explain why you are seeing the messages from the other process's? - as its bubbling up into Node, and not being handled by your parent process?
RedirectStandardOutput = true;
RedirectStandardError = true;
Yea I caught that when I was testing it without node-red as the sub process has a lot of useless output.
On the premise you are handling the Process's output (RedirectStandardOutput = true
), better wait for some other folk with more Node JS Process xp
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.