Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Sep 2008 16:37:25 +0100
From:      "kr Lekha" <kr.lekha@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   How to Catch Signals in kernel threads
Message-ID:  <96b2ec350809060837w33353e00ja741d6e0077b4ab0@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi,
I wanted to kill my kernel threads created in a kernel module gracefully .

I tired psignal(kthread, SIGKILL); this signal reschedules the thread.
But how can this thread know that SIGKILL was called and i can exit from the
thread?

I tired to register a signal handler for SIGABRT / any other signal for a
kthread.
Can we register a signal handler for kthreads?

I would appreciate if anyone can share information as to how to catch
signals in kernel threads.


I am developing my kernel module in FreeBSD 6.2 where kthread_create creates
a proc.
Thanks and best regards,
Lekha



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?96b2ec350809060837w33353e00ja741d6e0077b4ab0>