Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Change atom.sh not to spawn a sleep process every second on --wait #17403
Description of the Change
As sleep(1) is not a bash builtin, every second a new process is spawed.
Why Should This Be In Core?
not possible otherwise
Those sleep processes can be annoying in e.g.
e: does consume stdin, though I don't see how that is a problem
May 29, 2018
referenced this pull request
Jun 5, 2018
Version 1.28.2 of atom (which doesn't have this change) works fine as my git commit editor. Version 1.29.0 does not - git commit hangs indefinitely waiting for the editor to finish. I am not convinced this change is what causes the problem - but it does seem the most likely point to start looking.
What diagnostics would be useful to identify what is causing the problem?
Also, belated thanks to @maxbrunsfeld for fixing my mistake completely breaking platforms other than linux.
Sorry for the belated reply. The problem is on my work computer, and the weekend got in the way.
Operating system is Ubuntu 14.04. uname -a says:
None of the environment variables are set.
I installed atom with
I can get you the corresponding output for atom 1.29.0 if that would be helpful.
Ah HA! Brilliant thanks. I can patch that in no problem. Martin…
On Sun, 2 Dec 2018 at 00:09, lllusion3418 ***@***.***> wrote: I finally came around to installing a VM on Ubuntu 14.04 and I can indeed replicate this with Atom 1.29.0... Fiddling around with /usr/bin/atom seems to indicate that is this PR that caused it: Removing read < "$WAIT_FIFO" fixes it and so does read <> "$WAIT_FIFO". It seems this is due to a change in behavior in bash. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#17403 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/APK5U98QDvsF5fLfh1hScXEFZIXHYkf_ks5u0wwLgaJpZM4UMR9J> .
Edited version of my deleted comment:
though it kind of goes against the point of this PR
the version I would prefer, though I don't know why it works.
I don't really want to create a PR to fix this as long as I don't know what causes this.
I still don't get why this is happening, but:
As Ubuntu 14.04 is still supported, you might have success contacting them (though I'm not too familiar with their rules) as it's clearly a bug in bash (even dash handles this correctly), that's even been fixed upstream.
Though it might still be appropriate to implement a simple workaround (e.g.
Edit: also here's a simpler script demonstrating the problem:
#!/usr/bin/env bash trap 'echo trap; exit 0' TERM echo "PID: $$" true < /tmp/fifotest