From owner-freebsd-hackers Sat Aug 2 06:04:07 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id GAA22557 for hackers-outgoing; Sat, 2 Aug 1997 06:04:07 -0700 (PDT) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id GAA22539 for ; Sat, 2 Aug 1997 06:04:00 -0700 (PDT) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id OAA08390; Sat, 2 Aug 1997 14:05:17 +0200 From: Luigi Rizzo Message-Id: <199708021205.OAA08390@labinfo.iet.unipi.it> Subject: Re: device close behaviour - a question To: msmith@atrad.adelaide.edu.au (Michael Smith) Date: Sat, 2 Aug 1997 14:05:16 +0200 (MET DST) Cc: jas@flyingfox.com, msmith@atrad.adelaide.edu.au, hackers@FreeBSD.ORG In-Reply-To: <199708020252.MAA08782@genesis.atrad.adelaide.edu.au> from "Michael Smith" at Aug 2, 97 12:21:59 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > then iterate over the devices, until an open() call does not return > > EBUSY (just like looking for an available pty). Since each "device" > > is open at most once, the device_close() routine gets called on > > every user-level close() call. > > This scheme works well if you are at liberty to enforce the behaviour > of userland programs. Luigi is faced with remaining compatible with > previous versions and also with the Linux interface, which is a fairly however, to be honest, in this case there is no backward compatibility issue since I don't think linux (voxware) allows multiple opens on the sound device. But boy, it's nice to make 1sec echos cat /dev/audio1 | dd obs=8000 > /dev/audio1 Cheers Luigi