1
0
Fork 0
mirror of https://github.com/Cloudef/bemenu synced 2024-05-09 09:06:43 +02:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Andrei E c0c608cad7 Move SIGCHLD to client launch 2024-03-09 23:46:46 +09:00
Andrei E 9a7b736dd9 Remove SIGCHLD handler
SIG_DFL on SIGCHLD prevents proper functioning of pclose, which the new version of the pasting functionality requires.

Closes Cloudef#385

Ref: https://stackoverflow.com/questions/54189212/popen-returns-1-unexpectedly
2024-03-09 23:46:46 +09:00

View File

@ -133,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;
@ -166,14 +174,6 @@ item_cb(const struct client *client, struct bm_item *item)
int
main(int argc, char **argv)
{
struct sigaction action = {
.sa_handler = SIG_DFL,
.sa_flags = SA_NOCLDWAIT
};
// do not care about childs
sigaction(SIGCHLD, &action, NULL);
if (!bm_init())
return EXIT_FAILURE;