Bug 6999
Summary: | Return value irrelevant when reading from inotify fd failed. | ||
---|---|---|---|
Product: | File System | Reporter: | Ryan (wolf0403) |
Component: | Other | Assignee: | Nick Piggin (nickpiggin) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | bunk |
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.6.17 | Subsystem: | |
Regression: | --- | Bisected commit-id: | |
Attachments: |
Test program to reproduce the described situation.
Sample patch inotify fix |
Description
Ryan
2006-08-13 08:26:15 UTC
Created attachment 8770 [details]
Test program to reproduce the described situation.
Sample output:
$ ./itest .
32 bytes left in queue.
read() returns 0 with msg Success
Created attachment 8771 [details]
Sample patch
hey, I don't think the patch is correct. If the user passes in a buffer large enough to hold at least one event, but there are more in the queue that won't fit, they'll still get -EINVAL. Created attachment 10253 [details]
inotify fix
How about this patch, then?
|