Running job in the background from Perl WITHOUT waiting for return

后端 未结 5 942
盖世英雄少女心
盖世英雄少女心 2020-12-06 07:16

The Disclaimer

First of all, I know this question (or close variations) have been asked a thousand times. I really spent a few hours looking in the obvious and the

5条回答
  •  Happy的楠姐
    2020-12-06 07:47

    Managed to solve the problem. Apparently what was keeping it from returning was that calling the sender that way didn't disconnect the stdout. So, the solution was simply changing the system call to:

    system("php sender.php > /dev/null &");
    

    Thanks everybody for the help. In fact, it was while reading the whole story about "daemonizing" a process that I got the idea to disconnect the stdout.

提交回复
热议问题