* _exit() doesn't seem to work right on Cygwin.
This commit is contained in:
		
							parent
							
								
									b35735d8b2
								
							
						
					
					
						commit
						5bb3444032
					
				
					 1 changed files with 11 additions and 0 deletions
				
			
		| 
						 | 
					@ -12,6 +12,10 @@
 | 
				
			||||||
#include <unistd.h>
 | 
					#include <unistd.h>
 | 
				
			||||||
#include <errno.h>
 | 
					#include <errno.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef __CYGWIN__
 | 
				
			||||||
 | 
					#include <windows.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <pwd.h>
 | 
					#include <pwd.h>
 | 
				
			||||||
#include <grp.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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//////////////////////////////////////////////////////////////////////
 | 
					//////////////////////////////////////////////////////////////////////
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue