After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 651725 - gmain: Cleanups and a new test case
gmain: Cleanups and a new test case
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-06-02 17:59 UTC by Colin Walters
Modified: 2011-06-03 15:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gmain: Clean up SIGCHLD handling (2.86 KB, patch)
2011-06-02 17:59 UTC, Colin Walters
committed Details | Review
gmain: Consolidate UNIX signal init state handling (3.94 KB, patch)
2011-06-02 17:59 UTC, Colin Walters
committed Details | Review
spawn-multithreaded: New test case (9.40 KB, patch)
2011-06-02 17:59 UTC, Colin Walters
committed Details | Review

Description Colin Walters 2011-06-02 17:59:21 UTC
I was briefly looking at signalfd() last night, and there are some
tricky things.  This cleanup patch and test case resulted as initial
steps.
Comment 1 Colin Walters 2011-06-02 17:59:24 UTC
Created attachment 189098 [details] [review]
gmain: Clean up SIGCHLD handling

Unify it more with the rest of the signal handling code.  There's
no reason not to specify SA_RESTART and SA_NOCLDSTOP for flags
always, so just do it.

Remove unnecessary initialization, and push the internal API
towards just ensure_unix_signal_handler_installed_unlocked().
Comment 2 Colin Walters 2011-06-02 17:59:27 UTC
Created attachment 189099 [details] [review]
gmain: Consolidate UNIX signal init state handling

For a future signalfd() patch, it will be easier to handle if
we don't separate initialization from watching for a particular
signal.
Comment 3 Colin Walters 2011-06-02 17:59:29 UTC
Created attachment 189100 [details] [review]
spawn-multithreaded: New test case

We didn't have any coverage of threads spawning processes, which we
should definitely support.
Comment 4 Matthias Clasen 2011-06-03 13:33:30 UTC
Review of attachment 189098 [details] [review]:

Looks fine to me.
Comment 5 Matthias Clasen 2011-06-03 14:16:00 UTC
Review of attachment 189099 [details] [review]:

Looks fine to me.
Comment 6 Matthias Clasen 2011-06-03 14:19:00 UTC
Review of attachment 189100 [details] [review]:

Yay, tests !

But whats a gecho ? I think that should either be an echo, or a gecko...
Comment 7 Colin Walters 2011-06-03 15:55:11 UTC
Attachment 189098 [details] pushed as 6ea274b - gmain: Clean up SIGCHLD handling
Attachment 189099 [details] pushed as c34a6a6 - gmain: Consolidate UNIX signal init state handling
Attachment 189100 [details] pushed as d51198b - spawn-multithreaded: New test case