www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/07/28/08:46:49

Message-Id: <m0z197r-000S4TC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>, djgpp-workers AT delorie DOT com
Date: Tue, 28 Jul 1998 09:54:52 +0000
MIME-Version: 1.0
Subject: Re: Pipes
References: <m0z0pnZ-000S4oC AT inti DOT gov DOT ar>
In-reply-to: <Pine.SUN.3.91.980728104720.4133F-100000@is>

Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote:
 
> On Mon, 27 Jul 1998, Salvador Eduardo Tropea (SET) wrote:
> 
> > > How about calling setjmp before spawn and then longjmp there from the 
> > > code that is invoked when the child e.g. calls Int 31h?
> > 
> > Even when what you say is wrong (could leak memory if it is allocated by 
> > spawn)
> 
> Which memory is that?  dosexec.c only allocates a small (34-byte)
> buffer for the " !proxy" environment variable.  If you modify
> dosexec.c to setjmp around the call to __dpmi_int that invokes the DOS
> Exec function, you can return there and deallocate that buffer.
> 
> Or are you talking about the stack?

I just saw a free call. And is outside the main function. I don't care about 
stack if I'll use longjmps.
 
> > I'm not switching the PSP and the only file I'm using is stdout to print. So 
> > that isn't the problem. Something fails when spawn is called twice. I'll try 
> > longjmping inside spawn to avoid it.
> 
> I would suggest to switch PSP nevertheless.  DOS uses the PSP to make
> various decisions about which program is running, and may become
> confused if you don't switch them.  For example, calling Int 21h
> function 4Ch when the PSP is set to that of the child program makes
> DOS think that the child is exiting (this is actually a well-known way
> of forcefully aborting a runaway program: set PSP to its PSP and call
> function 4Ch).

Ok, I'll add it to the experiments.

SET 
------------------------------------ 0 --------------------------------
Visit my home page: http://set-soft.home.ml.org/
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


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