*fix* execute an external command by calling fork/execl and do not ignore SIGCHLD (maybe fixes issue 263)
git-svn-id: http://tint2.googlecode.com/svn/trunk@480 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
@@ -22,8 +22,6 @@
|
||||
#include <cairo.h>
|
||||
#include <cairo-xlib.h>
|
||||
#include <pango/pangocairo.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "window.h"
|
||||
@@ -33,6 +31,7 @@
|
||||
#include "taskbar.h"
|
||||
#include "clock.h"
|
||||
#include "timer.h"
|
||||
#include "common.h"
|
||||
|
||||
|
||||
char *time1_format;
|
||||
@@ -302,17 +301,6 @@ void clock_action(int button)
|
||||
command = clock_rclick_command;
|
||||
break;
|
||||
}
|
||||
if (command) {
|
||||
pid_t pid;
|
||||
pid = fork();
|
||||
if (pid == 0) {
|
||||
// change for the fork the signal mask
|
||||
// sigset_t sigset;
|
||||
// sigprocmask(SIG_SETMASK, &sigset, 0);
|
||||
// sigprocmask(SIG_UNBLOCK, &sigset, 0);
|
||||
execl("/bin/sh", "/bin/sh", "-c", command, NULL);
|
||||
_exit(0);
|
||||
}
|
||||
}
|
||||
tint_exec(command);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user