{"action":"created","issue":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/3737","repository_url":"https://api.github.com/repos/fish-shell/fish-shell","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/3737/labels{/name}","comments_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/3737/comments","events_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/3737/events","html_url":"https://github.com/fish-shell/fish-shell/issues/3737","id":200918653,"number":3737,"title":"external commands launched from a function may not be killed when fish receives a SIGHUP","user":{"login":"krader1961","id":7545917,"avatar_url":"https://avatars.githubusercontent.com/u/7545917?v=3","gravatar_id":"","url":"https://api.github.com/users/krader1961","html_url":"https://github.com/krader1961","followers_url":"https://api.github.com/users/krader1961/followers","following_url":"https://api.github.com/users/krader1961/following{/other_user}","gists_url":"https://api.github.com/users/krader1961/gists{/gist_id}","starred_url":"https://api.github.com/users/krader1961/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krader1961/subscriptions","organizations_url":"https://api.github.com/users/krader1961/orgs","repos_url":"https://api.github.com/users/krader1961/repos","events_url":"https://api.github.com/users/krader1961/events{/privacy}","received_events_url":"https://api.github.com/users/krader1961/received_events","type":"User","site_admin":false},"labels":[{"id":4724776,"url":"https://api.github.com/repos/fish-shell/fish-shell/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":{"login":"krader1961","id":7545917,"avatar_url":"https://avatars.githubusercontent.com/u/7545917?v=3","gravatar_id":"","url":"https://api.github.com/users/krader1961","html_url":"https://github.com/krader1961","followers_url":"https://api.github.com/users/krader1961/followers","following_url":"https://api.github.com/users/krader1961/following{/other_user}","gists_url":"https://api.github.com/users/krader1961/gists{/gist_id}","starred_url":"https://api.github.com/users/krader1961/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krader1961/subscriptions","organizations_url":"https://api.github.com/users/krader1961/orgs","repos_url":"https://api.github.com/users/krader1961/repos","events_url":"https://api.github.com/users/krader1961/events{/privacy}","received_events_url":"https://api.github.com/users/krader1961/received_events","type":"User","site_admin":false},"assignees":[{"login":"krader1961","id":7545917,"avatar_url":"https://avatars.githubusercontent.com/u/7545917?v=3","gravatar_id":"","url":"https://api.github.com/users/krader1961","html_url":"https://github.com/krader1961","followers_url":"https://api.github.com/users/krader1961/followers","following_url":"https://api.github.com/users/krader1961/following{/other_user}","gists_url":"https://api.github.com/users/krader1961/gists{/gist_id}","starred_url":"https://api.github.com/users/krader1961/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krader1961/subscriptions","organizations_url":"https://api.github.com/users/krader1961/orgs","repos_url":"https://api.github.com/users/krader1961/repos","events_url":"https://api.github.com/users/krader1961/events{/privacy}","received_events_url":"https://api.github.com/users/krader1961/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/fish-shell/fish-shell/milestones/4","html_url":"https://github.com/fish-shell/fish-shell/milestone/4","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/milestones/4/labels","id":130257,"number":4,"title":"fish-future","description":"These are issues that are not targeted for an upcoming minor or major release. After a release, we will re-examine these issues and pull any in that we think are good targets; that is retarget them to the next minor (or major) release.\r\n\r\nIf you can provide a fix for an issue in this milestone, we'll generally accept it for the next release even if the issue is not targeted for the release.","creator":{"login":"ridiculousfish","id":920838,"avatar_url":"https://avatars.githubusercontent.com/u/920838?v=3","gravatar_id":"","url":"https://api.github.com/users/ridiculousfish","html_url":"https://github.com/ridiculousfish","followers_url":"https://api.github.com/users/ridiculousfish/followers","following_url":"https://api.github.com/users/ridiculousfish/following{/other_user}","gists_url":"https://api.github.com/users/ridiculousfish/gists{/gist_id}","starred_url":"https://api.github.com/users/ridiculousfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ridiculousfish/subscriptions","organizations_url":"https://api.github.com/users/ridiculousfish/orgs","repos_url":"https://api.github.com/users/ridiculousfish/repos","events_url":"https://api.github.com/users/ridiculousfish/events{/privacy}","received_events_url":"https://api.github.com/users/ridiculousfish/received_events","type":"User","site_admin":false},"open_issues":393,"closed_issues":1,"state":"open","created_at":"2012-06-11T02:25:13Z","updated_at":"2017-01-17T01:13:19Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2017-01-16T02:34:20Z","updated_at":"2017-01-19T05:29:39Z","closed_at":null,"body":"This issue is derived from issue #3644. The core complaint is that programs like `ranger` and `fzf` may not be killed if launched from a function if fish dies because it's controlling tty becomes invalid.\r\n\r\nNotably, @Ambrevar, reports that when he attempt to kill the xterm that fails with fish writing this to the terminal:\r\n\r\n```\r\n> sh\r\nThere are still jobs active (use the jobs command to see them).\r\nA second attempt to exit will terminate them.\r\ntest: Missing argument at index 2\r\n> exit\r\n<E> fish: More than one job in foreground: job 1: “test (id -u) -eq 0” job 2: “id -u”\r\n<E> fish: Errors detected, shutting down. Break on sanity_lose() to debug.\r\n<E> fish: More than one job in foreground: job 1: “id -u” job 2: “sh”\r\n<E> fish: Errors detected, shutting down. Break on sanity_lose() to debug.\r\n```\r\n\r\nNote that @Ambrevar is doing `exec fish` from their *~/.bashrc* rather than make fish their login shell. Recent PR #3658 might be relevant but note that change was made several days after issue #3644 was opened.\r\n\r\n<strike>One known problem that is that `show_stacktrace()` cannot be used safely on the child side of a `fork()`. And we have at least one stack trace showing it being called in that situation (see the final comments on issue #3644). That should be fixed. That isn't going to be the root cause of this issue but is a contributing factor that at least makes it harder to debug.</strike>\r\n\r\nIt turns out my previous paragraph was in error. The `show_stacktrace()` call in question was made in the parent process which should be okay. That appears to be another manifestation of the glibc stdio bug when the fd is returning EIO."},"comment":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/comments/273685804","html_url":"https://github.com/fish-shell/fish-shell/issues/3737#issuecomment-273685804","issue_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/3737","id":273685804,"user":{"login":"krader1961","id":7545917,"avatar_url":"https://avatars.githubusercontent.com/u/7545917?v=3","gravatar_id":"","url":"https://api.github.com/users/krader1961","html_url":"https://github.com/krader1961","followers_url":"https://api.github.com/users/krader1961/followers","following_url":"https://api.github.com/users/krader1961/following{/other_user}","gists_url":"https://api.github.com/users/krader1961/gists{/gist_id}","starred_url":"https://api.github.com/users/krader1961/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krader1961/subscriptions","organizations_url":"https://api.github.com/users/krader1961/orgs","repos_url":"https://api.github.com/users/krader1961/repos","events_url":"https://api.github.com/users/krader1961/events{/privacy}","received_events_url":"https://api.github.com/users/krader1961/received_events","type":"User","site_admin":false},"created_at":"2017-01-19T05:29:39Z","updated_at":"2017-01-19T05:29:39Z","body":"Good news. I installed Ubuntu 16.10 which has glibc 2.24 and ncurses 6.0 (plus Ubuntu changes for both packages). I was able to reproduce the problem using @Ambrevar's instructions. I did not need urxvt. I simply ssh'd into the system, ran the function which invoked `ncdu`, then did a `kill $pid` where `$pid` was that of the parent fish shell for the ncdu process.\r\n\r\nIt shouldn't take much effort now to determine the root cause of this behavior. Which is not the same thing as saying a fix will be easy. "}}
{"actor":{"display_login":"krader1961"}}