[PATCH v3 5/6] libwine: Don't call exit in the shared library.
Sebastian Lackner
sebastian at fds-team.de
Fri Oct 7 12:04:22 CDT 2016
On 07.10.2016 18:39, Jens Reyer wrote:
> @@ -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 */
The _exit() calls are happening from a child process here, so there is nothing
to change. I also doubt it will compile with the "break;" which is not even
inside a loop.
Regards,
Sebastian
More information about the wine-devel
mailing list