kcrash, fork, and stdout/stderr
Thiago Macieira
thiago at kde.org
Tue Dec 5 15:46:50 UTC 2017
On Tuesday, 5 December 2017 04:12:30 PST David Faure wrote:
> I see. But how should one implement a crash handler that autorestarts an
> app, then, in a "standalone application" use case, i.e. no kdeinit or other
> daemon running in the background?
Wait, why are you forking in the first place?
Just exec the process again. It will replace the current process without
closing the pipes. The parent won't notice a thing.
Of course, that may be a problem: the parent may see the output from the child
process again.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
More information about the Kde-frameworks-devel
mailing list