When ran through php's shell_exec, following code does not respect nohup:
root@N76 ~
$ php -r "echo exec('nohup sleep 5 > NUL 2>&1 &');"
(5 seconds later)
root@N76 ~
When executed in terminal/command line, it works as expected:
root@N76 ~
$ nohup sleep 5 > NUL 2>&1 &
[1] 12176
root@N76 ~
Is this expected behavior for POSIX like environment on Windows, or I'm doing something wrong (except running this on Windows)?