Question: Detach from running process


Detach from running process

Answers 1
Added at 2017-01-01 16:01

I am facing a funny situation:

I'm developing a flashlight plugin to trigger an alarm at some point in the future.

The problem is, flashlight kills the script after 30 seconds. So I can neither wait long enough to activate the alarm nor play the alarm indefinitely until the user cancels it.

So, I am looking to find a way for the script to "detach" itself from (or otherwise prevent itself from being killed by) its parent process.

Could this be accomplished by daemonising itself?

nr: #1 dodano: 2017-01-01 16:01

I believe the term you are looking for is "fork", such as the one found in the os library.

Source Show
◀ Wstecz