Networking Forums

Networking Forums > Computer Networking > Linux Networking > killing a kernel thread ....... UDP server (kernel module).........

Reply
Thread Tools Display Modes

killing a kernel thread ....... UDP server (kernel module).........

 
 
alex
Guest
Posts: n/a

 
      09-20-2006, 11:26 AM
hi friends .....plz help .. i am facing a problem while writing the UDP
server as a kernel module ...

actual problem is ...

i am crating a kernel thread using "kernel_thread" call, to
recv data from clients ..before creating the thread i am creating
socket and binding it with some port XXX . after that my thread will be
blocked on the call sock_recvmsg . ... at that time i am trying to kill
the thread ...... i tried this in two ways .

1. I tried using kill_proc call from the module (from out side of that
thread ) .. but it is not working .... i don't know the reason .... my
statement is kill_proc(pid,SIGTERM,1);

2. so i took a variable "stopThread" and changed the value to "TRUE" to
close the thread. in the thread function i am checking the value of
that variable "stopThread" , if that is true it will return from that
thread , but the problem is .. thread was already blocked on the call
"sock_recvmsg" .. once it come out of that call it will execute the
return statement and get terminated ... but it is not happening
...........

if any one has the answer to this problem ... plz help me....

thank you for advance...

daya.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get data in kernel SEND buffer for a TCP socket from a netfilter based kernel module Rohit Linux Networking 0 05-10-2007 11:27 AM
Does select thread safe in kernel 2.4.x Readon Shaw Linux Networking 1 09-07-2006 07:20 AM
UDP server as a kernel module alex Linux Networking 2 09-04-2006 09:48 AM
Re: Sending UDP Packets from a kernel thread/module Tim Roberts Linux Networking 10 12-19-2005 01:32 PM
Re: Sending UDP Packets from a kernel thread/module phil-news-nospam@ipal.net Linux Networking 0 12-05-2005 11:54 AM



1 2 3 4 5 6 7 8 9 10 11