I am working on a project to port a whole bunch of OS-9(microware) code to linux.
The signal handling functionality in OS-9 allows you to create your own signals or at least that is how it was implemented(intercept() function). I don't really know much about linux signals and have been trying to teach myself as I go along. I have got a sigaction route with sigusr1 working just to get myself familiar. In the legacy OS-9 code, there are 10s of user defined signals. What would be best way to accomplish this in linux?
The OS-9 signal handler is a function with a big switch statement. Each signal corresponds(sets) to a global variable that is acted on somewhere else in that processes code.
Thanks, Seth
You need to use signal numbers between SIGRTMIN and SIGRTMAX. This is discussed here
You send a signal with kill(if you have no data) or sigqueue(if you have data).
You receive your signal with sigaction. Look at the sigaction's man pages to find where sigqueue's data will be stored.
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.