Re: Bug in freeing File Descriptors
"Brian F. G. Bidulock" <[email protected]>
| Newsgroups | gmane.linux.kernel.streams |
|---|---|
| Organization | http://www.openss7.org/ |
| Message-ID | <[email protected]> |
Jeff,
If you send a tested patch against LiS 2.18.1 (soon to be released),
I will apply it. It might be an idea to add a test case to strtst
to regression test this as well.
--brian
On Fri, 22 Oct 2004, Jeff Goldszer wrote:
>
> 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
--
Brian F. G. Bidulock ¦ The reasonable man adapts himself to the ¦
[email protected] ¦ world; the unreasonable one persists in ¦
http://www.openss7.org/ ¦ trying to adapt the world to himself. ¦
¦ Therefore all progress depends on the ¦
¦ unreasonable man. -- George Bernard Shaw ¦