go-daemon icon indicating copy to clipboard operation
go-daemon copied to clipboard

Cobra incorpration

Open papidb opened this issue 4 years ago • 2 comments

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.

papidb avatar May 06 '20 12:05 papidb

Hi @papidb ,

Could you please demonstrate the issue?

Thanks!

deniszh avatar May 24 '21 20:05 deniszh

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
}

harryzcy avatar Sep 03 '21 03:09 harryzcy