1. 23 Apr, 2013 1 commit
  2. 29 Jan, 2013 1 commit
    • Colin Walters's avatar
      Add g_close(), use it · f398bec5
      Colin Walters authored
      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
      f398bec5
  3. 15 Nov, 2012 1 commit
  4. 14 Nov, 2012 1 commit
  5. 02 Nov, 2012 1 commit
    • Colin Walters's avatar
      Merge waitpid() from g_spawn_sync into gmain() · ce002293
      Colin Walters authored
      This is preparatory work for a future commit which will add a
      "catchall" waitpid API.  If we don't synchronize here with the worker
      thread, race conditions are possible.
      
      This also ensures we have an error message if someone adds a child
      watch for a nonexistent pid, etc.  Previously, we'd simply keep
      calling waitpid() getting ECHILD, and ignoring it until the source was
      removed. Now, we g_warning() and fire the source.
      
      Thirdly, this ensures that the waitpid() call in gmain handles EINTR,
      like the g_spawn_sync() one did.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=687061
      ce002293
  6. 29 Oct, 2012 1 commit
    • Paul Eggert's avatar
      gmain: Document constraints on waitpid · 00f4c12b
      Paul Eggert authored
      Applications that use glib should not invoke waitpid with a first
      argument that is nonpositive, because when such a waitpid is run in
      one thread and glib waits for a subprocess in another, there is a race
      condition, and the former waitpid can reap a process that was intended
      for the latter.  Mention this in the documentation for
      g_child_watch_source_new, and in the diagnostic generated by
      g_spawn_sync when its waitpid fails with errno equal to ECHILD.
      Signed-off-by: Colin Walters's avatarColin Walters <walters@verbum.org>
      
      http://bugzilla.gnome.org/show_bug.cgi?id=687075
      00f4c12b
  7. 28 Aug, 2012 3 commits
  8. 13 Jul, 2012 1 commit
  9. 10 Jul, 2012 1 commit
    • Colin Walters's avatar
      Add g_spawn_check_exit_status() · f7abd3ce
      Colin Walters authored
      Many (if not "almost all") programs that spawn other programs via
      g_spawn_sync() or the like simply want to check whether or not the
      child exited successfully, but doing so requires use of
      platform-specific functionality and there's actually a fair amount of
      boilerplate involved.
      
      This new API will help drain a *lot* of mostly duplicated code in
      GNOME, from gnome-session to gdm.  And we can see that some bits even
      inside GLib were doing it wrong; for example checking the exit status
      on Unix, but ignoring it on Windows.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=679691
      f7abd3ce
  10. 22 Jun, 2012 1 commit
  11. 22 May, 2012 1 commit
    • Christian Persch's avatar
      gspawn: Add GSpawnFlag to use the PATH from envp · 481191f1
      Christian Persch authored
      Add a G_SPAWN_SEARCH_PATH_FROM_ENVP flag to GSpawnFlags so that
      g_spawn_async() etc use the PATH variable from the passed-in child
      environment to search for the executable.
      If both this flag and the G_SPAWN_SEARCH_PATH flag are set, the
      child environment is searched first and only falls back to the
      PATH from the process environment if it is unset.
      
      Bug #676398.
      481191f1
  12. 16 Mar, 2012 1 commit
  13. 03 Mar, 2012 1 commit
  14. 14 Dec, 2011 1 commit
  15. 16 Oct, 2011 2 commits
  16. 05 Sep, 2011 1 commit
  17. 06 Jul, 2011 1 commit
  18. 15 Jun, 2011 1 commit
  19. 14 Jun, 2011 2 commits
  20. 10 Jun, 2011 1 commit
  21. 07 Jun, 2011 1 commit
  22. 06 Sep, 2010 1 commit
  23. 05 Sep, 2010 1 commit
  24. 07 Jul, 2010 1 commit
  25. 22 Aug, 2009 1 commit
  26. 20 May, 2009 1 commit
  27. 31 Dec, 2008 1 commit
  28. 25 Sep, 2008 1 commit
    • Tor Lillqvist's avatar
      Just ignore the child_setup function, never call it. The is no situation · 0ed8b94b
      Tor Lillqvist authored
      2008-09-25  Tor Lillqvist  <tml@novell.com>
      
      	* glib/gspawn-win32.c (do_spawn_with_pipes) (do_spawn_directly):
      	Just ignore the child_setup function, never call it. The is no
      	situation in which it could be useful on Windows. Do print a
      	warning, like before.
      
      	* glib/gspawn.c (g_spawn_async_with_pipes): Corresponding change
      	in documentation.
      
      
      svn path=/trunk/; revision=7540
      0ed8b94b
  29. 11 Jun, 2008 1 commit
  30. 25 May, 2008 1 commit
  31. 06 Jan, 2008 1 commit
  32. 09 Nov, 2007 1 commit
  33. 07 Nov, 2007 1 commit
  34. 16 Oct, 2007 1 commit
    • Matthias Clasen's avatar
      Check for sys/resource.h · a57cf389
      Matthias Clasen authored
      2007-10-16  Matthias Clasen  <mclasen@redhat.com>
      
              * configure.in: Check for sys/resource.h
      
              * glib/gspawn.c: Improve the fdwalk implementation on Linux
              to only walk over actually open file descriptors. (#469231,
              Lennart Poettering)
      
      
      svn path=/trunk/; revision=5783
      a57cf389
  35. 11 Apr, 2007 1 commit
  36. 28 Dec, 2006 1 commit