From 18c518af03a78da98416a9da10d886a071b8600f Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Sun, 3 Nov 2024 02:17:28 +0000 Subject: [PATCH] Call "setsid" with always-fork --- q-browse | 2 +- q-calc | 2 +- q-clipboard | 2 +- q-pass | 2 +- q-run | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/q-browse b/q-browse index 410f6ae..579c9b1 100755 --- a/q-browse +++ b/q-browse @@ -17,5 +17,5 @@ elif [[ "$1" == "--preview" ]]; then elif [[ "$1" == "--run" ]]; then shift URL="$(echo "$@" | $ENV_cut -d ' ' -f3-)" - setsid $ENV_xdg_open "$URL" + setsid -f $ENV_xdg_open "$URL" fi diff --git a/q-calc b/q-calc index df1b0b9..2d27c0c 100755 --- a/q-calc +++ b/q-calc @@ -28,7 +28,7 @@ elif [[ "$1" == "--preview" ]]; then elif [[ "$1" == "--run" ]]; then shift echo "$1" - echo "$1" | (setsid $ENV_wl_copy) + echo "$1" | (setsid -f $ENV_wl_copy) elif [[ "$1" == "--cli" ]]; then shift calc "$(echo "$@" | $ENV_cut -d ' ' -f2-)" diff --git a/q-clipboard b/q-clipboard index 9141e92..ee7ac4e 100755 --- a/q-clipboard +++ b/q-clipboard @@ -24,7 +24,7 @@ elif [[ "$1" == "--run" ]]; then shift TEXT="$(echo "$1" | $ENV_base64 -d)" echo "$TEXT" - echo -n "$TEXT" | (setsid $ENV_wl_copy) + echo -n "$TEXT" | (setsid -f $ENV_wl_copy) else echo "Unexpected arguments: $@" fi diff --git a/q-pass b/q-pass index 1811a09..c17e107 100755 --- a/q-pass +++ b/q-pass @@ -31,5 +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" | (setsid $ENV_wl_copy) + $ENV_pass "$NAME" | (setsid -f $ENV_wl_copy) fi diff --git a/q-run b/q-run index e94e6d4..f1ef0a7 100755 --- a/q-run +++ b/q-run @@ -22,5 +22,5 @@ elif [[ "$1" == "--preview" ]]; then echo "Will run $1" elif [[ "$1" == "--run" ]]; then shift - setsid "$1" + setsid -f "$1" fi