From owner-freebsd-hackers Tue Feb 13 11:40:35 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from critter.freebsd.dk (flutter.freebsd.dk [212.242.40.147]) by hub.freebsd.org (Postfix) with ESMTP id B251337B503 for ; Tue, 13 Feb 2001 11:40:29 -0800 (PST) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.1/8.11.1) with ESMTP id f1DJeUw53092; Tue, 13 Feb 2001 20:40:30 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: David Rufino Cc: hackers@FreeBSD.ORG Subject: Re: character device driver In-Reply-To: Your message of "Tue, 13 Feb 2001 19:31:50 GMT." <20010213193150.A882@btinternet.com> Date: Tue, 13 Feb 2001 20:40:30 +0100 Message-ID: <53090.982093230@critter> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <20010213193150.A882@btinternet.com>, David Rufino writes: >Hi, > >I'm writing a character device driver in which each minor device can be >opened more than once. When a device is opened is there a way to associate >some private data for each opened instance ? Thanks. It is not possible to do this. There is no reliable way to associate a call into the device driver with a particular file descriptor, and in particular the driver cannot find out what happens in if dup(2) is used. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message