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

stlink library calls exit() or _exit() #634

Closed
Vascom opened this issue Sep 4, 2017 · 1 comment · Fixed by #696
Closed

stlink library calls exit() or _exit() #634

Vascom opened this issue Sep 4, 2017 · 1 comment · Fixed by #696

Comments

@Vascom
Copy link
Collaborator

Vascom commented Sep 4, 2017

When I am build package stlink for Fedora it make some checks. And I see this warning:
stlink.x86_64: W: shared-lib-calls-exit /usr/lib64/libstlink-shared.so.1.4.0 exit@GLIBC_2.2.5

shared-lib-calls-exit:
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.

Can you correct it?

@xor-gate xor-gate added this to the Unplanned (Contributions Welcome) milestone Sep 4, 2017
@xor-gate
Copy link
Member

xor-gate commented Sep 4, 2017

I totaly agree. Exit is evil for libraries (.so, .a). Feel free to submit a PR, i'm fairly busy these days.

slyshykO added a commit to slyshykO/stlink that referenced this issue Mar 28, 2018
@Nightwalker-87 Nightwalker-87 modified the milestones: Unplanned (Contributions Welcome), Next Feb 19, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: General, v1.5.1 Feb 21, 2020
@Nightwalker-87 Nightwalker-87 linked a pull request Mar 18, 2020 that will close this issue
@stlink-org stlink-org locked as resolved and limited conversation to collaborators Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants