Detach from running process

96 Views Asked by At

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?

1

There are 1 best solutions below

0
Scott Hunter On BEST ANSWER

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