pre-deactivate - error if process running
Jeremy Lavergne
jeremy at lavergne.gotdns.org
Thu May 24 14:10:06 PDT 2012
> 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.
You can set the delay and maximum number of attempts.
> 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'?
I'm not sure, but have you checked with `launchctl list` to see if its output is useful?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 8796 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20120524/b92906e5/attachment.bin>
More information about the macports-dev
mailing list