Date: Mon, 20 Mar 2006 12:07:49 +0100 (CET) From: Volker Stolz <vs@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: standards/94729: fcntl() throws undocumented ENOTTY Message-ID: <200603201107.k2KB7n5w011208@i2.informatik.rwth-aachen.de> Resent-Message-ID: <200603201110.k2KBAFZw086037@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 94729 >Category: standards >Synopsis: fcntl() throws undocumented ENOTTY >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Mar 20 11:10:15 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Volker Stolz >Release: FreeBSD 6.1-BETA3 i386 >Organization: Lehrstuhl für Informatik II; RWTH Aachen (c) Universität >Environment: System: FreeBSD menelaos.informatik.rwth-aachen.de 6.1-BETA3 FreeBSD 6.1-BETA3 #1: Mon Mar 13 10:45:03 CET 2006 root@menelaos.informatik.rwth-aachen.de:/usr/obj/usr/src/sys/MENELAOS i386 >Description: When trying to set non-blocking IO on e.g. /dev/null, ENOTTY is returned. This is neither documented in the FreeBSD man page nor behaviour covered by IEEE Std 1003.1-2001. >From browsing our bug-tracker, there seem to be several instances of third-party software (mostly in ports) which required FreeBSD-specific patches. I understand that the Posix-description doesn't give us an easy way out, but we should at least document this in our own man page. >How-To-Repeat: Run the program below, redirecting input from /dev/null: ./a.out </dev/null yikes!: Inappropriate ioctl for device >Fix: Unknown; should at least be documented. Maybe setting O_NONBLOCK on /dev/null should not fail? --- fcntltest.c begins here --- #include <fcntl.h> #include <stdio.h> void main() { if (fcntl(0,F_SETFL,O_NONBLOCK) != 0) perror("yikes!"); return 0; } --- fcntltest.c ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603201107.k2KB7n5w011208>