[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#300640: marked as done (glibc: select() buggy on Hurd)



Your message dated Tue, 6 Mar 2007 22:28:37 +0100
with message-id <20070306212837.GA15815@wavehammer.waldi.eu.org>
and subject line Bug#300640: glibc: select() buggy on Hurd
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: glibc
Version: 2.3.2.ds1-20


Coin,

Here is a simple poll() test case :
(hurd poll() directly uses hurd_select())
<quote file="poll.c">
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/poll.h>

int main(void)
{
        struct pollfd   pfd[1];
        int             fd, ret;
        char            c;

        fd = open("zzz", O_RDONLY);
        pfd[0].fd = fd;
        pfd[0].events = POLLIN;
        while ((ret = poll(pfd, 1, 10)) >= 0)
        {
                if (ret == 0)
                        continue;
                if (pfd[0].revents & POLLERR)
                        break;
                if (pfd[0].revents & POLLIN)
                {
                        printf("DATA !\n");
                        read(fd, &c, 1);
                }
        }

        return 0;
}
</quote>

Test :
mkfifo zzz
./poll &
echo "coin" >zzz


Result on linux :
DATA !
DATA !
DATA !
DATA !
DATA !

I've got 1 "DATA !" per character (including "\n").

Result on Hurd :
DATA !
DATA !
DATA !
DATA !
DATA !
DATA !
DATA !
[...]

I've got an infinite number of "DATA !".

It is like if the select state is not reset after reading.

I tried to find the bug but i need help, this software is not an easy peace.

Thanks.

-- 
Marc Dequènes (Duck)

Attachment: pgpCveH6n5QMh.pgp
Description: PGP signature


--- End Message ---
--- Begin Message ---
On Tue, Mar 06, 2007 at 10:00:52PM +0100, Samuel Thibault wrote:
> Should we really keep this bug opened?  I agree with Bastian Blank that
> the program should check the result of read() so as to discover end of
> file.

No. It is no bug. I'm just closing it therefor.

Bastian

-- 
There is a multi-legged creature crawling on your shoulder.
		-- Spock, "A Taste of Armageddon", stardate 3193.9

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply to: