On 11.10.2016 16:21, Jens Reyer wrote:
> From: Michael Gilbert <mgilbert(a)debian.org>
> Signed-off-by: Jens Reyer <jre.winesim(a)gmail.com>
> ---
> libs/wine/config.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libs/wine/config.c b/libs/wine/config.c
> index 3b5dd68..c0b3bdd 100644
> --- a/libs/wine/config.c
> +++ b/libs/wine/config.c
> @@ -68,7 +68,7 @@ static void fatal_error( const char *err, ... )
> fprintf( stderr, "wine: " );
> vfprintf( stderr, err, args );
> va_end( args );
> - exit(1);
> + abort();
> }
>
> /* die on a fatal error */
> @@ -81,7 +81,7 @@ static void fatal_perror( const char *err, ... )
> vfprintf( stderr, err, args );
> perror( " " );
> va_end( args );
> - exit(1);
> + abort();
> }
>
> /* malloc wrapper */
>
I'm not sure if this is really a good idea. In contrast to exit, abort() might
trigger the creation of a core dump. Unfortunately fatal_[p]error is also used
at many places as a shortcut for "fprintf(stderr,...); exit(1)". This means after
this change, a lot of users might see "Aborted (core dumped)" even for harmless
error messages.
Patch 2 is even more misleading, and shows such a message when the user wants
to see the WINEDEBUG help:
$ WINEDEBUG=help ./wine winecfg
[...]
Available message classes: err, warn, fixme, trace
Aborted (Core dumped)
Before changing things in Winelib, it would first be necessary to modify all
involved tools and dlls to avoid fatal_[p]error for harmless errors.
Regards,
Sebastian