Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Mar 2009 17:38:48 -0400
From:      Joe Marcus Clarke <marcus@FreeBSD.org>
To:        current <current@FreeBSD.org>
Cc:        David Schultz <das@FreeBSD.org>
Subject:   getline incompatibility with Linux
Message-ID:  <1238362728.73736.165.camel@shumai.marcuscom.com>

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

--=-exyVlah01fXDdHZ2S7jt
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

The new getline() function in FreeBSD is not completely compatible with
Linux's implementation.  The result is that programs which assume Linux
getline may enter a tight infinite loop.

According to the Linux getline(3) manpage, getline(3) returns -1 on
error (including EOF).  Our implementation returns 0 on EOF.  Would it
be possible to return -1 on EOF in our implementation?

Joe

--=20
Joe Marcus Clarke
FreeBSD GNOME Team      ::      gnome@FreeBSD.org
FreeNode / #freebsd-gnome
http://www.FreeBSD.org/gnome

--=-exyVlah01fXDdHZ2S7jt
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEABECAAYFAknP6mYACgkQb2iPiv4Uz4cTqACfVso80ClcvY0UmAcjsMicaMd6
WQEAoI1cQ/KTPY4pQYDmCGCyk1QNF5rO
=Z+Mn
-----END PGP SIGNATURE-----

--=-exyVlah01fXDdHZ2S7jt--




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