mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
Evoke will now correctly shutdown (try) all running windows, when
session should be logged out. Previous version (althought commented) was closing all windows (buttons and rest are counted too), not their main window. Thanks to some old code from babaya project I found, XmuClientWindow is what I needed, so emulation is provided to avoid linking with libXmu. Also added some more signals to detect quitting. Pending issue: I'm getting strange sound driver locks when X are started via evoke. This is un-reporoduceable when evoke is started from gui console. This still needs to be investigate.
This commit is contained in:
@@ -33,12 +33,9 @@ void sigchld_handler(int sig) {
|
||||
int pid, status;
|
||||
do {
|
||||
errno = 0;
|
||||
//pid = waitpid(WAIT_ANY, &status, WNOHANG | WUNTRACED);
|
||||
pid = waitpid(WAIT_ANY, &status, WNOHANG);
|
||||
|
||||
if(global_watch != 0) {
|
||||
printf("==> sigchld_handler() got %i\n", status);
|
||||
|
||||
if(WIFEXITED(status))
|
||||
status = WEXITSTATUS(status);
|
||||
else if(WIFSIGNALED(status) && WTERMSIG(status) == SIGSEGV)
|
||||
@@ -99,6 +96,7 @@ int spawn_program(const char* cmd, SignalWatch wf, pid_t* child_pid_ret, const c
|
||||
close(1); dup(nulldev);
|
||||
close(2); dup(nulldev);
|
||||
|
||||
errno = 0;
|
||||
if(execve(argv[0], argv, environ) == -1) {
|
||||
close(nulldev);
|
||||
// should not get here
|
||||
|
Reference in New Issue
Block a user