This is the mail archive of the
cygwin
mailing list for the Cygwin project.
fcntl bug
- From: Eric Blake <ebb9 at byu dot net>
- To: cygwin at cygwin dot com
- Date: Fri, 21 Aug 2009 14:53:24 -0600
- Subject: fcntl bug
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
fcntl is supposed to reject attempts to duplicate to an out-of-range fd.
On Linux, this correctly fails with EINVAL.
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#include <stdio.h>
int main()
{
int i = fcntl (0, F_DUPFD, -1);
printf ("%d %d %s\n", i, errno, strerror (errno));
return 0;
}
- --
Don't work too hard, make some time for fun as well!
Eric Blake ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkqPCUQACgkQ84KuGfSFAYAdegCeLzWjDGyi8tVPNoRnt+BIPQF5
lq4AoNHrJnkOp9CnQSUrtHzxXTA1YVrM
=3f49
-----END PGP SIGNATURE-----
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple