NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/43199: read(2) returns bad size in multithreaded programs
The following reply was made to PR kern/43199; it has been noted by GNATS.
From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: kern/43199: read(2) returns bad size in multithreaded programs
Date: Fri, 23 Apr 2010 22:54:51 +0000
On Fri, Apr 23, 2010 at 03:05:06PM +0000, Jason Thorpe wrote:
> That all depends on that sort of file descriptor it is and how you read
> from it. If it is a regular file, the behavior is non-deterministic
> unless you use pread(2). If it is a socket, correct behavior requires
> exclusive access to the socket for the duration of the read(2) call.
C&V? As far as I understand, nothing about threads relaxes the basic
requirement that read() calls be atomic. The Linux behavior of playing
fast and loose violates POSIX; they've explicitly decided they don't
care.
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index