[PATCH v3 5/6] libwine: Don't call exit in the shared library.
Jens Reyer
jre.winesim at gmail.com
Fri Oct 7 11:39:25 CDT 2016
From: Michael Gilbert <mgilbert at debian.org>
Signed-off-by: Jens Reyer <jre.winesim at gmail.com>
---
libs/wine/mmap.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/libs/wine/mmap.c b/libs/wine/mmap.c
index 1a3ca59..588924d 100644
--- a/libs/wine/mmap.c
+++ b/libs/wine/mmap.c
@@ -76,7 +76,7 @@ static inline int get_fdzero(void)
if ((fd = open( "/dev/zero", O_RDONLY )) == -1)
{
perror( "/dev/zero: open" );
- exit(1);
+ abort();
}
}
return fd;
@@ -128,7 +128,7 @@ static int try_mmap_fixed (void *addr, size_t len, int prot, int flags,
if ( (pid = vfork()) == -1 )
{
perror("try_mmap_fixed: vfork");
- exit(1);
+ abort();
}
if ( pid == 0 )
{
@@ -140,18 +140,18 @@ static int try_mmap_fixed (void *addr, size_t len, int prot, int flags,
mapped and we must fail. */
for ( i = 0; i < len; i += pagesize )
if ( mincore( (caddr_t)addr + i, pagesize, &vec ) != -1 )
- _exit(1);
+ abort();
/* Perform the mapping with MAP_FIXED set. This is safe
now, as none of the pages is currently in use. */
result = mmap( addr, len, prot, flags | MAP_FIXED, fildes, off );
if ( result == addr )
- _exit(0);
+ break;
if ( result != (void *) -1 ) /* This should never happen ... */
munmap( result, len );
- _exit(1);
+ abort();
}
/* reap child */
--
2.9.3
More information about the wine-patches
mailing list