The previous check for non-socket decriptors broke my attempt to
watch a pipe with kevent(), causing havoc in my application.
---
It took me a while to chase this down :<
This patch is also downloadable from:
http://bogomips.org/libkqueue.git/patch?id=a348d15f164e
src/linux/platform.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/linux/platform.c b/src/linux/platform.c
index 097b3ad..6ee805b 100644
--- a/src/linux/platform.c
+++ b/src/linux/platform.c
@@ -294,8 +294,7 @@ linux_get_descriptor_type(struct knote *kn)
dbg_perror("fstat(2)");
return (-1);
}
- if (! S_ISSOCK(sb.st_mode)) {
- //FIXME: could be a pipe, device file, or other non-regular file
+ if (S_ISREG(sb.st_mode)) {
kn->kn_flags |= KNFL_REGULAR_FILE;
dbg_printf("fd %d is a regular file\n", (int)kn->kev.ident);
return (0);
--
Eric Wong