{"issue":{"created_at":"2011-12-13T15:44:36Z","state":"open","updated_at":"2011-12-13T16:02:44Z","user":{"gravatar_id":"1bfb3821f416339b291b6f3b0102689c","id":660469,"url":"https://api.github.com/users/LeeKamentsky","login":"LeeKamentsky","avatar_url":"https://secure.gravatar.com/avatar/1bfb3821f416339b291b6f3b0102689c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":4,"body":"Subimager should have some sort of keep-alive mechanism that connects it with its parent. For instance, it could take a switch that gave the parent's PID or it could do a TCP connect to the parent and check for TCP termination.","assignee":null,"id":2538100,"number":2,"labels":[],"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"title":"Subimager must exit if its parent process no longer exists","closed_at":null,"html_url":"https://github.com/CellProfiler/subimager/issues/2","url":"https://api.github.com/repos/CellProfiler/subimager/issues/2","milestone":null},"action":"created","comment":{"created_at":"2011-12-13T16:02:44Z","updated_at":"2011-12-13T16:02:44Z","user":{"gravatar_id":"1bfb3821f416339b291b6f3b0102689c","id":660469,"url":"https://api.github.com/users/LeeKamentsky","login":"LeeKamentsky","avatar_url":"https://secure.gravatar.com/avatar/1bfb3821f416339b291b6f3b0102689c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Probably this or a similar strategy with TCP. You can get the child's \nstdin from POpen in Python and that should be stable.\n\nOn 12/13/2011 11:00 AM, Thouis (Ray) Jones wrote:\n> How about a thread reading on stdin which is a pipe from the parent (we have to keep this in a non-gc()d global on the parent side).  Parent never writes to said pipe.  If parent exits, read will return -1.\n>\n> ---\n> Reply to this email directly or view it on GitHub:\n> https://github.com/CellProfiler/subimager/issues/2#issuecomment-3124845","id":3124883,"url":"https://api.github.com/repos/CellProfiler/subimager/issues/comments/3124883"}}