osdir.com
mailing list archive
Mozy Online Backup: 2GB Free. Automatic. Secure.

Subject: ash leaving SIGINT ignored - msg#00063

List: linux.busybox

Date: Prev Next Index Thread: Prev Next Index
[System: mipsel, Linux 2.4.19 kernel, busybox @ April 17th - more at end]

I am seeing some very odd behaviour which appears to involve ash and SIGINT,
and I'm wondering if anybody else has seen this and knows of the cause (and
solution :-)

It appears that ash ignores SIGINT (and SIGQUIT) at various points during its
execution and fails to unignore them in certain circumstances. This was
noticed because people were running "tail -f /var/log/messages" and found
that they couldn't stop the program with ^C. Opening a telnet session to the
box and finding the PID of tail and issuing "kill -INT pid" also did not stop
the program.

Looking at /proc/pid/status shows that as far as the kernel knows, the signal
is ignored (its bit in SigIgn is set), along with SIGTTOU, SIGTSTP, SIGTERM
and SIGQUIT.

^C is bound correctly in the terminal. It makes no difference whether the
tail is run on the serial console or a telnet session. It doesn't have to be
tail - other utilities suffer the same problem (perhaps it could be related
to things which are doing blocking system calls?).

To eliminate the possible interference of external applications, I switched
to testing this using "trap". So with 'trap "echo sigint received" 2' set, I
press CTRL-C. I just get the shell prompt printed again and no message.

Other things tried: taking /bin/bash and running that. The trap does work in
that, but if I start ash and try in ash, it doesn't work in ash BUT it then
appears to stop working in bash too - either in the parent shell or in a
sub-shell of ash.

The behaviour seems to be extremely inconsistent and not reliably
reproducible. The trap test seems to reliably not work most of the time, but
does work occasionally. We have devised several test scenarios but find that
executing the tests under (at least what appear to be) identical conditions
give us different results.

This is driving a lot of us barmy here - does anybody have any idea what
could be causing this? A bug in ash? A bug in the kernel? A bug in
something else?

Another test we tried was to alter the /etc/init.d/rcS script (which will be
being executed by ash) to cat the /proc/$$/status file, set the trap and then
"kill -INT $$". *No* signals were ignored in SigIgn and the signal was
caught and the message was printed. This is reproducible (5 times). The
inittab file contains just:

::restart:/sbin/init
::respawn:-/bin/login
::sysinit:/etc/init.d/rcS

This is using busybox's init. /bin/login contains:

#!/bin/sh
exec /bin/sh

(i.e. it gives you a shell straight away with no authentication).

More details on setup:

Little-endian MIPS R4Kc processor, busybox 0.61 development version as of
April 17th 2003, Linux kernel 2.4.19 from linux-mips.org with board-specific
additions and drivers. ash is the default shell. Job control is enabled.



--
Stewart Brodie, Senior Software Engineer, available from the end of June


Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

Re: SMTP and busybox?

Russ Dill wrote: On Wed, 2003-04-16 at 23:36, Steven Scholz wrote: Hi there, has someone considered to implement some SMTP functionality into busybox? My embedded system should be able to send emails. So far I only found libSMTP (which unfortunatly needs glib). see http://libsmtp.berlios.de/ Are there other, smaller, better solutions to solve the problem? The reason nothing exists is because sending mail (to an smtp server) is so incredibly trivial. Read the RFC sometime, sending mail with telnet is just as easy as using a mail client. (for embedded purposes, you probably want nc) :o) Andreas Banze just pointed me to SMTPclient found on http://www.engelschall.com/sw/smtpclient/ That's 12kB on MPC8xx. So that's small enough for me. There's probably no need to port this to busybox just to same some more bytes !? Thanks, Steven

Next Message by Date: click to view message preview

a controller hangs - solving tips !!

--- mount me <linladn@xxxxxxxxxxx> wrote: > Hello Experts, > Sorry... away from the topic,,,, but you embedded > guys should have come across the below problem. > So,...do help this chap...... ! > > I have a board with ATMEL 89c51 interfaced > with 1 MB data memory and 0.5 MB program Memory, > a keypad and lcd interface. > I am able to port and run a particular application > built using KEIL successfully in the 89c51 > controller > and store the data got from the user into the flash. > > The software is perfect. I have many such boards > and it runs perfectly. > > But, at times > the board/controller goes into a hanging condition > while getting the data from the user and the data in > > the flash memory is lost. > Using our another serial port software i am able to > get the data stored just before the controller went > into the hanging condition from the flash memory in > > the board . > > The same board works fine the other day > with the same software in the same condition in > which the board came to standstill the previous day. > > I am really confused . I am unable to find or > predict > the moment it will go into hanging condition . I > am unable to find the moment i will lose my data. > It hangs at certain times if the data is low > and at times if the data is high . > I am Really confused . > > Has anyone come across such problem ? > > where is the problem ? y is it unpredictable like > windows ?? Should the problem be with the software > or with the hardware ? but most of the times the > software works and there is no such hanging problem > . > But why should it hang at certain times ??? > > How to avoid it ?Plz do help me. > > Xpecting ur reply, > karthik bala guru.T ________________________________________________________________________ Missed your favourite TV serial last night? Try the new, Yahoo! TV. visit http://in.tv.yahoo.com

Previous Message by Thread: click to view message preview

SMTP and busybox?

Hi there, has someone considered to implement some SMTP functionality into busybox? My embedded system should be able to send emails. So far I only found libSMTP (which unfortunatly needs glib). see http://libsmtp.berlios.de/ Are there other, smaller, better solutions to solve the problem? Thanks, Steven

Next Message by Thread: click to view message preview

Re: ash leaving SIGINT ignored

Stewart, > It appears that ash ignores SIGINT (and SIGQUIT) at various points during its > This is using busybox's init. /bin/login contains: > > #!/bin/sh > exec /bin/sh try add --login --w vodz
Sign up for updates to this mailing list. email:
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by