Say I have a wrapper function for each file system related system calls e.g, open(), close(), creat() etc and inside each wrapper function I need to find out the process id of th开发者_运维知识库e process making the syscall. Would be gratefull for some pointers. Thanks....
You're probably looking for the getpid(2)
system call; but Jeremiah asks good questions. :)
精彩评论