Activity log for bug #584725

Date Who What changed Old value New value Message
2010-05-23 20:46:12 Mathieu Bridon bug added bug
2010-05-23 20:46:53 Mathieu Bridon description I build a clutk RPM on Fedora 13, and rpmlint (our tool to check the quality of packaging) tells me the following: clutk.x86_64: W: shared-lib-calls-exit /usr/lib64/libclutk-0.3.so.0.308.0 exit@GLIBC_2.2.5 As rpmlint is a very nice guy, he gives me the following explanation: 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. Now, like it says, it is *strongly discouraged*, which I guess means that it can sometimes be ok to do so. As I have absolutely no knowledge about this kind of things to judge if clutk falls in one of these cases, I thought I would report it here, so that people who actually know this kind of stuff could decide. ;) If I got this right, the offenders seem to be: $ grep -rI exit . [... snip ...] ./clutk/ctk-utils.c: exit (-1); ./tests/test-clutk.c: exit (EXIT_SUCCESS); (though the test code is probably perfectly fine) I build a clutk RPM on Fedora 13, and rpmlint (our tool to check the quality of packaging) tells me the following: clutk.x86_64: W: shared-lib-calls-exit /usr/lib64/libclutk-0.3.so.0.308.0 exit@GLIBC_2.2.5 As rpmlint is a very nice guy, he gives me the following explanation: 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. Now, like it says, it is *strongly discouraged*, which I guess means that it can sometimes be ok to do so. As I have absolutely no knowledge about this kind of things to judge if clutk falls in one of these cases, I thought I would report it here, so that people who actually know this kind of stuff could decide. ;) If I got this right, the offenders seem to be: $ grep -rI exit . [... snip ...] ./clutk/ctk-utils.c: exit (-1); ./tests/test-clutk.c: exit (EXIT_SUCCESS); (though the test code is probably perfectly fine)
2011-08-29 16:55:08 David Barth clutk: status New Expired