Use a better way to safely launch a program in the background.

`$loginshell' is removed accordingly.
See <http://linuxshellaccount.blogspot.com/2007/12/what-to-do-when-nohup-hangs-up-anyway.html>.
pull/7/head
Casper Ti. Vector 12 years ago
parent a80d9cb9c1
commit d61d3ad3fb

@ -217,11 +217,8 @@ xstart() {
rm -f $fifo
fi
if $(yesno loginshell); then
nohup bash --login -c "startx $wm_bin -- ${serverargs}" &> /dev/null &
else
nohup startx $wm_bin -- ${serverargs} &> /dev/null &
fi
# Conform to POSIX and do not use `>&' here.
sh -i -c "(startx $wm_bin -- ${serverargs} > /dev/null 2>&1 &)"
if [[ -n $clockpid ]]; then
#if wait returns with a value >128, it was interrupted by the trap, so registration was sucessful.

@ -47,14 +47,6 @@ xtty=7
# setting the display=N option on a per-user basis.)
locktty=no
# Enable login shell (fixes issues with some keymaps, uses bash).
# Note that your bash scripts won't have any terminal as stdin when
# started in this way. This may break some commands, including stty,
# unless you explicitly check for [ -t 0 ] or that every login shell
# is also interactive. However, we're sending stdout and stderr to
# /dev/null, so you won't see the complaints.
loginshell=no
# The use of consolekit has recently become manditory with hal. However,
# some users might prefer not using either one. If you don't want to
# use consolekit, set the following variable to "no".
@ -75,3 +67,4 @@ usexinit=no
# Additional arguments to pass to X server; it will be called as:
# exec /usr/bin/X :$display $serverargs vt$((xtty+display))
serverargs="-nolisten tcp"

Loading…
Cancel
Save