mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Use waitpid() only if <sys/wait.h> is available. Unavailable on win32.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14392 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
203034a045
commit
4a26d3974a
@ -1,3 +1,8 @@
|
||||
2006-06-20 Christian Stimming <stimming@tuhh.de>
|
||||
|
||||
* src/backend/file/io-gncxml-v2.c: Use waitpid() only if
|
||||
<sys/wait.h> is available. Unavailable on win32.
|
||||
|
||||
2006-06-18 Chris Lyttle <chris@wilddev.net>
|
||||
|
||||
* NEWS: Added some text about the release.
|
||||
|
@ -93,7 +93,7 @@ AC_PROG_MAKE_SET
|
||||
AC_PROG_LN_S
|
||||
AC_HEADER_STDC
|
||||
|
||||
AC_CHECK_HEADERS(limits.h sys/times.h)
|
||||
AC_CHECK_HEADERS(limits.h sys/times.h sys/wait.h)
|
||||
AC_CHECK_FUNCS(stpcpy memcpy timegm towupper)
|
||||
AC_CHECK_FUNCS(setenv,,[
|
||||
AC_CHECK_FUNCS(putenv,,[
|
||||
|
@ -28,7 +28,9 @@
|
||||
#include <unistd.h>
|
||||
#include <zlib.h>
|
||||
#include <errno.h>
|
||||
#include <sys/wait.h>
|
||||
#ifdef HAVE_SYS_WAIT_H
|
||||
# include <sys/wait.h>
|
||||
#endif
|
||||
|
||||
#include "gnc-engine.h"
|
||||
#include "gnc-pricedb-p.h"
|
||||
@ -1354,7 +1356,15 @@ wait_for_gzip()
|
||||
if (gzip_child_pid == 0)
|
||||
return TRUE;
|
||||
|
||||
#ifdef HAVE_SYS_WAIT_H
|
||||
retval = waitpid(gzip_child_pid, NULL, WUNTRACED);
|
||||
#else
|
||||
/* FIXME: Windows doesn't have waitpid. According to glib's
|
||||
g_spawn_async_with_pipes(), we should use one of the
|
||||
g_spawn functions and some Win32-API WaitFor*() function
|
||||
here. For now, we ignore that race condition. */
|
||||
retval = 1;
|
||||
#endif
|
||||
gzip_child_pid = 0;
|
||||
|
||||
return retval != -1;
|
||||
|
Loading…
Reference in New Issue
Block a user