Project

General

Profile

Bug #152

library should not do exit() for error handling

Added by Yannick Brosseau over 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Low
Start date:
03/05/2012
Due date:
% Done:

100%

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

(
See output of rpmlist ran on fedora:
liburcu.x86_64: W: shared-lib-calls-exit /usr/lib64/liburcu-qsbr.so.1.0.0 exit@GLIBC_2.2.5
liburcu.x86_64: W: shared-lib-calls-exit /usr/lib64/liburcu.so.1.0.0 exit@GLIBC_2.2.5
liburcu.x86_64: W: shared-lib-calls-exit /usr/lib64/liburcu-mb.so.1.0.0 exit@GLIBC_2.2.5
liburcu.x86_64: W: shared-lib-calls-exit /usr/lib64/liburcu-bp.so.1.0.0 exit@GLIBC_2.2.5
liburcu.x86_64: W: shared-lib-calls-exit /usr/lib64/liburcu-signal.so.1.0.0 exit@GLIBC_2.2.5
)


Related issues

Related to LTTng-UST - Bug #267: library should not do exit() for error handlingWon't fixMathieu Desnoyers03/05/2012

Actions
#1

Updated by Mathieu Desnoyers over 8 years ago

  • Status changed from New to Feedback
  • Assignee set to Mathieu Desnoyers

should we use assertions instead ? At least those get turned off in distros.

#2

Updated by Yannick Brosseau over 8 years ago

  • Status changed from Feedback to Confirmed

We recommand that we:
print on std error
assert
sigbus (or another appropriate signal)

With documenting that really really bad thing will trigger a signal.

#3

Updated by Mathieu Desnoyers about 8 years ago

  • Status changed from Confirmed to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF