简体   繁体   中英

Linux C programming with signal & process

I want ask How can I get pid and uid of sending process?????

I want make program which use signal.

I made sig_handler which print uid of sending process, pid of sending process.

And by using SIGCHLD I want print uid and pid of sending process.

How can I do that?

Your question is similar to others here: see How can I tell in Linux which process sent my process a signal (and probably others) for Linux-specific details.

If your problem is really about ways processes on Linux can communicate with each other - that is, general interprocess communication (IPC) - there are also lots of resources here on Stackoverflow and elsewhere: Which Linux IPC technique to use? , among others.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM