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

Use -1 as "This fd is closed" instead of 0 #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Jille
Copy link
Member

@Jille Jille commented Apr 27, 2012

Because 0 can be a valid fd.

@Jille
Copy link
Member Author

Jille commented May 12, 2012

Bump.

/* File buffers are depleted */
data->file_ready = FALSE;
/* Trigger the kernel to read from the disk */
res = read(data->fd, &cbuf, 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is blocking, right? Would a async read do it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 740 marks the file as non-blocking.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A, right :).

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.

None yet

2 participants