Hi,
May the question be a basic stuff!
Say Process A is running, Process B sends signal to Process C.
Now, the kernel has to keep somewhere about the arrival of the signal to Process C,
which will be delivered to Process C while it is scheduled.
Question is Where the kernel keeps the data related to signal?
Is it in proc structure?
or in the task_struct only?..
if it is in task_struct, unless or otherwise kernel wakes up the Process C, how does the kernel access its data structure related to signals?.
Hoping that the question is clear.
Correct me if i am wrong!
ping.
could anyone guide on this.?.
Regards,
Jelari.
No sorry. It's not clear at
No sorry. It's not clear at all what you realy want to know.
Btw. where does Process A come into play? Could you plz reformulate your question?
Let me reframe the question.
Thanks for your reply.
The question is this!.
1. When the process returns from kernel mode to user mode,
it is said that kernel checks if any signal has arrived(is_sig ()).
Where does the kernel keep the details of signals?.
Is it in /proc file system or task_struct?
Regards,
Jelari.
In the task_struct: /*
In the task_struct:
/* signal handlers */ struct signal_struct *signal; struct sighand_struct *sighand; sigset_t blocked, real_blocked; struct sigpending pending;You can find the task_struct for that pid, by simply traversing the list of all task_structs looking for a matching pid.
Still More doubt!
Hi Kedar,
Thanks for the reply. My doubt is cleared now. But still more doubts i m
getting by the way.
Lets say Process A sends a signal to Process B. As you said, the detail of this
'signal' is kept in task_struct of Process B. The question here is
'when the updation on this task_struct of Process B happens' so that,
when the process B is rescheduled, it gets notified that the signal has arrived.
Hoping that i m clear with my doubt!. ;).
Regards,
Jelari.