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

Fix unix_closedir_job incorrectly checking return value of job #942

Merged
merged 1 commit into from
Jun 21, 2022

Conversation

MisterDA
Copy link
Contributor

LWT_UNIX_CHECK_JOB was incorrectly checking the directory stream
instead of the return value of closedir.

@raphael-proust
Copy link
Collaborator

Thanks for this fix! I've grepped for the LWT_UNIX_CHECK_JOB and there are a couple of suspicious

@raphael-proust
Copy link
Collaborator

There are a couple uses of LWT_UNIX_CHECK_JOB which could be simplified (they use job->result != 0 which should be the same as just job->result IIUC) and some that are somewhat arbitrarily specific (e.g., the check for closedir has job->result < 0 but the manpage for closedir mentions 0 on success and -1 on error, so we could either leave job->result).

Anyway, I didn't find errors in any of these other instances. So I'm merging this. (After rebase and CI.)

LWT_UNIX_CHECK_JOB was incorrectly checking the directory stream
instead of the return value of closedir.
@raphael-proust raphael-proust merged commit 449f180 into ocsigen:master Jun 21, 2022
@MisterDA MisterDA deleted the unix-closedir-check-job branch June 21, 2022 08:12
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