Mailinglist Archive: opensuse-packaging (172 mails)

< Previous Next >
Re: [opensuse-packaging] Need help finding "shared-lib-calls-exit" problem
  • From: Stefan Seyfried <stefan.seyfried@xxxxxxxxxxxxxx>
  • Date: Sun, 2 May 2010 11:48:47 +0200
  • Message-id: <20100502114847.18aa00a8@xxxxxxxxxxxxxxxx>
On Sun, 02 May 2010 11:05:48 +0200
Dave Plater <davejplater@xxxxxxxxx> wrote:

I'm a bit confused about what the rpmlint message actually means, there
is one "exit@@GLIBC_2.2.5" in libffado.so.2.0.0 but what I don't quite
grasp is exit(0) returns success and exit(-1) returns error so what is
the problem with that over return?

exit() does not return from the library to the program but does exit the
program.

Suppose your program has initialized the hardware on start and is supposed
to properly deinitialize the hardware before exiting.
Now it calls a library function to do data processing, and the library
just calls "exit(-1)" instead of returning an error to the app.
Your application has no chance of returning the hardware into proper state
before that exit().

It's a matter of bad programming style in library programming ;)
--
Stefan Seyfried

"Any ideas, John?"
"Well, surrounding them's out."
--
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx

< Previous Next >