Signals in Unix Solaris
I posted this in the linux forums, but no one seems to know about this :(
So here I go:
I am doing a project to stimulate the scheduing policy of an OS under Unix Solaris.
Its something like that:
A process, say A will communicate to another process, which is the OS, and then execute the system call, pause();
The stimulated OS will then have to use sigsend(); to send a SIGCONT signal to wake process A up. And OS can also use sigsend() to send a SIGSTOP signal to suspend process A.
Now, my problem is that I cant get SIGCONT to work. Whenever I do a SIGSTOP, the process gets suspended and moved to the background. So even after SIGCONT, that process does not continue on the shell where it got started (console).
SIGCONT also does not wake the process up when I first called it. pause() should block a process until it gets a signal (in this case SIGCONT).
Am I using SIGCONT correctly? If not how should I use it?
Thanks in advance.