From: Rob Landley <rob@landley.net>
To: user-mode-linux-devel@lists.sourceforge.net
Cc: Henrik Nordstrom <uml@hno.marasystems.com>
Subject: Re: [uml-devel] Any way to give /dev/console a controlling TTY?
Date: Sat, 24 Sep 2005 09:43:54 -0500 [thread overview]
Message-ID: <200509240943.54587.rob@landley.net> (raw)
In-Reply-To: <Pine.LNX.4.61.0509232048230.14136@filer.marasystems.com>
On Friday 23 September 2005 13:56, Henrik Nordstrom wrote:
> On Fri, 23 Sep 2005, Rob Landley wrote:
> >> Anybody see an obvious way to make /dev/console a controlling TTY?
>
> The user-space process who wants it as a controlling tty needs to run
>
> ioctl(0, TIOCSCTTY, (void *) 1);
>
> You should also take care to set up the termios parameters correctly.
>
> At http://marasystems.com/download/ctty/ you can find a little tool we use
> in embedded systems making /dev/console a controlling TTY. We use from
> inittab in the main console entries (single and console).
So I fire up UML:
./linux rootfstype=hostfs rw init=/bin/sh LD_ASSUME_KERNEL=2.4.1
And I run the above program "./ctty /bin/sh"
And I get:
sh-3.00# ./ctty /bin/sh
idr_remove called for id=5 which is not allocated.
08b77930: [<080fe55f>] sub_remove+0xef/0x100
08b77990: [<080fe59f>] idr_remove+0x2f/0xc0
08b779b0: [<08107282>] release_dev+0x5d2/0x6f0
08b77a30: [<08106745>] init_dev+0x1b5/0x5b0
08b77a80: [<081074ec>] tty_open+0x14c/0x370
08b77a90: [<080b38bf>] cdev_get+0xf/0x20
08b77aa0: [<080b3a8f>] exact_lock+0xf/0x20
08b77ab0: [<08111130>] kobj_lookup+0xe0/0xf0
08b77ad8: [<081073a0>] tty_open+0x0/0x370
08b77ae0: [<080b398e>] chrdev_open+0x9e/0x120
08b77af0: [<08061757>] buffer_op+0x47/0x80
08b77af4: [<08061590>] do_buffer_op+0x0/0x180
08b77b10: [<080a971a>] dentry_open+0x10a/0x190
08b77b2c: [<080ec008>] empty_dir+0x18/0x330
08b77b30: [<080a9608>] filp_open+0x68/0x70
08b77b74: [<080ec000>] empty_dir+0x10/0x330
08b77b90: [<080a9949>] sys_open+0x49/0x90
08b77bb0: [<08061067>] execute_syscall_skas+0xd7/0xe0
08b77bb4: [<080ec008>] empty_dir+0x18/0x330
08b77bd0: [<0805bc55>] change_signals+0x65/0x90
08b77be4: [<080ec008>] empty_dir+0x18/0x330
08b77c04: [<080ec008>] empty_dir+0x18/0x330
08b77c40: [<08061091>] handle_syscall+0x21/0x40
08b77c50: [<0805fb18>] handle_trap+0x28/0x130
08b77c80: [<08060164>] userspace+0x1c4/0x220
08b77cd0: [<080612f4>] force_flush_all_skas+0x44/0x50
08b77cf0: [<08060bf1>] fork_handler+0xc1/0xe0
sh-3.00#
Which is not too surprising because I get an error like that most of the time
when I start UML anyway. (I've mentioned it here before, still no idea what
it is.)
So it's a shell just like the one I had before: Ctrl-C is still being ignored.
Right, so exit out of that into the first UML shell, and then type "reset".
(The standard reset(1) command.)
And I get a hang. The screen clears but I never get my prompt back, and
although hitting enter moves the cursor down the screen nothing I type makes
any difference (including ctrl-c).
Anybody else tried this?
Rob
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2005-09-24 14:44 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-23 16:35 [uml-devel] Any way to give /dev/console a controlling TTY? Rob Landley
2005-09-23 17:50 ` Blaisorblade
2005-09-23 19:08 ` Rob Landley
2005-09-24 14:09 ` Blaisorblade
2005-09-25 12:49 ` Henrik Nordstrom
2005-09-25 15:34 ` Rob Landley
2005-09-23 18:31 ` Rob Landley
2005-09-23 18:56 ` Henrik Nordstrom
2005-09-23 19:08 ` Blaisorblade
2005-09-23 20:31 ` Henrik Nordstrom
2005-09-24 14:03 ` Blaisorblade
2005-09-24 17:37 ` Rob Landley
2005-09-24 23:14 ` Henrik Nordstrom
2005-09-25 0:10 ` Rob Landley
2005-09-24 14:43 ` Rob Landley [this message]
2005-09-23 18:47 ` Henrik Nordstrom
2005-09-23 18:53 ` Blaisorblade
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=200509240943.54587.rob@landley.net \
--to=rob@landley.net \
--cc=uml@hno.marasystems.com \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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