pre-deactivate - error if process running

Craig Treleaven ctreleaven at cogeco.ca
Thu May 24 14:02:41 PDT 2012


Hi:

I'd like to add a check to my in-progress portfile, testing whether 
the main server process ("mythbackend") is running and refusing to 
deactivate if so.  The reason is that launchd will keep trying to 
restart the missing program every 10 seconds--apparently without end! 
Floods the console log with messages even though there is little 
other harm.

I've searched around a bit and can't find any ports that seem to do 
that sort of test.  Could someone point me to some sample code?  I 
suppose something like 'ps -Ac | grep interestingprogram'?

Thanks,

Craig


More information about the macports-dev mailing list