Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 May 2016 16:57:06 +1000
From:      Peter Jeremy <peter@rulingia.com>
To:        freebsd-hackers@freebsd.org
Subject:   Re: read(2) and thus bsdiff is limited to 2^31 bytes
Message-ID:  <20160524065706.GG6157@server.rulingia.com>
In-Reply-To: <20160523134106.GB17056@britannica.bec.de>
References:  <b2515cae-b75d-66e9-4207-3cf100ab3ab0@erdgeist.org> <20160522225414.GB24398@britannica.bec.de> <154dab43060.11208cdfd132112.2616144627831899155@nextbsd.org> <20160522231203.GB25503@britannica.bec.de> <154db353935.dd5e87c1133922.4370692881788049491@nextbsd.org> <20160523122131.GC8747@britannica.bec.de> <CALXu0Ud53O5Rg7cKDp8iQFqdcACLk2o0y8Jfn2CpkjqXoZ%2BUCQ@mail.gmail.com> <20160523134106.GB17056@britannica.bec.de>

next in thread | previous in thread | raw e-mail | index | archive | help

--Qz2CZ664xQdCRdPu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2016-May-23 15:41:06 +0200, Joerg Sonnenberger <joerg@bec.de> wrote:
>On Mon, May 23, 2016 at 02:31:18PM +0200, Cedric Blancher wrote:
>> Nothing in POSIX mandates that read()/write() are atomic. Old UNIX,
>> SystemV, AIX, Solaris and HP-UX don't do that nor do they guarantee
>> that.
>
>"I/O is intended to be atomic to ordinary files and pipes and FIFOs."

To expand that a little, the rationale (which is "informative") in
http://pubs.opengroup.org/onlinepubs/009695399/functions/read.html
states: "I/O is intended to be atomic to ordinary files and pipes and
FIFOs. Atomic means that all the bytes from a single operation that
started out together end up together, without interleaving from other
I/O operations."  This is slightly different.  OTOH, the description
does indicate that short reads from files can only occur due to EOF or
interrupt (or exceeding {SSIZE_MAX}).

--=20
Peter Jeremy

--Qz2CZ664xQdCRdPu
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQJ8BAEBCgBmBQJXQ/tCXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRFRUIyOTg2QzMwNjcxRTc0RTY1QzIyN0Ux
NkE1OTdBMEU0QTIwQjM0AAoJEBall6Dkogs0H1oP/jpFY7CXehbh4tjKFQ12Xypb
t0htMZ2YJ9eiXSi1lOs3bSyaUayHnk/ttcT+MttlEzwY7CCa5JoXlCYxHaiYQ89M
bGcVw/hFxov81Dz/aMpTA2ec1dzDkL0BaZGLAnDsu5Yg+U0s5vw5NF8aFPa75Zbv
yc0bHmRZTnSOLJ7JXshFFR6mm84/WxSfpfUjdWmGdATO46yGvs5N1niikcaubaw4
wmThpl3Kf83YnBCfT+jJljQy/XWofjAPXcf14v3KRbGBtGxf3RuU/7YFKttcPedE
fz44iWqX/FLbupXL0qR0sT52krHjZU4nV2Q0EIEfPAKG34saMBq36ejdnGncG/Pd
MoL8CqC7NlPRdL5AVoCBBF7i6VMs3hdpKRg3bpHFr+EBNC6hLj0oQV2CfCrj4dkU
XEz4IgUQmYi3UYsvJvG+VPgD/pHHTi2udw4joladw2qTQtlbO1v+w5CKUokqCoMb
723mnatJPkLq6gRHZd5psMQozouv14T7zbOTJq7ROEM2nf5I6906Roc1Biy+gdmk
ifXLa/EUffOGn98jRWWmQs8i43d5f7HmCdeQ76KI5z5vd3G9MAubU2lLBJ9i7gqW
O0ruNr4u5i4NzpgQ+oA63/qKVku02QreIGfA0N1sqT93rRN9v5MJTXQ1/zE4KF+G
p7xDM5FwJ6O0ZwyLmg9a
=D5EW
-----END PGP SIGNATURE-----

--Qz2CZ664xQdCRdPu--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160524065706.GG6157>