delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2006/12/19/18:16:34

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "Rod Pemberton" <do_not_have AT bitfoad DOT cmm>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Possible improvement to pipe() handling?
Date: Tue, 19 Dec 2006 18:13:52 -0500
Organization: Aioe.org NNTP Server
Lines: 50
Message-ID: <em9rms$a9e$1@aioe.org>
References: <OFF7CFC9A2 DOT 29AFB584-ON87257249 DOT 0067C597-87257249 DOT 0067E0EB AT seagate DOT com>
NNTP-Posting-Host: IVw7K97ih4IohxRqyKkqFw.user.aioe.org
X-Complaints-To: abuse AT aioe DOT org
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-Priority: 3
X-MSMail-Priority: Normal
X-Mimeole: Produced By Microsoft MimeOLE V6.00.2800.1441
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

<Gordon DOT Schumacher AT seagate DOT com> wrote in message
news:OFF7CFC9A2 DOT 29AFB584-ON87257249 DOT 0067C597-87257249 DOT 0067E0EB AT seagate DOT com...
>
> I sent this initially to DJGPP-Workers; it occurred to me that it might
> be better to send it here, so... :)  Comments welcome.
>
> __________________
>
> I was pleased to see that there's now an implementation of pipe() in the
> v2.04 beta, but I tripped over an idiosyncrasy of it when working with the
> GNU Pth port that led me to start thinking about how it could be improved.
>
> It appears that currently, calling pipe() creates a file in $TEMP which is
> used as storage for data being written to the pipe, and pulled back out as
> it is read out.  This caused some spectacular failures in Pth when either
> running off of read-only media or when $TEMP was not set, and some pretty
> awful performance when running off a floppy.
>
> It seems to me that the reason for using a tempfile is because of the need
> for persistence of the data in the case of "cat foo | less" since that is
> two separate processes.  Am I guessing correctly here?
>
> Otherwise, I would think in the case of a pipe that is used entirely
within
> a single process that it would be preferable to simply allocate a memory
> buffer (fixed-size or perhaps growing?) and use that to store the data.
Is
> there a way to tell the difference between these two cases or am I over-
> simplifying the situation?  :)
>

Sorry, I don't know anything about this.  Someone else will need to help.

> Lastly, if *that* works I find myself wondering if there's a reliable way
> to tell the DPMI host "I'm allocating this block of memory; please hang on
> to it after I quit".
>

I have an answer to that, but I'm unsure if it's completely correct.  I'd
hope that DJ or Sandmann could clarify.  Is it possible to do that under
Windows?  How about DOS?  And, if the DPMI host stays resident under DOS,
how would that affect the use of programs which use a different DPMI host,
such as OW which uses a DPMI host and DOS Extender?


Rod Pemberton



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019