[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: Get number of bytes available in PeekNamedPipe (take 2)
From:       Alexandre Julliard <julliard () winehq ! com>
Date:       2002-07-25 17:42:54
[Download RAW message or body]

Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> writes:

> PeekNamedPipe must report when the pipe is broken, otherwise some programs
> wait forever for a message from the already disappeared program. Without
> checking for a broken other end, FIONREAD always reports "0 bytes". I don't
> see how I can doi that on the client side, beside exporting the
> pipe(_user)_get_fd functions directly. Programming hints are welcome.

OK, I was thinking this would be checked in read(), but I guess the
app may never call read() if PeekNamedPipe returns 0 available
bytes. You should be able to check for a closed pipe using poll() and
testing for POLLHUP.

-- 
Alexandre Julliard
julliard@winehq.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic