NetBSD Problem Report #3928

Received: (qmail 473 invoked from network); 31 Jul 1997 13:48:11 -0000
Message-Id: <199707311351.PAA13725@econahja.econ.gu.se>
Date: Thu, 31 Jul 1997 15:51:54 +0200 (MET DST)
From: Anders.Hjalmarsson@economics.gu.se
Reply-To: Anders.Hjalmarsson@economics.gu.se
To: gnats-bugs@gnats.netbsd.org
Subject: /dev/sound does not handle fcntl(F_SETFL)
X-Send-Pr-Version: 3.95

>Number:         3928
>Category:       kern
>Synopsis:       /dev/sound does not handle fcntl(F_SETFL)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 31 06:50:01 +0000 1997
>Closed-Date:    Fri Aug 01 17:48:09 +0000 1997
>Last-Modified:  Fri Aug 01 17:48:37 +0000 1997
>Originator:     Anders Hjalmarsson
>Release:        NetBSD-current Jul-30 1997
>Organization:
>Environment:
NetBSD econahj1.econ.gu.se 1.2G NetBSD 1.2G (ECONAHJ1) #53: Thu Jul 31 15:15:53 MET DST 1997     econahja@econahja.econ.gu.se:/usr/src/sys/arch/i386/compile/ECONAHJ1 i386


>Description:
/dev/sound does not handle fcntl(F_SETFL) even if you set them to
the result of a previous fcntl(F_GETFL)

>How-To-Repeat:
Run the following program and see if fail in fcntl( F_SETFL )

#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>

int main()
{
	int fd, fl;

	if ((fd = open("/dev/sound", O_WRONLY, 0)) == -1) {
		perror("open");
		exit(1);
	}
	if ((fl = fcntl(fd, F_GETFL, 0)) == -1) {
		perror("fcntl F_GETFL");
		exit(1);
	}
	if (fcntl(fd, F_SETFL, fl) == -1) {
		perror("fcntl F_SETFL");
		exit(1);
	}
	exit(0);
}

>Fix:
Add case FIONBIO to audio_ioctl (/usr/src/sys/dev/audio.c), but I do not
know what it should do.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: augustss 
State-Changed-When: Fri Aug 1 10:48:09 PDT 1997 
State-Changed-Why:  
Bug fixed (trivial fix). 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.