status

statusbar program for dwm
git clone anongit@rnpnr.xyz:status.git
Log | Files | Refs | Feed | README | LICENSE

Commit: 16a5531598f1ec0ffa745277dd5699fb79afab47
Parent: 3d646d04e0e7d7c120cd66432e4fb359a5e02117
Author: Randy Palamar
Date:   Thu, 26 Dec 2024 14:42:22 -0700

fork to the background at startup

Diffstat:
Mstatus.c | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/status.c b/status.c @@ -429,6 +429,15 @@ main(i32 argc, char *argv[]) } } + /* NOTE(rnp): fork ourselves to the background and run as a daemon */ + if (!dflag) { + switch(fork()) { + case -1: die("failed to fork to background\n"); + case 0: setsid(); break; + default: _exit(0); + } + } + Arena memory = get_arena(); status_init(&memory); status_loop(memory);