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

[#316] Use err(3) #317

Closed
wants to merge 1 commit into from
Closed

[#316] Use err(3) #317

wants to merge 1 commit into from

Conversation

fluca1978
Copy link
Collaborator

Whenever in the code there is a printf + exit or similar piece of
code, use err(3) functions instead.
This brings coherency, removes the need for the extra new line, the
program name and provides automatic expansion of errors when needed.

This also changes the create_pidfile static function so that it
terminates the current program (main) if the pid file cannot be
created. To emphasize this, the function has been renamed to
create_pidfile_or_exit. Also the remove_pidfile changed to emit a
warning if the pid file cannot be removed

Close #316

Whenever in the code there is a `printf` + `exit` or similar piece of
code, use `err(3)` functions instead.
This brings coherency, removes the need for the extra new line, the
program name and provides automatic expansion of errors when needed.

This also changes the `create_pidfile` sttic function so that it
terminates the current program (main) if the pid file cannot be
created. To emphasize this, the function has been renamed to
`create_pidfile_or_exit`. Also the `remove_pidfile` changed to emit a
warning if the pid file cannot be removed

Close agroal#316
@jesperpedersen
Copy link
Collaborator

Merged.

Thanks for the contribution !

@jesperpedersen jesperpedersen added the enhancement Improvement to an existing feature label Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use err(3) functions
2 participants