{"id":1449,"date":"2009-05-07T13:55:58","date_gmt":"2009-05-07T16:55:58","guid":{"rendered":"http:\/\/brockerhoff.net\/bb\/viewtopic.php?p=2697"},"modified":"2010-05-08T10:54:07","modified_gmt":"2010-05-08T13:54:07","slug":"re-cocoa-musings-pt-6","status":"publish","type":"post","link":"https:\/\/brockerhoff.net\/blog\/2009\/05\/07\/re-cocoa-musings-pt-6\/","title":{"rendered":"Re: Cocoa musings pt.6"},"content":{"rendered":"<p><em>Posted by <strong>0xced<\/strong>:<\/em><\/p>\n<p><strong>Rainer Brockerhoff wrote:<\/strong><\/p>\n<blockquote>\n<pre><code>\u00a0 \u00a0[task launch]; \r\n\u00a0 \u00a0[NSApp terminate:nil];\r\n<\/code><\/pre>\n<p>No need to pass the calling program&#8217;s process identifier, and it works from Tiger (10.4) on up.<\/p><\/blockquote>\n<p>Although unlikely, the task may be faster to execute than [NSApp terminate:] and the relaunch process would thus fail. By listening to the termination of the calling process, you are guaranteed to always relaunch.<br \/>\n<strong>Edit:<\/strong> I&#8217;m wrong, Rainer just pointed to me that the task can&#8217;t terminate since its first line is a read on the input pipe and it will block there.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Posted by 0xced: Rainer Brockerhoff wrote: \u00a0 \u00a0[task launch]; \u00a0 \u00a0[NSApp terminate:nil]; No need to pass the calling program&#8217;s process identifier, and it works from Tiger (10.4) on up. Although unlikely, the task may be faster to execute than [NSApp terminate:] and the relaunch process would thus fail. By listening to the termination of the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4,19],"tags":[26,22],"class_list":["post-1449","post","type-post","status-publish","format-standard","hentry","category-dev","category-software","tag-cocoa","tag-xcode"],"featured_image_src":null,"author_info":{"display_name":"Rainer Brockerhoff","author_link":"https:\/\/brockerhoff.net\/blog\/author\/rbrockerhoff\/"},"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1q3Zc-nn","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/brockerhoff.net\/blog\/wp-json\/wp\/v2\/posts\/1449","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/brockerhoff.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/brockerhoff.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/brockerhoff.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/brockerhoff.net\/blog\/wp-json\/wp\/v2\/comments?post=1449"}],"version-history":[{"count":0,"href":"https:\/\/brockerhoff.net\/blog\/wp-json\/wp\/v2\/posts\/1449\/revisions"}],"wp:attachment":[{"href":"https:\/\/brockerhoff.net\/blog\/wp-json\/wp\/v2\/media?parent=1449"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/brockerhoff.net\/blog\/wp-json\/wp\/v2\/categories?post=1449"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/brockerhoff.net\/blog\/wp-json\/wp\/v2\/tags?post=1449"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}