comp.lang.ada
 help / color / mirror / Atom feed
From: "Tarjei Tj�stheim Jensen" <tarjei@online.no>
Subject: Re: Terminal Control (or System calls), unix
Date: 1999/04/05
Date: 1999-04-05T00:00:00+00:00	[thread overview]
Message-ID: <37091EF1.F7ABE242@online.no> (raw)
In-Reply-To: 7eap68$vmq$1@nnrp1.dejanews.com



dennison@telepath.com wrote:

> > I suppose. But don't you have to worry that the person executing your program
> > might have a default shell on which stty behaves differently (or does not
> > exist)?
>
> OK. I just went and checked. For the two unixes I tried (AIX 4.2 and SunOS
> 5.3) stty is *not* a shell builtin; it is a command. So Ted, you're an idiot.
> (Wow, flaming me is fun. No wonder so many do it. :-)
>
> Also, it appears stty changes apply to a parent shell when I invoke it from a
> child shell, so I suspect the "system" call method would do the trick.

There are portable ways of doing this without invoking a separate program. There
are a couple of Posix calls to do this. The easiest way of finding out how to do
this is to look up the metods in various Perl FAQs. That is where I found the
answer to it last time I looked (or was it the Perl book).

Use the Posix interface so that context can be saved and restored easily without
depending on the arcane syntax of stty.


Greetings,







      reply	other threads:[~1999-04-05  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-04-01  0:00 Terminal Control (or System calls), unix Sven E. Anderson
1999-04-02  0:00 ` Thomas Handler
1999-04-02  0:00 ` dennison
1999-04-03  0:00   ` Jerry van Dijk
1999-04-05  0:00     ` dennison
1999-04-05  0:00       ` dennison
1999-04-05  0:00         ` Tarjei Tj�stheim Jensen [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox