Bug in freeing File Descriptors
"Jeff Goldszer" <[email protected]>
| Newsgroups | gmane.linux.kernel.streams |
|---|---|
| Message-ID | <[email protected]> |
Compile and run the following test. The file descriptor is flushed from
the queue but never closed. The result is LiS does not unload.
The sad part about this is I submitted a fix for this, 2 years ago. It
was lobbied to take it out and no one decided to fix it.
The command line to compile this is cc -o test -l LiS test.c
Assuming of cause the program is cut and pasted into test.c.
#include <unistd.h>
#include <stropts.h>
main()
{
int a[2];
int b[2];
pipe(a);
pipe(b);
ioctl(a[0], I_SENDFD, b[0]);
close(b[0]);
close(a[1]);
}
Jeff Goldszer
Senior Software Engineer
Alebra Technologies
9915 66th Avenue
Apartment 2C
Rego Park, NY 11374
Phone: 718-606-8535
FAX: 718-606-8536