php - Stopping a script and then restarting it? -


there's php script run command line. outputs various information terminal chugs along.

i want code restart trigger it, when called, (obviously) restarts script.

i thinking of making call other file , die(), , have other file call script, want script reload in same terminal.

is possible?

php has analogue signal c function called "pcntl_signal" lets set signal handlers.

in signal handler (e.g. sigusr1 or sigtstp) can restart code.

either:

a) encode entire body of php script in function, , have signal handler merely call function again

b) php script can exec [or exec $argv[0] ]

in either case, right after call, should call die


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -