Full process name from task_struct

前端 未结 2 1941
抹茶落季
抹茶落季 2021-02-08 08:32

I want to get full process name from struct task_struct. The comm field stores only 16 characters, while process name can be longer. Is there any way t

2条回答
  •  臣服心动
    2021-02-08 09:29

    Just use current->comm and you can see the name.

    Example:

    printk(KERN_ALERT "THREAD NAME = %s\n", current->comm);
    

提交回复
热议问题