go-daemon
go-daemon copied to clipboard
Cobra incorpration
Hey thanks for building this awesome project, but I've been having issues using this tool and cobra. If you have an example I can look into I would appreciate it. Thanks.
Hi @papidb ,
Could you please demonstrate the issue?
Thanks!
WasReborn()
can be used to check if it's the child process. Something like this could be used:
if daemon.WasReborn() {
// call Reborn(), defer Release(), etc... again
} else {
// run cobra logic as normal
}