{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/5838","labels_url":"https://api.github.com/repos/golang/go/issues/5838/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/5838/comments","events_url":"https://api.github.com/repos/golang/go/issues/5838/events","html_url":"https://github.com/golang/go/issues/5838","id":51284271,"number":5838,"title":"syscall: use posix_spawn (or vfork) for ForkExec when possible","user":{"login":"jingweno","id":169064,"avatar_url":"https://avatars.githubusercontent.com/u/169064?v=3","gravatar_id":"","url":"https://api.github.com/users/jingweno","html_url":"https://github.com/jingweno","followers_url":"https://api.github.com/users/jingweno/followers","following_url":"https://api.github.com/users/jingweno/following{/other_user}","gists_url":"https://api.github.com/users/jingweno/gists{/gist_id}","starred_url":"https://api.github.com/users/jingweno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jingweno/subscriptions","organizations_url":"https://api.github.com/users/jingweno/orgs","repos_url":"https://api.github.com/users/jingweno/repos","events_url":"https://api.github.com/users/jingweno/events{/privacy}","received_events_url":"https://api.github.com/users/jingweno/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/golang/go/labels/Performance","name":"Performance","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/6","html_url":"https://github.com/golang/go/milestones/Unplanned","labels_url":"https://api.github.com/repos/golang/go/milestones/6/labels","id":1055141,"number":6,"title":"Unplanned","description":"No plan to fix in any specific release.\r\n","creator":{"login":"rsc","id":104030,"avatar_url":"https://avatars.githubusercontent.com/u/104030?v=3","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"open_issues":1243,"closed_issues":228,"state":"open","created_at":"2015-04-06T20:47:19Z","updated_at":"2016-01-26T22:40:02Z","due_on":"2099-12-31T05:00:00Z","closed_at":null},"comments":23,"created_at":"2013-07-05T00:42:05Z","updated_at":"2016-01-27T01:58:34Z","closed_at":null,"body":"<pre>Why:\n\nAt a basic level posix_spawn(2) is a subset of fork(2). A new child process from\nfork(2): 1) gets an exact copy of everything that the parent process had in memory, and\n2) gets a copy of all the file descriptors that the parent process had open.\nposix_spawn(2) preserves #2, but not #1. In some cases, say, shelling out a command,\nit's unnecessary to get a copy of memory of the parent process. With copy-on-write, fork\nwill be less expensive but still, not necessary.\n\nWhat's out there:\n\n<a href=\"https://github.com/rtomayko/posix-spawn#benchmarks\">https://github.com/rtomayko/posix-spawn#benchmarks</a>\n\nI am wondering if it makes sense to have this API and let developers decide which one to\nuse (fork/exec vs. posix_spawn)</pre>"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/175341148","html_url":"https://github.com/golang/go/issues/5838#issuecomment-175341148","issue_url":"https://api.github.com/repos/golang/go/issues/5838","id":175341148,"user":{"login":"nadermx","id":7340380,"avatar_url":"https://avatars.githubusercontent.com/u/7340380?v=3","gravatar_id":"","url":"https://api.github.com/users/nadermx","html_url":"https://github.com/nadermx","followers_url":"https://api.github.com/users/nadermx/followers","following_url":"https://api.github.com/users/nadermx/following{/other_user}","gists_url":"https://api.github.com/users/nadermx/gists{/gist_id}","starred_url":"https://api.github.com/users/nadermx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nadermx/subscriptions","organizations_url":"https://api.github.com/users/nadermx/orgs","repos_url":"https://api.github.com/users/nadermx/repos","events_url":"https://api.github.com/users/nadermx/events{/privacy}","received_events_url":"https://api.github.com/users/nadermx/received_events","type":"User","site_admin":false},"created_at":"2016-01-27T01:58:34Z","updated_at":"2016-01-27T01:58:34Z","body":"Thank you so much, @redbaron your solution worked.  "}}