From 5bb3444032ad92b98a4a58051fec1f2b31d2e3da Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 19 Jun 2006 16:24:15 +0000 Subject: [PATCH] * _exit() doesn't seem to work right on Cygwin. --- src/libstore/build.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/libstore/build.cc b/src/libstore/build.cc index ed53f48aa0..6d0498968d 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -12,6 +12,10 @@ #include #include +#ifdef __CYGWIN__ +#include +#endif + #include #include @@ -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) + + //////////////////////////////////////////////////////////////////////