Tracking exec node spawn PIDs

The exec node PID is propagated via the status node in the status.text property, however, there is no context, other than the originating exec node.

When executing different types of commands (and i mean a lot of them), there is no way to keep track which PID is responsible for which process. Would it be possible to add the PID to the std out/return code output as well, as a property (something like msg._pid) ?

Well it could, but nothing comes out of those outputs until after the command has finished, whereas you may need the pid when it starts if you need to monitor/kill it

Indeed by default I think i don't need the pid (although it still wouldn't hurt, in case it hangs somewhere), but I was referring to the spawn mode.

In spawn mode it still wouldn’t appear until the command sends something. Would that be ok ?

I think so yes, that would be great. I will use a different property for the actual command, so that the complete command + pid would be/remain available in the msg that can be used as reference.

of course you should be able to add your own msg.property and it should be preserved if you need to track requests.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.