{"action":"created","issue":{"url":"https://api.github.com/repos/tornadoweb/tornado/issues/1585","labels_url":"https://api.github.com/repos/tornadoweb/tornado/issues/1585/labels{/name}","comments_url":"https://api.github.com/repos/tornadoweb/tornado/issues/1585/comments","events_url":"https://api.github.com/repos/tornadoweb/tornado/issues/1585/events","html_url":"https://github.com/tornadoweb/tornado/issues/1585","id":117278761,"number":1585,"title":"Subprocess wait_for_exit Error on Windows","user":{"login":"elveatles","id":1939423,"avatar_url":"https://avatars.githubusercontent.com/u/1939423?v=3","gravatar_id":"","url":"https://api.github.com/users/elveatles","html_url":"https://github.com/elveatles","followers_url":"https://api.github.com/users/elveatles/followers","following_url":"https://api.github.com/users/elveatles/following{/other_user}","gists_url":"https://api.github.com/users/elveatles/gists{/gist_id}","starred_url":"https://api.github.com/users/elveatles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elveatles/subscriptions","organizations_url":"https://api.github.com/users/elveatles/orgs","repos_url":"https://api.github.com/users/elveatles/repos","events_url":"https://api.github.com/users/elveatles/events{/privacy}","received_events_url":"https://api.github.com/users/elveatles/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-17T04:09:31Z","updated_at":"2015-11-17T04:15:05Z","closed_at":null,"body":"If I create a tornado Subprocess and wait for it to exit, I get this error: \r\n\r\n> ERROR:tornado.application:Future exception was never retrieved: Traceback (most recent call last):\r\n> File \"C:\\Python27\\Lib\\site-packages\\tornado\\gen.py\", line 230, in wrapper\r\n>    yielded = next(result)\r\n> File \"C:\\test.py\",\r\n>    yield proc.wait_for_exit()\r\n> File \"C:\\Python27\\Lib\\site-packages\\tornado\\process.py\", line 290, in wait_for_exit\r\n>    self.set_exit_callback(callback)\r\n> File \"C:\\Python27\\Lib\\site-packages\\tornado\\process.py\", line 262, in set_exit_callback\r\n>    Subprocess.initialize(self.io_loop)\r\n> File \"C:\\Python27\\Lib\\site-packages\\tornado\\process.py\", line 310, in initialize\r\n>    signal.SIGCHLD,\r\n> AttributeError: 'module' object has no attribute 'SIGCHLD'\r\n\r\nSo I guess Windows does not have SIGCHLD. Does this mean wait_for_exit is not supported on Windows?"},"comment":{"url":"https://api.github.com/repos/tornadoweb/tornado/issues/comments/157263480","html_url":"https://github.com/tornadoweb/tornado/issues/1585#issuecomment-157263480","issue_url":"https://api.github.com/repos/tornadoweb/tornado/issues/1585","id":157263480,"user":{"login":"bdarnell","id":160562,"avatar_url":"https://avatars.githubusercontent.com/u/160562?v=3","gravatar_id":"","url":"https://api.github.com/users/bdarnell","html_url":"https://github.com/bdarnell","followers_url":"https://api.github.com/users/bdarnell/followers","following_url":"https://api.github.com/users/bdarnell/following{/other_user}","gists_url":"https://api.github.com/users/bdarnell/gists{/gist_id}","starred_url":"https://api.github.com/users/bdarnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdarnell/subscriptions","organizations_url":"https://api.github.com/users/bdarnell/orgs","repos_url":"https://api.github.com/users/bdarnell/repos","events_url":"https://api.github.com/users/bdarnell/events{/privacy}","received_events_url":"https://api.github.com/users/bdarnell/received_events","type":"User","site_admin":false},"created_at":"2015-11-17T04:15:05Z","updated_at":"2015-11-17T04:15:05Z","body":"Probably not. \r\n\r\nAs an alternative, pass `stdout=tornado.process.STREAM` when creating the process and use `yield proc.stdout.read_until_close()`. In most cases a child process will close stdout when it exits, so this will be essentially equivalent. "}}