[hackers] [dwmstatus] Add comment about xinitrc logic. Do double fork. || Christoph Lohmann

From: <git_AT_suckless.org>
Date: Thu, 24 Aug 2023 11:13:18 +0200 (CEST)

commit 384bee02eac5cc189ed382f621bb8151a4e9872b
Author: Christoph Lohmann <20h_AT_r-36.net>
AuthorDate: Thu Aug 24 11:13:09 2023 +0200
Commit: Christoph Lohmann <20h_AT_r-36.net>
CommitDate: Thu Aug 24 11:13:09 2023 +0200

    Add comment about xinitrc logic. Do double fork.
    
    Thanks eidolon for the hint.

diff --git a/dwmstatus-restart b/dwmstatus-restart
index eec88d0..463c147 100755
--- a/dwmstatus-restart
+++ b/dwmstatus-restart
_AT_@ -9,8 +9,15 @@ fi
 
 if [ -e $HOME/.xinitrc ];
 then
- cat $HOME/.xinitrc | grep dwmstatus | sh
+ # In case some .xinitrc exists, do try to run dwmstatus as people
+ # run it in their .xinitrc. This is in case some error
+ # redirection is done or logging.
+ {
+ grep dwmstatus $HOME/.xinitrc | sh
+ } &
 else
- dwmstatus &
+ {
+ dwmstatus &
+ } &
 fi
 
Received on Thu Aug 24 2023 - 11:13:18 CEST

This archive was generated by hypermail 2.3.0 : Thu Aug 24 2023 - 11:24:50 CEST