* _exit() doesn't seem to work right on Cygwin.

This commit is contained in:
Eelco Dolstra 2006-06-19 16:24:15 +00:00
parent b35735d8b2
commit 5bb3444032

View file

@ -12,6 +12,10 @@
#include <unistd.h>
#include <errno.h>
#ifdef __CYGWIN__
#include <windows.h>
#endif
#include <pwd.h>
#include <grp.h>
@ -317,6 +321,13 @@ const char * * strings2CharPtrs(const Strings & ss)
}
/* Hack for Cygwin: _exit() doesn't seem to work quite right, since
some Berkeley DB code appears to be called when a child exits
through _exit() (e.g., because execve() failed). So call the
Windows API directly. */
#define _exit(n) ExitProcess(n)
//////////////////////////////////////////////////////////////////////