[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnulib] getline & getline_safe

From: Derek Robert Price
Subject: Re: [Bug-gnulib] getline & getline_safe
Date: Tue, 15 Jul 2003 13:38:44 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1

Paul Eggert wrote:

Derek Robert Price <derek@ximbiot.com> writes:

Don't most modern operating systems allow ulimit to limit process size?

Yes, but that's a crude weapon, whereas getline_safe() is aimed just
at this particular problem.

Personally, I don't like functions whose name ends in "_safe".
Nothing is 100% safe.  It's better to end their name in "_safer".
Or better yet, why not call it "getnline" as per the original bug report:

getnline() is fine with me.

If getline_safe() _is_ necessary, is there interest in importing it
into GNULIB (it really just wraps a call to getdelim2())?

I'd have interest, though I don't see how you can just wrap a call to
getdelim2.  Don't you also need to modify getdelim2's signature?

Oops. Yes. I read too quickly and assumed that getdelim2() was just the old getstr() in ccvs/lib/getline.c with a new name.

So a new getndelim() function would be needed for wrapping or just the getnline() function.



Email: derek@ximbiot.com

Get CVS support at <http://ximbiot.com>!
[Let us] go on in doing with [the] pen what in other times was done with the 
sword, [and] show that reformation is more practicable by operating on the mind 
than on the body of man.

                        - Thomas Jefferson to Thomas Paine, 1792

reply via email to

[Prev in Thread] Current Thread [Next in Thread]