驅動程式 - Linux Device Driver(LDD) - 如何取得目前PID



參考資訊:
https://stackoverflow.com/questions/11915728/getting-user-process-pid-when-writing-linux-kernel-module

#include <linux/sched.h>

printk("current PID: %d", task_pid_nr(current));