From: Luo Yong Date: 2006-11-12T19:36:26+09:00 Subject: Re: Controlling readline On 11/12/06, Paul Lutus wrote: > Luo Yong wrote: > > > Hi all > > > > Is there anyway to control the maxium length of the IO.readline can read? > > Not really, not from the command line. You can throw away all the length you > don't want once it has been entered. It is way better to expect more > characters than you get than to get more than you expect (long sad story > about C/C++ "gets" snipped here). > > Maybe you should describe the problem, rather than asking about this way of > solving it. > > -- > Paul Lutus > http://www.arachnoid.com > > I'm writing an RPC program.I use readline to read the command.I'm afraid that my program can be attacked by others if I can't limit the maxium length the readline can read.So I'm finding a way to control it.