Sponsored Content
Full Discussion: Command line buffer limit?
Top Forums UNIX for Dummies Questions & Answers Command line buffer limit? Post 33488 by Perderabo on Tuesday 7th of January 2003 10:22:26 AM
Old 01-07-2003
That sounds like flow control. Characters are arriving too fast for the driver to read them. Are you using a real terminal? If you're using a network connection, are you using rlogin? If so switch to telnet and repeat your test. Bear in mind that even if flow control is working properly, it is not directly connected to you. All it can do is beep and hope that you stop typing.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sendmail message body buffer limit?

when sending the contents of a ascii file to the body of an email then sending it off. it seems sendmail is breaking up the lines with a "!" thus ruining the data. Has this ever happened to anyone? i am guessing there is a line buffer limit in either the mail command or in sendmail itself. ... (3 Replies)
Discussion started by: Optimus_P
3 Replies

2. Shell Programming and Scripting

grep line length limit

Hi Friends, I am having a funny problem with grep. When I run grep 'expr' file.txt things work fine. But when try to get the line number using the -n option, i.e, grep -n 'expr' file.txt I get a message, "grep: 0652-226 Maximum line length of 2048 exceeded." If the line has more than... (3 Replies)
Discussion started by: hnhegde
3 Replies

3. Shell Programming and Scripting

How to Monitor printer buffer using unix command

Hi, I have 13jobs waiting in a printer queue.I am try to get the status and number of jobs using lpstat but i cant see any job is waiting in queue.i think those jobs are in printer buffer.is there any way to get the status of printer buffer too using unix command.please correct me if i am wrong. i... (1 Reply)
Discussion started by: sagii
1 Replies

4. UNIX for Advanced & Expert Users

How to limit the search to 'n' occurrences within a line

Hello All, I am trying to search one pattern across a file and then print it. But i need to delimit the search per line to 2 occurrences. How do i do that? Regards. (9 Replies)
Discussion started by: Linuxee
9 Replies

5. Shell Programming and Scripting

Problem with awk awk: program limit exceeded: sprintf buffer size=1020

