linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: Alex Zeffertt <ajz@cambridgebroadband.com>
Cc: markc@mail.com,
	"linuxppc-embedded@lists.linuxppc.org"
	<linuxppc-embedded@lists.linuxppc.org>
Subject: Re: Control-C in bash ???
Date: Tue, 14 Jan 2003 15:50:41 +0100	[thread overview]
Message-ID: <20030114145047.03432C608E@atlas.denx.de> (raw)
In-Reply-To: Your message of "14 Jan 2003 13:31:45 GMT." <1042551106.8605.109.camel@zambia>


In message <1042551106.8605.109.camel@zambia> you wrote:
>
> I had exactly the same problem with ash (busybox version), but I found
> it went away when I replaced
>
> ttyS0::respawn:-/bin/sh
>
> in /etc/inittab with
>
> ttyS0::respawn:/sbin/login
>
> I have no idea why....

I explained this a couple of times before on the list:

Signal handling depends on a controlling tty. If you  start  a  shell
directly, you don't get one, so ^C will not work.

We modified the login in our ELDK a bit to assign a controlling  tty,
so any shell started from login will behave as expected.

This is all the magic that it takes:

-> cat /opt/eldk/build/target_rpms/util-linux/SOURCES/login-eldk.patch
--- util-linux-2.11f/login-utils/login.c.orig   Fri Jun 21 14:17:36 2002
+++ util-linux-2.11f/login-utils/login.c        Fri Jun 21 14:18:34 2002
@@ -259,6 +259,7 @@

     flags &= ~O_NONBLOCK;
     fcntl(fd, F_SETFL, flags);
+    ioctl(fd, TIOCSCTTY);

     for (i = 0 ; i < fd ; i++)
       close(i);


Best regards,

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
"Free markets select for winning solutions."        - Eric S. Raymond

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2003-01-14 14:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-13 19:09 Control-C in bash ??? Mark Chambers
2003-01-13 19:20 ` Der Herr Hofrat
2003-01-13 19:30 ` Wolfgang Denk
2003-01-14 13:44   ` Mark Chambers
2003-01-13 19:48 ` Chris Wedgwood
2003-01-14 13:31 ` Alex Zeffertt
2003-01-14 14:50   ` Wolfgang Denk [this message]
2003-01-14 14:51   ` Dan Malek
  -- strict thread matches above, loose matches on Subject: below --
2003-01-13 19:16 Kerl, John
2003-01-13 19:39 ` Mark Chambers
2003-01-13 19:25 Kerl, John
2003-01-13 19:59 Kerl, John

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030114145047.03432C608E@atlas.denx.de \
    --to=wd@denx.de \
    --cc=ajz@cambridgebroadband.com \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    --cc=markc@mail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).