From: haojian.zhuang@gmail.com (Haojian Zhuang)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Enabling Signals in kernel
Date: Wed, 13 Apr 2011 09:01:00 +0800 [thread overview]
Message-ID: <BANLkTi=ofpt1TY5LH35kEAfTt9tBfUU5yA@mail.gmail.com> (raw)
In-Reply-To: <BANLkTik3iu2jHNL0BXP7ZFif1dEO7ic2jQ@mail.gmail.com>
On Wed, Apr 13, 2011 at 12:06 AM, Vijay Ram Chitrapu
<chitrapu.vijayram@gmail.com> wrote:
> Hi experts,
>
> I am using MVL6.0 in my project and have customized the kernel as per
> the requirement. However, i am facing a problem where the Ctrl+C
> signal doesn't get caught (or not sure if it is even generated) on the
> target platform. I have tried using the "trap" at the shell to capture
> the signal but the signal just doesn't get caught. Below is what i
> have done to try the trap way
>
> trap " " INT
It means that ignore INT signal.
> echo "Catching Ctrl+C signal"
> trap INT
> sleep 5
>
You can try this to capture "Ctrl+C" signal.
trap 'echo "Catching Ctrl+C signal"' 2
> Putting this piece of code into a script doesn't catch the signal
> SIGINT (ctrl+c). To understand if it was a problem with the shell, i
> wrote a C code to register my own signal handler for SIGINT signal. To
> verify the correctness of the code, i executed the C code on the HOST
> server and it works well there (signal handler gets invoked when
> ctrl+c is pressed). Whereas, the same C code doesn't catch the Ctr+C
> signal in the target platform.
>
> Can someone tell me if there is any specific way to identify is there
> a way or rather is there a need to enable the signals explicitly while
> creating the config file for the kernel? Below is the output of "stty
> -a" command at the shell where i need to catch the Ctrl+C signal.
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> / # stty -a
> speed 115200 baud; rows 24; columns 80;
> intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
> eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
> werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
> -parenb -parodd cs8 hupcl -cstopb cread clocal crtscts
> -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
> -iuclc -ixany -imaxbel
> opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
> isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
> echoctl echoke
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Regards,
> Vijay
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
next prev parent reply other threads:[~2011-04-13 1:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-12 16:06 Enabling Signals in kernel Vijay Ram Chitrapu
2011-04-13 1:01 ` Haojian Zhuang [this message]
2011-04-13 19:30 ` julie Sullivan
2011-04-13 17:20 ` Missing 1GB RAM, where is it? Andrzej Kardas
2011-04-14 2:42 ` Mulyadi Santosa
2011-04-14 11:27 ` andrzej-kardas
2011-04-14 12:17 ` Mulyadi Santosa
2011-04-14 15:23 ` Andrzej Kardas
2011-04-16 6:07 ` Mulyadi Santosa
2011-04-14 15:09 ` Adrian Cornish
2011-04-14 15:43 ` Andrzej Kardas
2011-04-14 16:12 ` Haojian Zhuang
2011-04-15 0:45 ` Haojian Zhuang
[not found] ` <BANLkTik7g8vEf6X+suzwbXD1b4ow1__2xQ@mail.gmail.com>
2011-04-17 7:58 ` Missing 1GB RAM, where is it? - SUMMARY Andrzej Kardas
2011-04-17 15:31 ` julie Sullivan
2011-04-18 10:17 ` andrzej-kardas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='BANLkTi=ofpt1TY5LH35kEAfTt9tBfUU5yA@mail.gmail.com' \
--to=haojian.zhuang@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).