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

Never invoke exit(3) within library implementation #8

Merged
merged 1 commit into from
Mar 16, 2018

Conversation

jserv
Copy link
Member

@jserv jserv commented Mar 16, 2018

It is dangerous and irresponsible to invoke exit(3) in a certain library
consisting of several functions. Outer developers would never understand
why their programs exit when linking to dcurl. Instead, we should always
ensure the appropriate return values and transit state machine
internally.

TODO: the following files are not changed accordingly because function
prototypes have to be modified in order to reflect return values:

  • src/clcontext.c
  • src/pow_cl.c
  • src/dcurl.c

It is dangerous and irresponsible to invoke exit(3) in a certain library
consisting of several functions. Outer developers would never understand
why their programs exit when linking to dcurl. Instead, we should always
ensure the appropriate return values and transit state machine
internally.

TODO: the following files are not changed accordingly because function
prototypes have to be modified in order to reflect return values:
  * src/clcontext.c
  * src/pow_cl.c
  * src/dcurl.c
@furuame furuame merged commit 89e21a4 into DLTcollab:dev Mar 16, 2018
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

Successfully merging this pull request may close these issues.

2 participants