(Msg. 1) Posted: Wed Sep 23, 2009 2:28 am
Post subject: Control C not working (sh in initrd after PXE boot) Archived from groups: comp>os>linux>embedded (more info?)
Hi.
I boot my embedded target with PXE, using my own initrd.
The init script launches a sh.
Everything works fine.
The only issue is that the Control C has no effect.
So I have no way to kill a running command (e.g ping...)
The stty looks OK (intr = ^C)
The keys like ^Q, ^D, ^S work fine.
Is it because the signal is blocked ?
Any idea how to make Ctrl C work ?
(Msg. 2) Posted: Thu Sep 24, 2009 1:54 am
Post subject: Re: Control C not working (sh in initrd after PXE boot) [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Hi.
In fact, I had no /dev/tty.
I made a little mknod and now CtrlC is back
(Msg. 3) Posted: Thu Sep 24, 2009 3:21 am
Post subject: Re: Control C not working (sh in initrd after PXE boot) [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
For ctrl-c to work, you need a controlling terminal (the TTY column) and a
process group. If you have a '?' in the TTY column, ctrl-c won't work.
In the past I have seen this happen because of this code in drivers/char/tty_io.c:
if (device == SYSCONS_DEV) {
struct console *c = console_drivers;
while(c && !c->device)
c = c->next;
if (!c)
return -ENODEV;
device = c->device(c);
filp->f_flags |= O_NONBLOCK; /* Don't let /dev/console block */
noctty = 1;
}
Note that O_NOCTTY (no controlling terminal) is forced on whenever
/dev/console is opened (noctty = 1). Possible workarounds:
1) Run getty on something other than /dev/console. For example,
if you console is on the first serial port, run getty on /dev/ttyS0.
I believe this is the "correct" answer.
2) You could also change getty to do a TIOCSCTTY ioctl explicitly after
it has opened the terminal.
3) You could remove the forcing of noctty on from tty_io.c
Christophe wrote:
> Hi.
>
> I boot my embedded target with PXE, using my own initrd.
> The init script launches a sh.
> Everything works fine.
>
> The only issue is that the Control C has no effect.
> So I have no way to kill a running command (e.g ping...)
>
> The stty looks OK (intr = ^C)
> The keys like ^Q, ^D, ^S work fine.
>
> Is it because the signal is blocked ?
> Any idea how to make Ctrl C work ?
>
> Thanks
>
> Chris
network hard disk or drive on uclinux - hi all i m using uclinux. i with network camera(ip) now iwant to store packet from camera to network drive or ethernet....
plzzzzzzzzz - is this forum completely dead? no replies....
Issue in reboot - Hi every one, I'm able to reboot my target board with the processor [mpc5200] using the command [reboot -f] from the....
GoAhead Web Server SSL Integration issue - Hi, I am having the problem while configuring SSL in Linux environment for GoAhead Web Server. I am enabling SSL by..
SBC84500 Startup problem!!! - Can someone please help me, with this probably trivial, but for me unsolvable problem. So I have Axiomtek SBC84500, an...
All times are: Pacific Time (US & Canada) (change)
Page 1 of 1
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum