Article View: comp.unix.shell
Article #1255Re: stty cbreak
From: Conor P. Cahill
Date: Thu, 27 Sep 1990 11:32
Date: Thu, 27 Sep 1990 11:32
37 lines
1709 bytes
1709 bytes
In article <5985@hplabsz.HPL.HP.COM> kjchang@hplabsz.UUCP (K. J. Chang) writes:
>I saw "A Book On C" which says I can use "stty cbreak" (pp.25) in
>UNIX so that my C program will not wait for <CR> when it reads
>"stdin".
First off:
If you are working with a C program you should not use the
stty(1) command to set the terminal characteristics. Instead use
the ioctl(2) system call with the appropriate parameters that are
defined on the termio(7) manual page.
Second:
When you do make changes to the terminal characteristics make sure
you do the following:
save the current settings
make your changes
and later, just before you exit, reset the termina to the
original settings
>I tried "stty cbreak" in sh, csh, and ksh in HP-UX (UNIX)
>and the system did not understand the command. Then, I
It won't matter what shell you use since the stty command is not a "built-in"
in any of the shells listed.
The answer to your question is to RTFM (especially the stty(1) and termio(7)
manual pages). stty -icanon should do what you want.
--
Conor P. Cahill (703)430-9247 Virtual Technologies, Inc.,
uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160
Sterling, VA 22170
Technical Details
Message-ID:
<1990Sep27.113249.3712@virtech.uucp>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!virtech!cpcahilReferences:
<5985@hplabsz.HPL.HP.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.shell Subject: Re: stty cbreak Message-ID: <1990Sep27.113249.3712@virtech.uucp> Date: 27 Sep 90 11:32:49 GMT References: <5985@hplabsz.HPL.HP.COM> Reply-To: cpcahil@virtech.UUCP (Conor P. Cahill) Organization: Virtual Technologies Inc., Sterling VA Lines: 37