Article View: comp.lang.lisp
Article #91Re: read-file for sbcl
From: steve g
Date: Sun, 29 Nov 2026 23:58
Date: Sun, 29 Nov 2026 23:58
45 lines
2804 bytes
2804 bytes
George Neuner <gneuner2@comcast.net> writes:
>
> lseek() is not guaranteed to work with special files - only open(),
> close() and stat() are guaranteed for them.
>
> lseek() may work for special files currently - or it may work in
> whatever disto Steve happens to be using ... but it is not guaranteed
> by any documentation, and it may not continue to work in the future.
>
> I wouldn't rely on it.
I appreciate that; I am rather used to this. What do you use to
determine the file size on EXT2?
> Also you can stat() a file without opening it.
Please read lskeek (2).
``
lseek() allows the file offset to be set beyond the end of the file (but
this does not change the size of the file). If data is later written at
this point, subsequent reads of the data in the gap (a "hole") return null
bytes ('\0') until data is actually written into the gap.
RETURN VALUE
Upon successful completion, lseek() returns the resulting offset location
as measured in bytes from the beginning of the file. On error, the value
(off_t) -1 is returned and errno is set to indicate the error.
''
anywayz needed some gestalt therapy. You 2 are worth every penny :)
Seriously you guys could provide actually implementation stuff or just
complain. What is wrong with it? It was written by me.
The real issue is having an executable stack and loading an executable,
stored past the end of the file, and loading it directly into a stack
function! I though that was rather cool when I was 13.
Technical Details
Message-ID:
<87mrqrchr9.fsf@gmail.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!weretis.net!feeder9.news.weretis.net!border-4.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-2.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mailReferences:
<87ld6gl8ah.fsf@gmail.com> <m3wlq0ut1c.fsf@pison.robolove.meer.net> <srnkgl5hcm1k3845p58jfrot5d6shrpb14@4ax.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!weretis.net!feeder9.news.weretis.net!border-4.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-2.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 29 Nov 2026 23:58:24 +0000 From: steve g <Sgonedes1977@gmail.com> Newsgroups: comp.lang.lisp Subject: Re: read-file for sbcl References: <87ld6gl8ah.fsf@gmail.com> <m3wlq0ut1c.fsf@pison.robolove.meer.net> <srnkgl5hcm1k3845p58jfrot5d6shrpb14@4ax.com> Date: Sun, 29 Nov 2026 18:58:18 -0500 Message-ID: <87mrqrchr9.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:9C14aHuPYvWp6/U8X+awOU7JDtc= MIME-Version: 1.0 Content-Type: text/plain Lines: 45 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-kJxrEC4PGT8ITr4uIEc6PLoKrJRVGBIt4GDKpQm8zCowCt9r6s849A/Dov+70A/xRC8fzOxmxsZSQ3Q!+soH99c+XnNm5/qA8aiNZ9fEA2CdQSjsYgt8c2wtwN6QzVc= X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40