{"action":"created","issue":{"url":"https://api.github.com/repos/martine/ninja/issues/909","labels_url":"https://api.github.com/repos/martine/ninja/issues/909/labels{/name}","comments_url":"https://api.github.com/repos/martine/ninja/issues/909/comments","events_url":"https://api.github.com/repos/martine/ninja/issues/909/events","html_url":"https://github.com/martine/ninja/issues/909","id":55846305,"number":909,"title":"Don't start commands with the same terminal as Ninja","user":{"login":"jlnt","id":6315431,"avatar_url":"https://avatars.githubusercontent.com/u/6315431?v=3","gravatar_id":"","url":"https://api.github.com/users/jlnt","html_url":"https://github.com/jlnt","followers_url":"https://api.github.com/users/jlnt/followers","following_url":"https://api.github.com/users/jlnt/following{/other_user}","gists_url":"https://api.github.com/users/jlnt/gists{/gist_id}","starred_url":"https://api.github.com/users/jlnt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlnt/subscriptions","organizations_url":"https://api.github.com/users/jlnt/orgs","repos_url":"https://api.github.com/users/jlnt/repos","events_url":"https://api.github.com/users/jlnt/events{/privacy}","received_events_url":"https://api.github.com/users/jlnt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-29T02:10:47Z","updated_at":"2015-01-29T18:24:11Z","closed_at":null,"body":"On Linux at least, it looks like Ninja is starting commands in their own process group, but not in their own session.\r\n\r\nThe commands will run in the background but technically do have a terminal. Any access to the terminal will generate a SIGTTOU signal (which will stop the process). It's not a problem in general since commands are run without stdin/stdout/stderr pointing to the terminal (otherwise writing to stdout would SIGTTOU the process). However a process could open /dev/tty to access the terminal: instead of failing, this will succeed (as the process does indeed have a terminal) and it will be stopped if performing any ioctl.\r\n\r\nThis is causing some issues in Chromium/Mojo/Dart where \"git svn\" ends up calling the \"resize\" program which opens /dev/tty. The result is that \"ninja\" hangs because it transitively waits on a stopped process."},"comment":{"url":"https://api.github.com/repos/martine/ninja/issues/comments/72076570","html_url":"https://github.com/martine/ninja/issues/909#issuecomment-72076570","issue_url":"https://api.github.com/repos/martine/ninja/issues/909","id":72076570,"user":{"login":"nico","id":3487,"avatar_url":"https://avatars.githubusercontent.com/u/3487?v=3","gravatar_id":"","url":"https://api.github.com/users/nico","html_url":"https://github.com/nico","followers_url":"https://api.github.com/users/nico/followers","following_url":"https://api.github.com/users/nico/following{/other_user}","gists_url":"https://api.github.com/users/nico/gists{/gist_id}","starred_url":"https://api.github.com/users/nico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nico/subscriptions","organizations_url":"https://api.github.com/users/nico/orgs","repos_url":"https://api.github.com/users/nico/repos","events_url":"https://api.github.com/users/nico/events{/privacy}","received_events_url":"https://api.github.com/users/nico/received_events","type":"User","site_admin":false},"created_at":"2015-01-29T18:24:11Z","updated_at":"2015-01-29T18:24:11Z","body":"I thought the correct way was `isatty(0)`."}}