signal catching during boot-up scripts

John Markham [email protected]
Mon, 6 Nov 2000 09:18:33 -0700


This probably has to do with the controlling tty and default behavior of
ctrl-C in Linux.  The ctrl-alt-del function is set up in your inittab.
While I don't think it is a wise thing to do you should be able to map that
key sequence using the kbrequest in inittab to a function that kills your
program.

John Markham
EnFlex Corp.

-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Dr Jaime V. Miro
Sent: Monday, November 06, 2000 8:13 AM
To: [email protected]; [email protected]
Subject: signal catching during boot-up scripts


Hi

I am not sure whether this question should be addressed to the PeeWeeLinux
community, or to embedded linux in general, so I guess I'll send it to both.

Thanks


******************

I've written a (GNU C++) program whose main(), after creating some threads,
sigwaits for Ctrl+C
to terminate "nicely". It works fine and does what it is supposed to do.
Now, that application is
gonna control an embedded device, for which I've put together an embedded
flavour of Linux (based
on PeeWeeLinux v0.52).  It works fine in that environment too. No probs so
far.

Now, in order to seemlessly (from the user point of view) boot up straight
into the application,
I launch the application from the rc.local script (PeeWeeLinux based on red
hat, i.e. system V
init scripts, I think). The application starts fine, but I can never catch
Ctrl+C (SIGINT). It
hangs up. I can, however,  ctrl+alt+del and the system is shutdown. From
what I see, it looks as
though signals are not passed (from /sbin/init) on to user programs during
boot up, at least not until getting the
mingetty, which I don't need (embedded, no user inputs or terminals, no log
in ... nothing. The
reason to catching the signals at this stage is purely for debugging)

Am I right? or maybe I am barking at the wrong tree and that is not the best
approach to go
anyway? any pointers greatly appreciated.

Thanks in advance,

Jaime


--
To unsubscribe from this list, send a message to [email protected]
with the command "unsubscribe linux-embedded" in the message body.
For more information, see <http://waste.org/mail/linux-embedded>.

---------------------------------------------------
See the list archives at http://adis.on.ca/archives/
See the PWL homepage at  http://peeweelinux.com
---------------------------------------------------