{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/10420","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/10420/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/10420/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/10420/events","html_url":"https://github.com/JuliaLang/julia/issues/10420","id":60109526,"number":10420,"title":"pid of child Process","user":{"login":"StefanKarpinski","id":153596,"avatar_url":"https://avatars.githubusercontent.com/u/153596?v=3","gravatar_id":"","url":"https://api.github.com/users/StefanKarpinski","html_url":"https://github.com/StefanKarpinski","followers_url":"https://api.github.com/users/StefanKarpinski/followers","following_url":"https://api.github.com/users/StefanKarpinski/following{/other_user}","gists_url":"https://api.github.com/users/StefanKarpinski/gists{/gist_id}","starred_url":"https://api.github.com/users/StefanKarpinski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefanKarpinski/subscriptions","organizations_url":"https://api.github.com/users/StefanKarpinski/orgs","repos_url":"https://api.github.com/users/StefanKarpinski/repos","events_url":"https://api.github.com/users/StefanKarpinski/events{/privacy}","received_events_url":"https://api.github.com/users/StefanKarpinski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-06T14:38:56Z","updated_at":"2015-03-06T22:44:17Z","closed_at":null,"body":"We don't currently expose any way of getting the PID of a child process. Arguably, this is a system-level detail that we may not want people to program to, but it should be possible to get. Currently, on a 64-bit system you can do this:\r\n\r\n```jl\r\nfunction pid(proc::Base.Process)\r\n    proc.handle != C_NULL || error(\"process not running\")\r\n    int(unsafe_load(convert(Ptr{Uint32}, proc.handle + 72)))\r\nend\r\n```\r\n\r\nObviously not ideal. This also errors if the process has already finished when you call it, which can be unpredictable. What's a good API to this? Should we fold `getpid` into it as a zero-argument version?"},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/77650265","html_url":"https://github.com/JuliaLang/julia/issues/10420#issuecomment-77650265","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/10420","id":77650265,"user":{"login":"JeffBezanson","id":744556,"avatar_url":"https://avatars.githubusercontent.com/u/744556?v=3","gravatar_id":"","url":"https://api.github.com/users/JeffBezanson","html_url":"https://github.com/JeffBezanson","followers_url":"https://api.github.com/users/JeffBezanson/followers","following_url":"https://api.github.com/users/JeffBezanson/following{/other_user}","gists_url":"https://api.github.com/users/JeffBezanson/gists{/gist_id}","starred_url":"https://api.github.com/users/JeffBezanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeffBezanson/subscriptions","organizations_url":"https://api.github.com/users/JeffBezanson/orgs","repos_url":"https://api.github.com/users/JeffBezanson/repos","events_url":"https://api.github.com/users/JeffBezanson/events{/privacy}","received_events_url":"https://api.github.com/users/JeffBezanson/received_events","type":"User","site_admin":false},"created_at":"2015-03-06T22:44:17Z","updated_at":"2015-03-06T22:44:17Z","body":"That sounds worthwhile. I can spare 4 bytes of memory."}}