Project

General

Profile

Actions

Bug #322

closed

library should not do exit() for error handling

Added by Yannick Brosseau over 11 years ago. Updated about 4 years ago.

Status:
Invalid
Priority:
Low
Category:
-
Target version:
-
Start date:
03/05/2012
Due date:
% Done:

0%

Estimated time:

Description

It's impolite for a library to call exit().

We should find a better way to do error handling in those case

(
rom rpmlint:
libbabeltrace.x86_64: W: shared-lib-calls-exit /usr/lib64/libbabeltrace-ctf.so.0.0.0 exit@GLIBC_2.2.5
)
Its in the file:
babeltrace/formats/ctf/metadata/ctf-lexer.c

Actions #1

Updated by Yannick Brosseau over 11 years ago

From rpmlint:
libbabeltrace.x86_64: W: shared-lib-calls-exit /usr/lib64/libbabeltrace-ctf.so.0.0.0 exit@GLIBC_2.2.5

Its in the file:
babeltrace/formats/ctf/metadata/ctf-lexer.c

Actions #2

Updated by Yannick Brosseau over 11 years ago

  • Description updated (diff)
Actions #3

Updated by Mathieu Desnoyers over 11 years ago

  • Status changed from New to Confirmed

The exit is generated by flex automatically. We can override it by providing our own yy_fatal_error implementation, but it won't allow us to do much better than a kill on self or something like that. Otherwise, we'd have to use setjmp/longjmp, but I'm not sure how portable they are.

Actions #4

Updated by Jonathan Rajotte Julien about 4 years ago

  • Status changed from Confirmed to Invalid

State of babeltrace moved a lot since.

Closing this ticket as invalid. Reopen it if it stills apply to Babeltrace 2.

Actions

Also available in: Atom PDF