Question

I would like to be able to use the name of the process in servers/sched/schedule.c however schedproc structure doesn't contain the name variable. I thought about using endpoint_lookup() function to get the pointer to the proc structure but since it is defined in kernel/proc.c I wasn't sure if I could call it within schedule.c (from user space).

Était-ce utile?

La solution

In user space, you could use /proc/<pid>/cmdline to get the process's name, like

$cat /proc/$$/cmdline 

bash

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top