Replace "nohup" with "setsid" everywhere
This commit is contained in:
parent
34d17d1e99
commit
2b9b47ab46
4 changed files with 68 additions and 73 deletions
3
q-browse
3
q-browse
|
@ -17,6 +17,5 @@ elif [[ "$1" == "--preview" ]]; then
|
|||
elif [[ "$1" == "--run" ]]; then
|
||||
shift
|
||||
URL="$(echo "$@" | $ENV_cut -d ' ' -f3-)"
|
||||
(nohup $ENV_xdg_open "$URL" 2>/dev/null &)
|
||||
sleep 0.01
|
||||
setsid $ENV_xdg_open "$URL"
|
||||
fi
|
||||
|
|
2
q-calc
2
q-calc
|
@ -28,7 +28,7 @@ elif [[ "$1" == "--preview" ]]; then
|
|||
elif [[ "$1" == "--run" ]]; then
|
||||
shift
|
||||
echo "$1"
|
||||
echo "$1" | (nohup $ENV_wl_copy -n 2>/dev/null &)
|
||||
echo "$1" | (setsid $ENV_wl_copy)
|
||||
elif [[ "$1" == "--cli" ]]; then
|
||||
shift
|
||||
calc "$(echo "$@" | $ENV_cut -d ' ' -f2-)"
|
||||
|
|
|
@ -24,7 +24,7 @@ elif [[ "$1" == "--run" ]]; then
|
|||
shift
|
||||
TEXT="$(echo "$1" | $ENV_base64 -d)"
|
||||
echo "$TEXT"
|
||||
echo -n "$TEXT" | (nohup $ENV_wl_copy -n 2>/dev/null &)
|
||||
echo -n "$TEXT" | (setsid $ENV_wl_copy)
|
||||
else
|
||||
echo "Unexpected arguments: $@"
|
||||
fi
|
||||
|
|
6
q-pass
6
q-pass
|
@ -31,9 +31,5 @@ elif [[ "$1" == "--run" ]]; then
|
|||
# one of the options. We now decrypt the password
|
||||
# and place it to the clipboard.
|
||||
NAME="$1"
|
||||
$ENV_pass "$NAME" | (nohup $ENV_wl_copy -n 2>/dev/null &)
|
||||
|
||||
# A short sleep is needed to wait for child process
|
||||
# to spawn before exiting.
|
||||
sleep 0.01
|
||||
$ENV_pass "$NAME" | (setsid $ENV_wl_copy)
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue