linux-assembly.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: willy meier <wklux@yahoo.co.uk>
To: pj@evobsyniva.com
Cc: linux-assembly@vger.kernel.org, linux-assembly@mlists.in-berlin.de
Subject: Re: Orphaned Processes and TCSETSW
Date: Mon, 20 Oct 2003 12:38:25 +0100	[thread overview]
Message-ID: <3F93C931.A9A32CB9@yahoo.co.uk> (raw)
In-Reply-To: oprxa2qb0ob2epmx@localhost

Philip Jacob Smith wrote:
> 
> This script causes the error.  You'll see stty complain about an I/O error.
> 

I forgot mentioning another -imho- quite odd behaviour which I didn't
find a single word of 'documentation' about, wrt the 'dup' and 'dup2'
syscalls, which I found a source of the difficulties which you
mentioned:

those syscalls do not duplicate the rsp. channels' descriptions but,
return just another index ('fd') to the rsp. single one description
array. thus, any modification to a 'dup'-ed channel will appear working
with its siblings, in the same manner.
apparently, only the settings which can be modified with the <fcntl>
syscall will be unique to the rsp. fd.

now, since stdin etc when passed as console channels (almost?) always
were set up with the 'dup' syscalls, there is no real distinction
between stdin/out/err and, the ioctl-ed modifications could easily
conflict with the rsp. channel's (copy) purpose.

my solution was reading the supposed to be modified channel's
description and its path+name (with <fstat> and, <readlink> - which
requires the /proc-fs), than closeing and newly opening the channel with
the required settings, with the <open> syscall, thus constituting a
truely independent console channel. 
<close>ing won't affect the parents channels, and the new one can't...


best,
	hp

-- 
Linux,Assembly,Forth: http://www.lxhp.in-berlin.de/index-lx.shtml
  >> hp -at- lxhp -dot- in-berlin -dot- de <<

  reply	other threads:[~2003-10-20 11:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-17 17:22 correction: Re: Orphaned Processes and TCSETSW] willy meier
2003-10-17 21:37 ` Orphaned Processes and TCSETSW Philip Jacob Smith
2003-10-19 16:08   ` willy meier
2003-10-19 19:50     ` Philip Jacob Smith
2003-10-20 11:38       ` willy meier [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-10-12 23:22 linuxassembly
2003-10-17 17:18 ` willy meier

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=3F93C931.A9A32CB9@yahoo.co.uk \
    --to=wklux@yahoo.co.uk \
    --cc=linux-assembly@mlists.in-berlin.de \
    --cc=linux-assembly@vger.kernel.org \
    --cc=ns@lxhp.in-berlin.de \
    --cc=pj@evobsyniva.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).