info-cvs
[Top][All Lists]
Advanced

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

Re: Possible race in pserver leading to broken pipe error?


From: Derek Robert Price
Subject: Re: Possible race in pserver leading to broken pipe error?
Date: Tue, 10 Feb 2004 20:05:49 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Derek Robert Price wrote:

> Larry Jones wrote:
>
> Derek Robert Price writes:
> >
> >>Yep, it just needed fflushes.  Working patch attached.  Comments before
> >>I commit?
> >
> >fflush()/close() is a no-no -- you want fclose() instead.  Once you've
> >attached a stream to a file descriptor, you have to be very careful
> >about what you do to the file descriptor -- it's best to only use the
> >stream from then on.
>
> Why, if you don't mind me asking?  I couldn't find a man page for a file
> descriptor flush - is there some way I could have flushed the pipe
> without attaching the stream?


It's been awhile since I played concurrently with descriptors and
streams, but I thought I recalled that the only real issue was that they
were using the same descriptor, so operations on one affected the other,
as opposed to a dup() of a file descriptor, which keeps track of two
sets of data about the file, two modes, two pointers, etc.

Derek
- --
                *8^)

Email: address@hidden

Get CVS support at <http://ximbiot.com>!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org

iD8DBQFAKX/tLD1OTBfyMaQRAuVTAKCasxpUkWlM6jGF1PHR9HZSRYOUcgCgtQZg
N9uYlx7q4ovpF9VflnmqI2A=
=d/5Y
-----END PGP SIGNATURE-----






reply via email to

[Prev in Thread] Current Thread [Next in Thread]