* send_sigqueue problem..
@ 2005-11-02 22:11 ppunnam
2005-11-03 0:57 ` Fawad Lateef
0 siblings, 1 reply; 2+ messages in thread
From: ppunnam @ 2005-11-02 22:11 UTC (permalink / raw)
To: Linux Kernel Mailing List
Hi guys,
i am trying to use the linux signaling to signal a user process from
the kernel..
i require a reliable(without any signal loss) and fast signaling
mechanism.
i tried to use the send_sigqueue to send the signals...here what i did
1) creted the sigqueue structure using the sigqueue_alloc()..
2) called the send_sigqueue() function...
it worked fine for some time(around 1000 sig) but after that
sigqueue_alloc failing..may be becuse of not enough memory available
to allocate sigqueue..
i got few question about this..
1) does sigqueue structure need to be removed explisitly or it will be
autometically cleared after the signal delivery (i did't used the
sigqueue_free() becuse i dont know when the signal is deliverd).
2)there is any another way i can implement such a signaling mechanism.
i will be thankful for your help...
-prady
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: send_sigqueue problem..
2005-11-02 22:11 send_sigqueue problem ppunnam
@ 2005-11-03 0:57 ` Fawad Lateef
0 siblings, 0 replies; 2+ messages in thread
From: Fawad Lateef @ 2005-11-03 0:57 UTC (permalink / raw)
To: ppunnam; +Cc: Linux Kernel Mailing List
On 11/3/05, ppunnam@kent.edu <ppunnam@kent.edu> wrote:
>
> i am trying to use the linux signaling to signal a user process from
> the kernel..
> i require a reliable(without any signal loss) and fast signaling
> mechanism.
> i tried to use the send_sigqueue to send the signals...here what i did
>
> 1) creted the sigqueue structure using the sigqueue_alloc()..
> 2) called the send_sigqueue() function...
> it worked fine for some time(around 1000 sig) but after that
> sigqueue_alloc failing..may be becuse of not enough memory available
> to allocate sigqueue..
Its obvious that if you allocate some-thing (like through
sigqueue_alloc) then you have to free that too (like through
sigqueue_free)
> i got few question about this..
>
> 1) does sigqueue structure need to be removed explisitly or it will be
> autometically cleared after the signal delivery (i did't used the
> sigqueue_free() becuse i dont know when the signal is deliverd).
yes, you have to remove the structure explicitly as you allocated it
by your-self ! And I think you can call sigqueue_free just after
calling send_sigqueue because the singals are delivered to the process
with the wake_up call and then you can remove your sigqueue structure
(I might be wrong as I am saying this by just going through the
send_sigqueue function, CMIIW)
> 2)there is any another way i can implement such a signaling mechanism.
>
I saw one simple way in signal.c file. send_sig function which sends
signal by-itself (means allocate sigqueue internally) see
http://lxr.linux.no/source/kernel/signal.c#L1249
--
Fawad Lateef
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-11-03 0:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-02 22:11 send_sigqueue problem ppunnam
2005-11-03 0:57 ` Fawad Lateef
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®