Skip to content

Commit

Permalink
Move SIGCHLD to client launch
Browse files Browse the repository at this point in the history
  • Loading branch information
ndren authored and Cloudef committed Mar 9, 2024
1 parent 9a7b736 commit c0c608c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions client/bemenu-run.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <signal.h>
#include <unistd.h>
#include <dirent.h>
#include <assert.h>
Expand Down Expand Up @@ -132,6 +133,14 @@ static inline void ignore_ret(int useless, ...) { (void)useless; }
static void
launch(const struct client *client, const char *bin)
{
struct sigaction action = {
.sa_handler = SIG_DFL,
.sa_flags = SA_NOCLDWAIT
};

// do not care about childs
sigaction(SIGCHLD, &action, NULL);

if (!bin)
return;

Expand Down

0 comments on commit c0c608c

Please sign in to comment.