eidheim / tiny-process-library

A small platform independent library making it simple to create and stop new processes in C++, as well as writing to stdin and reading from stdout and stderr of a new process
MIT License
338 stars 73 forks source link

Detach a process? #22

Closed jaw closed 7 years ago

jaw commented 7 years ago

Can this lib be used to start a process and then let it run while the parent exits?

eidheim commented 7 years ago

Yes we do this in https://github.com/eidheim/jucipp/blob/master/src/juci.cc#L88. If I remember correctly, if you start the process in a thread that you detach this will work at least on Posix systems. Let me know if this works in your case.