I think the documentation is somewhat sparse in this matter. If there is no such ticket, write a file to improve the API documents.
processExited is called when a process exits formal process control, i.e. called exit() or returned from main() .
However, this is not always what you want. Sometimes a process spawns a subprocess, breaks away from its stdin and stdout, delegates responsibility for creating the data that you (in this case, the spawning parent process), and then exit() , because it was setting up.
processEnded is called when a process completes and completes all I / O operations in managed file descriptors ( stdin , stdout and childFDs ), and they were closed. If you are creating something just to read your output, this is the notification that you most likely care about.
Glyph
source share