Hi I have many problems with a script. I have a script that formats a text file but always prints the same error when i try to execute it The code is that: { if (NF==17){ print $0 }else{ fields=NF; all=$0; while... (2 Replies)
Discussion started by: fate
2 Replies

6. Programming

Is there a limit for a code line length in C?

Is there any stabdard limitation on size of a code line in C code? I am interesting in UNIX limitation, particulary on SUN. Thanks! (8 Replies)
Discussion started by: alex_5161
8 Replies

7. UNIX for Dummies Questions & Answers

Vim external command output to new buffer

Hi, From inside Vim, I'm looking for a way to use the contents of the current buffer, pass it to an external executable, and then return the output from the executable into a new Vim buffer. I know that I can do something like %!<executable>, but that will overwrite the contents of the... (3 Replies)
Discussion started by: konfushus
3 Replies

8. Shell Programming and Scripting

Ignore the 255 character limit of command line

Hi I would just like to ask if there is a way for UNIX to ignore/overcome the 255 character limit of the command line? My problem is that I have a really long line of text from a file (300+ bytes) which i have to "echo" and process by adding commands like "sed" to the end of the line, like... (5 Replies)
Discussion started by: agentgrecko
5 Replies

9. Programming

Limit line for perl

Hey guys, can help me out with this? How do i limit output for xml to 50 character? i tried *below* but doesnt work, it still print more than 50 characters. Thanks in advance printf "%-50s", "$testline\n"; (4 Replies)
Discussion started by: Nick1097
4 Replies

10. UNIX for Beginners Questions & Answers

Single line archive log files command if exceed certain limit in Linux

Hello Guys, Is there a single line archive command to zip or tar log files which is larger than certain size limit ? Do let me know if there is any. Thanks (7 Replies)
Discussion started by: UnknownGuy
7 Replies
pty(7D) 							      Devices								   pty(7D)

NAME
pty - pseudo-terminal driver DESCRIPTION
The pty driver provides support for a pair of devices collectively known as a pseudo-terminal. The two devices comprising a pseudo-terminal are known as a controller and a slave. The slave device distinguishes between the B0 baud rate and other baud rates specified in the c_cflag word of the termios structure, and the CLOCAL flag in that word. It does not support any of the other termio(7I) device control functions specified by flags in the c_cflag word of the termios structure and by the IGNBRK, IGNPAR, PARMRK, or INPCK flags in the c_iflag word of the termios structure, as these functions apply only to asynchronous serial ports. All other termio(7I) functions must be performed by STREAMS modules pushed atop the driver; when a slave device is opened, the ldterm(7M) and ttcompat(7M) STREAMS modules are automatically pushed on top of the stream, providing the standard termio(7I) interface. Instead of having a hardware interface and associated hardware that supports the terminal functions, the functions are implemented by another process manipulating the controller device of the pseudo-terminal. The controller and the slave devices of the pseudo-terminal are tightly connected. Any data written on the controller device is given to the slave device as input, as though it had been received from a hardware interface. Any data written on the slave terminal can be read from the controller device (rather than being transmitted from a UAR). By default, 48 pseudo-terminal pairs are configured as follows: /dev/pty[p-r][0-9a-f] controller devices /dev/tty[p-r][0-9a-f] slave devices IOCTLS
The standard set of termio ioctls are supported by the slave device. None of the bits in the c_cflag word have any effect on the pseudo- terminal, except that if the baud rate is set to B0, it will appear to the process on the controller device as if the last process on the slave device had closed the line; thus, setting the baud rate to B0 has the effect of ``hanging up'' the pseudo-terminal, just as it has the effect of ``hanging up'' a real terminal. There is no notion of ``parity'' on a pseudo-terminal, so none of the flags in the c_iflag word that control the processing of parity errors have any effect. Similarly, there is no notion of a ``break'', so none of the flags that control the processing of breaks, and none of the ioctls that generate breaks, have any effect. Input flow control is automatically performed; a process that attempts to write to the controller device will be blocked if too much uncon- sumed data is buffered on the slave device. The input flow control provided by the IXOFF flag in the c_iflag word is not supported. The delays specified in the c_oflag word are not supported. As there are no modems involved in a pseudo-terminal, the ioctls that return or alter the state of modem control lines are silently ignored. A few special ioctls are provided on the controller devices of pseudo-terminals to provide the functionality needed by applications pro- grams to emulate real hardware interfaces: TIOCSTOP The argument is ignored. Output to the pseudo-terminal is suspended, as if a STOP character had been typed. TIOCSTART The argument is ignored. Output to the pseudo-terminal is restarted, as if a START character had been typed. TIOCPKT The argument is a pointer to an int. If the value of the int is non-zero, packet mode is enabled; if the value of the int is zero, packet mode is disabled. When a pseudo-terminal is in packet mode, each subsequent read(2) from the controller device will return data written on the slave device preceded by a zero byte (symbolically defined as TIOCPKT_DATA), or a single byte reflecting control status information. In the latter case, the byte is an inclusive-or of zero or more of the bits: TIOCPKT_FLUSHREAD whenever the read queue for the terminal is flushed. TIOCPKT_FLUSHWRITE whenever the write queue for the terminal is flushed. TIOCPKT_STOP whenever output to the terminal is stopped using ^S. TIOCPKT_START whenever output to the terminal is restarted. TIOCPKT_DOSTOP whenever XON/XOFF flow control is enabled after being disabled; it is considered ``enabled'' when the IXON flag in the c_iflag word is set, the VSTOP member of the c_cc array is ^S and the VSTART member of the c_cc array is ^Q. TIOCPKT_NOSTOP whenever XON/XOFF flow control is disabled after being enabled. TIOCREMOTE The argument is a pointer to an int. If the value of the int is non-zero, remote mode is enabled; if the value of the int is zero, remote mode is disabled. This mode can be enabled or disabled independently of packet mode. When a pseudo-terminal is in remote mode, input to the slave device of the pseudo-terminal is flow controlled and not input edited (regardless of the mode the slave side of the pseudo-terminal). Each write to the controller device produces a record boundary for the process reading the slave device. In normal usage, a write of data is like the data typed as a line on the terminal; a write of 0 bytes is like typing an EOF character. Note: this means that a process writing to a pseudo-terminal controller in remote mode must keep track of line boundaries, and write only one line at a time to the controller. If, for example, it were to buffer up several NEWLINE characters and write them to the controller with one write(), it would appear to a process reading from the slave as if a single line containing several NEWLINE characters had been typed (as if, for example, a user had typed the LNEXT character before typing all but the last of those NEWLINE characters). Remote mode can be used when doing remote line editing in a window manager, or whenever flow controlled input is required. EXAMPLES
#include <fcntl.h> #include <sys/termios.h> int fdm fds; fdm = open("/dev/ptyp0, O_RDWR); /* open master */ fds = open("/dev/ttyp0, O_RDWR); /* open slave */ FILES
/dev/pty[p-z][0-9a-f] pseudo-terminal controller devices /dev/tty[p-z][0-9a-f] pseudo-terminal slave devices SEE ALSO
rlogin(1), rlogind(1M), ldterm(7M), termio(7I), ttcompat(7M), NOTES
It is apparently not possible to send an EOT by writing zero bytes in TIOCREMOTE mode. SunOS 5.11 8 Aug 1994 pty(7D)
All times are GMT -4. The time now is 01:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy