From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,223038f1fcb3f4a8,start X-Google-Attributes: gidfee84,public From: laurent_menten@yahoo.com Subject: How to get the pid or proc* in a driver open() interface ??? Date: 1998/03/09 Message-ID: <6e0cli$5lr$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 332187828 X-Http-User-Agent: Mozilla/3.0Gold (X11; I; OSF1 V4.0 alpha) via proxy gateway CERN-HTTPD/3.0 libwww/2.17 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Mon Mar 09 09:28:14 1998 GMT Newsgroups: comp.unix.osf.osf1 So as I develop a DDriver that should be some like assynchronous, my aim is as my DDriver receives an interrupt (from the hardware) it reports it with a signal (SIGIO or other) to the process that opened the special file. The documentation states that there are two functions that works with signals and available for DDrivers writters: psignal() wich get a struct proc* to the process to be signaled. gsignal() wich get a pid_t the the group to be signaled. I thought I can get a proc* either from the DDriver itself in the open() entrypoint or by a process and pass it using ioctl but I found no way to do this; the only way I found to get a proc* is in the buf structure used by block IOs but since my DDriver is a character one... An other solution is to inform my DDriver with an ioctl of the process group ID and to send the signal to the group (not really what I want since there are about 8 minors and they may all be opened by a different child of a same process!) Maybe there is a solution using threads??? Thanks in advance... -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading