Re: Pid lkm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Il ven, 2002-05-24 alle 16:56, John Tyner ha scritto:
> Maybe he just wants the pid of the process executing his module? ...
> current->pid
Sorry but I can't understand the problem. The module is not executed by
a process. insmod link it in the kernel so the module becomes part of
the kernel itself. If he needs the module insmod pid, he can not have it
using the module itself.
Suppose we have:
init_module() {
	printk(KERN_INFO "insmod pid is %d\n", current->pid);
}

When init_module finished are you sure current referes to insmod
process? 
-- 
$>cd /pub
$>more beer

(0>
//\  Perego Paolo <p_perego@modiano.com> - www.sikurezza.org/angel
V_/_ 'It's seems the hardest life I've never known'
I'm Linux drow 2.4.17-4GB - SuSE Linux 7.3 (i386) powered.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux