*BSD News Article 93287


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!news.ececs.uc.edu!newsfeeds.sol.net!europa.clark.net!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!rill.news.pipex.net!pipex!tank.news.pipex.net!pipex!news.utell.co.uk!usenet
From: brian@shift.utell.net (Brian Somers)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Is there a line length limit?  (2.2.1)
Date: 10 Apr 1997 15:15:10 GMT
Organization: Awfulhak Ltd.
Lines: 35
Message-ID: <5ij05u$d4p@ui-gate.utell.co.uk>
References: <5ihpck$h8p$1@Mars.mcs.net>
    <5ihv35$f61@nntp1.u.washington.edu>
Reply-To: brian@awfulhak.org, brian@utell.co.uk
NNTP-Posting-Host: shift.utell.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Newsreader: knews 0.9.8
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:38864

In article <5ihv35$f61@nntp1.u.washington.edu>,
	kargl@hotrat.apl.washington.edu (Steven G. Kargl) writes:
> In article <5ihpck$h8p$1@mars.mcs.net>,
> 	font@MCS.COM (Font) writes:
>> I'm using FreeBSD 2.2.1 and programs which accept input from stdin,
>> such as cat, won't accept lines longer than about a thousand
>> characters.  If I pipe these characters instead of typing them,
>> everything works.  This happens under /bin/sh and /usr/local/bin/zsh.
>> Is this something in the kernel?  I don't remember ever having run
>> into this before.  Whether I'm typing stdin to awk, doing a "read
>> line" from /bin/sh, or even doing an fgets(s, sizeof(s), stdin), I run
>> up against the thousand character barrier when typing in input
>> (actually I'm scripting it most of the time, but you know what I
>> mean).
>> 
>> My ISP uses FreeBSD 3.0 and doesn't exhibit this problem.  But I'm not
>> prepared to go to CURRENT.
>> 
> 
> cd /usr/include
> grep BUF stdio.h
> #define BUFSIZ  1024            /* size of buffer used by setbuf */

This should not matter - not for obvious reasons anyway.

The only thing I can think of is that the command line editing stuff
allocates a buffer up front......

If it's any consolation, bash-1.14.7 works under 2.2-961014 and sh
has the limit, so you could use bash to avoid the problem.

-- 
Brian <brian@awfulhak.org> <brian@freebsd.org>
      <http://www.awfulhak.demon.co.uk>
Don't _EVER_ lose your sense of humour !