Subject: Re: oh yay (pkgsrc/audio/cdd vs cddb)
To: Wolfgang Rupprecht <>
From: Simon Burge <>
List: current-users
Date: 03/13/2001 10:46:43
Wolfgang Rupprecht wrote:

> Simon Burge writes:
> > Would using dup2(2) be a way to hack around this?
> I don't think so, if I understand the issue correctly.  The man page
> seems to be hinting that the /dev/cd0d's reference count must drop
> down to zero before the driver lets the new disc's data appear to the
> user.

I was thinking of something along the lines of:

	tmpfd = open(device, ...);
	dup2(tmpfd, cdromfd);

That shouldn't have any ref-count problems (unless of course cdromfd is
dup()'d anywhere else).

Simon Burge                            <>
NetBSD CDs, Support and Service: