I'm getting the weird error, trying to figure it out since a day with no clue.
I've a script at /home/myname/script.php which contains
<?php
while(True) {
echo "You said: ".$argv[1];
sleep(5);
}
When I run directly on terminal like this:
/usr/bin/php /home/myname/script.php hello
I'm getting the expected output and the script doesn't stop. But if I do
/usr/bin/php /home/myname/script.php hello &
it is stopping immediately instead of running in background, like this.
[1]+ Stopped /usr/bin/php /home/myname/script.php hello
Any ideas why?
nohupsolved the problem. But it is supposed to run withoutnohup, right?