Multicast Manager dies after cancelling a task



  • Hi,
    I noticed part of the Multicast task failing to work, was due to FOGMulticastManager just stating it is running and somehow it is not. A restart gets things back to ‘normal’ but leaving many child processes still running.

    Tracking the cause, removed the @ at @posix_kill and found that …the php package is not installed ! (on the httpd/error_log )

    As I work on CentOS, the partial solution was to install php-process, which includes the php posix_ functions.
    I did not found any similar package for Ubuntu/Debian.

    Still, the manager now kills the main process created to attend a multicast task, but leaves the first childs created waiting to stream (cat … d1p1.img | udp-sender …)

    I googled a bit, as I am not an skilled php programmer, and found on the php doc’s that neither posix_kill, nor proc_terminate kills the childs of the processes created from the php script.

    So the fix would be to look for the processes childs (the childs of “sh -c …” ) looking for the PID as PPID, and kill them in a loop, and then kill the PID.

    I should not that using posix_kill adds a dependency on php-process, that should be resolved at install time, or …decline the use of posix_xxx functions in favor of proc_ alike. But …then how to kill the childs as they have no proc_reference ?

    I will try a fix using poxix_kill to get rid of the childs, as a workaround.

    OS: CentOS 6.5
    FOG: 1.2.0


  • Senior Developer

    I’ve added a function now, SVN 2381, that seems to do the trick nicely.

    Thanks for reporting.


 

358
Online

41.8k
Users

12.3k
Topics

116.0k
Posts