Tiny Core Linux

Tiny Core Base => Micro Core => Topic started by: vince on March 07, 2013, 05:05:04 AM

Title: CTRL-C does not raise any SIGINT in text mode
Post by: vince on March 07, 2013, 05:05:04 AM
Hi,

I've noticed that it seems to be impossible to raise a SIGINT by CTRL-C in text mode. I don't not if it's a bug of BusyBox or TinyCore, but the problem only exists in text mode...
Someone have an idea ?  ;D

Thanks !

See you,
Vince
Title: Re: CTRL-C does not raise any SIGINT in text mode
Post by: curaga on March 07, 2013, 05:26:59 AM
Works for me. Perhaps expand on how exactly is it failing for you.
Title: Re: CTRL-C does not raise any SIGINT in text mode
Post by: vince on March 07, 2013, 09:22:20 AM
Well,

When i launch it in QEMU like this :

                                                           qemu-system-x86_64 -name router -monitor stdio -cpu core2duo -enable-kvm -initrd tc-core.gz -kernel tc-kernel -m 512

The CTRL-Z works perfectly but the CTRL+C has not any effect...
Title: Re: CTRL-C does not raise any SIGINT in text mode
Post by: gerald_clark on March 07, 2013, 09:55:40 AM
Now you have qemu between the keyboard and the kernel.
Try it in real iron.
Title: Re: CTRL-C does not raise any SIGINT in text mode
Post by: vince on March 07, 2013, 11:10:34 AM
Well, ok but i need to use it in QEMU  :-\
Title: Re: CTRL-C does not raise any SIGINT in text mode
Post by: Rich on March 07, 2013, 11:56:51 AM
Hi vince
That may be, but first you need to determine where the actual problem is. If it doesn't work in real hardware, report
back here. If it does work, it's a QEMU issue and you should start a thread under Tiny Core on Virtual Machines.
Title: Re: CTRL-C does not raise any SIGINT in text mode
Post by: stream on November 17, 2013, 07:41:04 AM
I got similar problem with 64-bit version of tinycore downloaded from "ports" section. (corepure64 dated 11-May-2013, vmlinuz64 13-Nov-2012). I've used it to run distributed.net 64-bit client. I've successfully learned to boot tinycore to command prompt from both USB stick and as PXE boot. But when I run distributed.net client, it does not recognize Ctrl-C and could not be interrupted.

I've tracked it down to following. When client is run directly from command prompt, it works fine, and Ctrl-C interrupts. But if I'm using simple sh script to mount network (cifs) drive and run client in one command, Ctrl-C is NOT visible anymore. The only workaround currently found is to this run script in "current shell environment" using "." command:
Code: [Select]
. /mnt/sdb/startclient.sh
Only is this case Ctrl-C is passed to application. With any "standard" way to execute commands, like "/mnt/sdb/startclient.sh" or "sh /mnt/sdb/startclient.sh", which probably will load a new copy of shell - it does not.

For me, it look like something is wrong with BusyBox or it's signal handling in this setup.
Title: Re: CTRL-C does not raise any SIGINT in text mode
Post by: Juanito on November 17, 2013, 07:54:45 AM
Do you get the same result if you use the bash extension "onboot"?
Title: Re: CTRL-C does not raise any SIGINT in text mode
Post by: stream on November 17, 2013, 04:22:29 PM
Alas, nothing changed with bash (btw bash extension didn't installed himself as boot shell, it just copied himself to path. System booted to busybox/ash and I have to run bash from command prompt).

Meantime, I found that problem is not specific to TinyCore. When I run same test script on standard Ubuntu system (logged via ssh), I got same problem - Ctrl-C was even displayed on screen, but not passed to application. Application run from command prompt worked flawlessly. Sorry for false alarm. It'll try to investigate the application.
Title: Re: CTRL-C does not raise any SIGINT in text mode
Post by: gerald_clark on November 17, 2013, 04:27:04 PM
Read up on the bash trap command.