summaryrefslogtreecommitdiff
path: root/glib/glib-unix.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix compilation on Android with the bionic C librarySebastian Dröge2013-04-161-0/+5
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=689223
* Add g_close(), use itColin Walters2013-01-291-1/+0
| | | | | | | | | | | | | | | There are two benefits to this: 1) We can centralize any operating system specific knowledge of close-vs-EINTR handling. For example, while on Linux we should never retry, if someone cared enough later about HP-UX, they could come by and change this one spot. 2) For places that do care about the return value and want to provide the caller with a GError, this function makes it convenient to do so. Note that gspawn.c had an incorrect EINTR loop-retry around close(). https://bugzilla.gnome.org/show_bug.cgi?id=682819
* Add a UNIX fd sourceRyan Lortie2013-01-151-0/+139
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=658020
* g_unix_open_pipe: Add missing F_SETFDColin Walters2012-12-111-2/+6
| | | | | | | | | Spotted by Ray Strode <rstrode@redhat.com> While we're here, microoptimize by skipping the fcntl() calls if flags is 0. https://bugzilla.gnome.org/show_bug.cgi?id=690069
* g_unix_signal_add_full(): Annotate to shadow g_unix_signal_add()Martin Pitt2012-11-281-0/+1
| | | | | | Just like g_timeout_add() and friends, we want to hide the unintrospectable g_unix_signal_add() from GI bindings and present g_unix_signal_add_full() as GLib.unix_signal_add() to them.
* g_unix_signal_source_new: Allow SIGUSR1 and SIGUSR2Colin Walters2012-10-261-6/+11
| | | | | | | These are user defined, it makes sense to allow watching them. This is needed to port gnome-session and gdm over. https://bugzilla.gnome.org/show_bug.cgi?id=686898
* glib: don't quote quark names for G_DEFINE_QUARKCosimo Cecchi2012-08-281-1/+1
|
* Use G_DEFINE_QUARK for GLib's own quarksMatthias Clasen2012-08-281-5/+1
| | | | | This commit just deals with glib/. gobject/ and gio/ will be handled in separate commits.
* documentation fixesStef Walter2011-12-131-9/+11
| | | | | | | | Fixes for gtk-doc warnings. http://bugzilla.gnome.org/show_bug.cgi?id=66469 https://bugzilla.gnome.org/show_bug.cgi?id=664699
* Fix up some doc comments that referred to threads not being enabledDan Winship2011-10-051-6/+0
| | | | (and a few other unrelated comment fixes)
* gtk-doc fixups for glib/Ryan Lortie2011-09-051-1/+1
|
* unix signal watch: make API match other sourcesRyan Lortie2011-08-301-7/+29
| | | | | | | | Change the unix signal watch API to match other sources in both available functions, names of those functions and order of the parameters to the _full function. https://bugzilla.gnome.org/show_bug.cgi?id=657705
* g_unix_open_pipe: fix some bugsRyan Lortie2011-07-251-1/+2
| | | | | | | | | Fix some bugs in the fallback case of g_unix_open_pipe: - close both halves of the pipe on error (not just one) - set the cloexec flag on both halves of the pipe (instead of settings it twice on one half)
* No need to have two variants of errno-to-GErrorMatthias Clasen2011-06-051-21/+9
|
* Fix doc typosMatthias Clasen2011-06-041-1/+1
| | | | Now with fewer broken links...
* Fix a typoMatthias Clasen2011-05-281-3/+3
|
* Documentation tweaksMatthias Clasen2011-05-281-23/+30
| | | | Add Since tags, etc.
* Rename g_unix_pipe_flags to g_unix_open_pipeColin Walters2011-05-031-4/+4
| | | | | | From IRC discussion, people liked this name more. https://bugzilla.gnome.org/show_bug.cgi?id=649322
* glib-unix.c: Don't leak FDs if pipe2() succeedsColin Walters2011-05-031-0/+2
|
* g_unix_set_fd_nonblocking: New API to control file descriptor blocking stateColin Walters2011-05-031-0/+50
| | | | | | And use it in relevant places in GLib. https://bugzilla.gnome.org/show_bug.cgi?id=649225
* glib-unix: New API to watch some Unix signalsColin Walters2011-04-271-4/+84
| | | | | | | | | | | | This new API allows watching a few select Unix signals; looking through the list on my system, I didn't see anything else that I think it'd reasonable to watch. We build on the previous patch to make the child watch helper thread that existed on Unix handle these signals in the threaded case. In the non-threaded case, they're just global variables. https://bugzilla.gnome.org/show_bug.cgi?id=644941
* gmain: Prepare child watch handling for more generic signal handlingColin Walters2011-04-271-10/+9
| | | | | | | In preparation for supporting more Unix signals such as SIGHUP, SIGTERM etc., https://bugzilla.gnome.org/show_bug.cgi?id=644941
* glib-unix: New Unix-specific APIColin Walters2011-04-271-0/+135
GLib historically has been designed to be "mostly" portable; there are some functions only available on Unix like g_io_channel_unix_new(), but these are typically paired with obvious counterparts for Win32. However, as GLib is used not only by portable software, but components targeting Unix (or even just Linux), there are a few cases where it would be very convenient if GLib shipped built-in functionality. This initial patch is a basic wrapper around pipe2(), including fallbacks for older kernels. This pairs well with the existing g_spawn_*() API and its child_setup functionality. However, in the future, I want to add a signal() wrapper here, complete with proxying the signal to a mainloop. I have initial code for this, but doing it sanely (including factoring out gmain.c's private worker thread), is a complex task, and I don't want to block on that. See also gwin32.h for Win32 specific functionality. https://bugzilla.gnome.org/show_bug.cgi?id=644941