utils icon indicating copy to clipboard operation
utils copied to clipboard

Detach Helper

Open Mzack9999 opened this issue 1 year ago • 0 comments

Description

Implement a new package with the capability to run code portions in detached mode from the original process:

detach.Run(func f() {
    ...
})

Possible approaches:

  • Double fork(..) (original process => fork => fork)
  • Use os.StartProcess and then process.Release() with syscall.SysProcAttr{Noctty:true} attribute (ref. https://stackoverflow.com/questions/23031752/start-a-process-in-go-and-detach-from-it)

Mzack9999 avatar Feb 22 '24 00:02 Mzack9999