From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6a5262b0e069cfdf X-Google-Attributes: gid103376,public From: "Tarjei Tj�stheim Jensen" Subject: Re: Terminal Control (or System calls), unix Date: 1999/04/05 Message-ID: <37091EF1.F7ABE242@online.no>#1/1 X-Deja-AN: 462989133 Content-Transfer-Encoding: 7bit References: <3703F011.1DBB143C@cs.und.edu> <7e2rp3$kvf$1@nnrp1.dejanews.com> <7eaf43$mk2$1@nnrp1.dejanews.com> <7eap68$vmq$1@nnrp1.dejanews.com> Content-Type: text/plain; charset=us-ascii X-Complaints-To: news-abuse@online.no X-Trace: news1.online.no 923345008 130.67.224.233 (Mon, 05 Apr 1999 22:43:28 MET DST) Organization: Jensen programvareutvikling MIME-Version: 1.0 NNTP-Posting-Date: Mon, 05 Apr 1999 22:43:28 MET DST Newsgroups: comp.lang.ada Date: 1999-04-05T00:00:00+00:00 List-Id: 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,