What’s wrong with using one of the following?
extern struct task_struct *find_task_by_vpid(pid_t nr);
extern struct task_struct *find_task_by_pid_ns(pid_t nr,
struct pid_namespace *ns);
More Related Contents:
- How to make child process die after parent exits?
- How to know linux scheduler time slice?
- Measure time in Linux – time vs clock vs getrusage vs clock_gettime vs gettimeofday vs timespec_get?
- What is “:-!!” in C code?
- What are vdso and vsyscall?
- Whole one core dedicated to single process
- Building a kernel module from several source files which one of them has the same name as the module
- How to wait for exit of non-children processes
- Why am I able to perform floating point operations inside a Linux kernel module?
- How to access mmaped /dev/mem without crashing the Linux kernel?
- Is there a macro definition to check the Linux kernel version?
- How can I get a filename from a file descriptor inside a kernel module?
- What is the difference between a Linux platform driver and normal device driver?
- Why my kernel log is not showing the latest output?
- How to flush the CPU cache for a region of address space in Linux?
- get command output in pipe, C for Linux
- Checking if errno != EINTR: what does it mean?
- mmap, msync and linux process termination
- How to create a new Linux kernel scheduler
- How to use sched_getaffinity and sched_setaffinity in Linux from C?
- How to use lockdep feature in linux kernel for deadlock detection
- /proc/[pid]/pagemaps and /proc/[pid]/maps | linux
- How to print exact value of the program counter in C
- Where can I find system call source code?
- Capturing signals in C
- How to use shared memory with Linux in C
- Is it safe to fork from within a thread?
- How to use the addr2line command in Linux?
- I do not understand how execlp() works in Linux
- why C clock() returns 0