mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Richard B. Johnson" <root@chaos.analogic.com>
To: Erik Mouw <erik@harddisk-recovery.com>
Cc: Paul Jackson <pj@sgi.com>,
	Eric Masson <cool_kid@future-ericsoft.com>,
	linux-kernel@vger.kernel.org
Subject: Re: Fork and Exec a process within the kernel
Date: Wed, 11 Aug 2004 07:24:42 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.53.0408110721540.15879@chaos> (raw)
In-Reply-To: <20040811095139.GA10047@harddisk-recovery.com>

On Wed, 11 Aug 2004, Erik Mouw wrote:

> On Tue, Aug 10, 2004 at 03:03:08PM -0400, Richard B. Johnson wrote:
> > /dev/console is a symlink to /dev/tty0.
>
> Please don't mislead newbies, Richard. /dev/console is NOT a link to
> /dev/tty0, it's a completely different device:
>
> erik@abra2:~ >ls -l /dev/console
> crw-------    1 root     tty        5,   1 Apr  7 09:13 /dev/console
> erik@abra2:~ >ls -l /dev/tty0
> crw-------    1 root     tty        4,   0 Feb 10  2000 /dev/tty0
>

Bullshit. I know how to use `file`.

Script started on Wed Aug 11 07:21:39 2004
# file /dev/console
/dev/console: symbolic link to /dev/tty0
# exit
Script done on Wed Aug 11 07:21:51 2004


> On x86 desktop systems console output usually comes on the virtual
> terminals, but you can also use serial console. My embedded StrongARM
> board only has serial console.
>

Then that's your problem.


> >     struct termios term;
> >
> >     tcgetattr(0, &term);	// Get old terminal characteristics
> >     (void)close(0);		// Close old terminal(s)
> >     (void)close(1);
> >     (void)close(2);
> >     fd = open("/dev/console", O_RDWR);
>
> And what happens when you have console on a device that's not a serial
> port like a line printer?
>
>
> Erik
>

It will still work but there is no input and it can't be turned
into a "controlling terminal".


Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5570.56 BogoMips).
            Note 96.31% of all statistics are fiction.



  reply	other threads:[~2004-08-11 11:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-09 21:03 Eric Masson
2004-08-09 23:10 ` Paul Jackson
2004-08-10 15:22   ` Eric Masson
2004-08-10 16:21     ` Paul Jackson
2004-08-10 18:20       ` Lee Revell
2004-08-10 19:03       ` Richard B. Johnson
2004-08-11  9:51         ` Erik Mouw
2004-08-11 11:24           ` Richard B. Johnson [this message]
2004-08-11 11:41             ` Erik Mouw
2004-08-11 11:55               ` Richard B. Johnson
2004-08-11 12:51                 ` Erik Mouw
2004-08-11 15:24                 ` Alan Cox
2004-08-10 16:33     ` Jan-Benedict Glaw

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=Pine.LNX.4.53.0408110721540.15879@chaos \
    --to=root@chaos.analogic.com \
    --cc=cool_kid@future-ericsoft.com \
    --cc=erik@harddisk-recovery.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pj@sgi.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

all inboxes | Powered by JetHome®