WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: CTRL-C does not raise any SIGINT in text mode  (Read 6954 times)

Offline vince

  • Newbie
  • *
  • Posts: 3
CTRL-C does not raise any SIGINT in text mode
« 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

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: CTRL-C does not raise any SIGINT in text mode
« Reply #1 on: March 07, 2013, 05:26:59 AM »
Works for me. Perhaps expand on how exactly is it failing for you.
The only barriers that can stop you are the ones you create yourself.

Offline vince

  • Newbie
  • *
  • Posts: 3
Re: CTRL-C does not raise any SIGINT in text mode
« Reply #2 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...
« Last Edit: March 07, 2013, 11:10:58 AM by vince »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: CTRL-C does not raise any SIGINT in text mode
« Reply #3 on: March 07, 2013, 09:55:40 AM »
Now you have qemu between the keyboard and the kernel.
Try it in real iron.

Offline vince

  • Newbie
  • *
  • Posts: 3
Re: CTRL-C does not raise any SIGINT in text mode
« Reply #4 on: March 07, 2013, 11:10:34 AM »
Well, ok but i need to use it in QEMU  :-\

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11630
Re: CTRL-C does not raise any SIGINT in text mode
« Reply #5 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.

Offline stream

  • Newbie
  • *
  • Posts: 2
Re: CTRL-C does not raise any SIGINT in text mode
« Reply #6 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.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14817
Re: CTRL-C does not raise any SIGINT in text mode
« Reply #7 on: November 17, 2013, 07:54:45 AM »
Do you get the same result if you use the bash extension "onboot"?

Offline stream

  • Newbie
  • *
  • Posts: 2
Re: CTRL-C does not raise any SIGINT in text mode
« Reply #8 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.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: CTRL-C does not raise any SIGINT in text mode
« Reply #9 on: November 17, 2013, 04:27:04 PM »
Read up on the bash trap command.