Merge pull request #17403 from lllusion3469/patch-1

Change atom.sh not to spawn a sleep process every second on --wait
This commit is contained in:
Max Brunsfeld
2018-05-29 14:30:51 -07:00
committed by GitHub

View File

@@ -148,6 +148,15 @@ trap 'on_die' SIGQUIT SIGTERM
# If the wait flag is set, don't exit this process until Atom tells it to.
if [ $WAIT ]; then
WAIT_FIFO="$ATOM_HOME/.wait_fifo"
while true; do
[ -f "$WAIT_FIFO" ] && rm "$WAIT_FIFO"
[ ! -p "$WAIT_FIFO" ] && mkfifo "$WAIT_FIFO"
read < "$WAIT_FIFO" || break
sleep 1 # prevent a tight loop
done
# fall back to sleep
while true; do
sleep 1
done