On 11.10.2016 16:21, Jens Reyer wrote:
From: Michael Gilbert mgilbert@debian.org Signed-off-by: Jens Reyer jre.winesim@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
On 11.10.2016 16:59, Sebastian Lackner wrote:
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.
Thanks a lot, that's the advice I've been looking for (obviously not with the hoped for outcome).
Unfortunately the todo is beyond my capabilities. I'll discuss that at Debian and propose to drop the patch for now.
Instead I'll file a bug here since I haven't heard anyone rejecting the goal of getting rid of exit in the shared library itself.
Greets jre
Jens Reyer jre.winesim@gmail.com writes:
On 11.10.2016 16:59, Sebastian Lackner wrote:
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.
Thanks a lot, that's the advice I've been looking for (obviously not with the hoped for outcome).
Unfortunately the todo is beyond my capabilities. I'll discuss that at Debian and propose to drop the patch for now.
Instead I'll file a bug here since I haven't heard anyone rejecting the goal of getting rid of exit in the shared library itself.
I don't think that's a useful goal. It's not a bad idea to review its usage, and possibly replace it where it makes sense, but there are also places where exit is needed.
On Oct 12, 2016, at 7:52 AM, Alexandre Julliard julliard@winehq.org wrote:
Jens Reyer jre.winesim@gmail.com writes:
On 11.10.2016 16:59, Sebastian Lackner wrote:
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.
Thanks a lot, that's the advice I've been looking for (obviously not with the hoped for outcome).
Unfortunately the todo is beyond my capabilities. I'll discuss that at Debian and propose to drop the patch for now.
Instead I'll file a bug here since I haven't heard anyone rejecting the goal of getting rid of exit in the shared library itself.
I don't think that's a useful goal. It's not a bad idea to review its usage, and possibly replace it where it makes sense, but there are also places where exit is needed.
The reason for this is that libwine is not like other libraries where Debian's check may make sense. It's not a general-purpose library. It's only really useful for Wine itself and for a program which wants to be an alternative Wine loader. The client of libwine will want it to call exit() when needed.
Is there a way to make an exception to Debian's lintian checks?
-Ken
Also thanks to you, AJ and Ken!
On 12.10.2016 17:12, Ken Thomases wrote:
On Oct 12, 2016, at 7:52 AM, Alexandre Julliard julliard@winehq.org wrote:
Jens Reyer jre.winesim@gmail.com writes:
On 11.10.2016 16:59, Sebastian Lackner wrote:
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.
Thanks a lot, that's the advice I've been looking for (obviously not with the hoped for outcome).
Unfortunately the todo is beyond my capabilities. I'll discuss that at Debian and propose to drop the patch for now.
Instead I'll file a bug here since I haven't heard anyone rejecting the goal of getting rid of exit in the shared library itself.
I don't think that's a useful goal. It's not a bad idea to review its usage, and possibly replace it where it makes sense, but there are also places where exit is needed.
The reason for this is that libwine is not like other libraries where Debian's check may make sense. It's not a general-purpose library. It's only really useful for Wine itself and for a program which wants to be an alternative Wine loader. The client of libwine will want it to call exit() when needed.
Is there a way to make an exception to Debian's lintian checks?
No worries, lintian is just a tool giving hints. At least at this check's severity following it is no hard requirement. I'll add an override for this check, linking to this thread (your answers are really valued for this!).
Greets jre