-
Notifications
You must be signed in to change notification settings - Fork 262
Free, close, and unlink files when failure happens #1407
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
base: master
Are you sure you want to change the base?
Conversation
michaelrsweet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The unlink is necessary. The close calls are not since we are exiting (which will close the files for us).
michaelrsweet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments.
Remove freeing the free list.
michaelrsweet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just clean up temp files. We don't need to close files right before exiting.
|
|
||
| sleep(5); | ||
|
|
||
| if (snmp_fd >= 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need this.
| { | ||
| _cupsLangPrintFilter(stderr, "ERROR", | ||
| _("The printer is not responding.")); | ||
| if (snmp_fd >= 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need this either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
httpAddrClose, which is what the other close calls, unlinks too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only for Unix domain sockets. SNMP uses UDP sockets which have no corresponding local file.
No description provided.