{"id":112,"date":"2008-08-17T21:43:20","date_gmt":"2008-08-18T02:43:20","guid":{"rendered":"http:\/\/vgable.com\/blog\/2008\/08\/17\/launchctl-gotcha\/"},"modified":"2008-08-17T21:43:22","modified_gmt":"2008-08-18T02:43:22","slug":"launchctl-gotcha","status":"publish","type":"post","link":"https:\/\/vgable.com\/blog\/2008\/08\/17\/launchctl-gotcha\/","title":{"rendered":"launchctl Gotcha"},"content":{"rendered":"<p>On Mac OS X 10.5, the <code><a href=\"http:\/\/developer.apple.com\/macosx\/launchd.html\">launchd<\/a><\/code> you talk to as non-root user is <em>not<\/em> the same <code>launchd<\/code> you talk to when root.  So<br \/>\n<code>$ launchctl list<\/code><br \/>\n<code>$ sudo launchctl list<\/code><br \/>\nprint out different lists, and <strong>the unprivileged `<code>launchctl list<\/code>` contains processes that the root-`<code>launchctl list<\/code>`  does <em>not<\/em> know about<\/strong>.  So running a <code>launctl<\/code> command as root may cause it to fail.<\/p>\n<p>I have never seen another UNIX-ish tool that would fail when run as root, but succeed otherwise.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On Mac OS X 10.5, the launchd you talk to as non-root user is not the same launchd you talk to when root. So $ launchctl list $ sudo launchctl list print out different lists, and the unprivileged `launchctl list` contains processes that the root-`launchctl list` does not know about. So running a launctl command [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,3,4,9],"tags":[136,137,138],"class_list":["post-112","post","type-post","status-publish","format-standard","hentry","category-bug-bite","category-macosx","category-programming","category-unix","tag-launchctl","tag-launchd","tag-root"],"_links":{"self":[{"href":"https:\/\/vgable.com\/blog\/wp-json\/wp\/v2\/posts\/112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vgable.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vgable.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vgable.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vgable.com\/blog\/wp-json\/wp\/v2\/comments?post=112"}],"version-history":[{"count":0,"href":"https:\/\/vgable.com\/blog\/wp-json\/wp\/v2\/posts\/112\/revisions"}],"wp:attachment":[{"href":"https:\/\/vgable.com\/blog\/wp-json\/wp\/v2\/media?parent=112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vgable.com\/blog\/wp-json\/wp\/v2\/categories?post=112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vgable.com\/blog\/wp-json\/wp\/v2\/tags?post=112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}