Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libquasselc.so calls exit() #5

Open
TC01 opened this issue Nov 19, 2016 · 1 comment
Open

libquasselc.so calls exit() #5

TC01 opened this issue Nov 19, 2016 · 1 comment

Comments

@TC01
Copy link

TC01 commented Nov 19, 2016

Another warning from rpmlint:

quasselc.x86_64: W: shared-lib-calls-exit /usr/lib64/libquasselc.so.0 exit@GLIBC_2.2.5
This library package calls exit() or _exit(), probably in a non-fork()
context. Doing so from a library is strongly discouraged - when a library
function calls exit(), it prevents the calling program from handling the
error, reporting it to the user, closing files properly, and cleaning up any
state that the program has. It is preferred for the library to return an
actual error code and let the calling program decide how to handle the
situation.

A search of the repository suggests that there are a couple places where exit() is called directly, namely in io.c and display.c. (As it says above) these should probably be errors thrown by the library instead so that quassel-irssi, etc. can decide whether or not to exit in response.

@phhusson
Copy link
Owner

Right, display.c is useless, I dropped it from the build (cf c08da62 )

As for io.c, the error propagation seem to be a big work (though mostly on quassel-irssi's side).

Also for some simpler apps, like QuasselBots, just exiting is an acceptabl-ish behaviour.
For usages like quassel-irssi this is definitely a real bug, but I think I'll want to keep optionally that behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants