🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.unix.shell
5 messages
5 total messages Started by K. J. Chang Wed, 26 Sep 1990 22:19
stty cbreak
#1250
Author: K. J. Chang
Date: Wed, 26 Sep 1990 22:19
13 lines
827 bytes
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".

I tried "stty cbreak" in sh, csh, and ksh in HP-UX (UNIX)
and the system did not understand the command. Then, I
tried the same command in Sun 4 (Sparc) and the command
seems to work in Sun's UNIX.

What's the equivalence of "stty cbreak" in HP-UX?

K J Chang
(415)857-4604
Re: stty cbreak
#1255
Author: Conor P. Cahill
Date: Thu, 27 Sep 1990 11:32
37 lines
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 
Re: stty cbreak
#1258
Author: BURNS,JIM
Date: Thu, 27 Sep 1990 13:31
10 lines
713 bytes
in article <5985@hplabsz.HPL.HP.COM>, kjchang@hplabsz.HPL.HP.COM (K. J. Chang) says:

> What's the equivalence of "stty cbreak" in HP-UX?

Roughly speaking, 'stty raw'.
-- 
BURNS,JIM
Georgia Institute of Technology, Box 30178, Atlanta Georgia, 30332
uucp:	  ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt0178a
Internet: gt0178a@prism.gatech.edu
Re: stty cbreak
#1256
Author: David N. Blank
Date: Thu, 27 Sep 1990 16:37
5 lines
680 bytes
> What's the equivalence of "stty cbreak" in HP-UX?

Check out the "icanon" option to stty in the man page.
              Peace,
                 dNb
Re: stty cbreak
#1275
Author: Guy Harris
Date: Fri, 28 Sep 1990 20:02
9 lines
693 bytes
>> What's the equivalence of "stty cbreak" in HP-UX?
>
>Roughly speaking, 'stty raw'.

Unnecessary roughness - 10 yards penalty.

The *exact* equivalent is "stty -icanon".  "stty raw" turns off a whole
bunch of processing that "stty cbreak", on systems that support it,
doesn't.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads