~cmiller/ubuntu/trusty/icewm/translations-cause-crash-lp447883

« back to all changes in this revision

Viewing changes to src/icesm.cc

  • Committer: Bazaar Package Importer
  • Author(s): Eduard Bloch
  • Date: 2008-03-10 21:24:25 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20080310212425-562btgm3vbwzvhu0
Tags: 1.2.35-1
* New upstream release with one fix from CVS
* Automatic linking with gcc -lsupc++ fixed (failed in recent versions),
  also using "-Wl,--as-needed"
* Documentation update - README.Debian reordered by importance
* Changed font defaults in Xft specifications to consider Bitstream Vera
  family as alternative font (closes: #360060, #319191, #349952, #456463),
  also documented how to configure alternative fonts
* Added Bernhard's iconify_on_wm_hints as dpatch (closes: #428566, #389919)
* force use of bash in upstream's Makefile to keep the installation
  magic as-is (closes: #459181)

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
            int status = -1;
73
73
            int pid = -1;
74
74
 
75
 
            pid = waitpid(-1, &status, 0);
76
 
            MSG(("waitpid()=%d, status=%d", pid, status));
77
 
            if (pid == wm_pid) {
78
 
                wm_pid = -1;
79
 
                if (WIFEXITED(status)) {
80
 
                    exit(0);
81
 
                } else {
82
 
                    if (WEXITSTATUS(status) != 0)
83
 
                        runWM();
84
 
                    else if (WIFSIGNALED(status) != 0)
85
 
                        runWM();
 
75
            while ((pid = waitpid(-1, &status, WNOHANG)) > 0) {
 
76
                MSG(("waitpid()=%d, status=%d", pid, status));
 
77
                if (pid == wm_pid) {
 
78
                    wm_pid = -1;
 
79
                    if (WIFEXITED(status)) {
 
80
                        exit(0);
 
81
                    } else {
 
82
                        if (WEXITSTATUS(status) != 0)
 
83
                            runWM();
 
84
                        else if (WIFSIGNALED(status) != 0)
 
85
                            runWM();
 
86
                    }
86
87
                }
 
88
                if (pid == tray_pid)
 
89
                    tray_pid = -1;
 
90
                if (pid == bg_pid)
 
91
                    bg_pid = -1;
87
92
            }
88
 
            if (pid == tray_pid)
89
 
                tray_pid = -1;
90
 
            if (pid == bg_pid)
91
 
                bg_pid = -1;
92
93
        }
93
 
        YApplication::handleSignal(sig);
94
94
    }
95
95
 
96
96
private: