www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/07/27/14:14:25

Message-Id: <m0z0orT-000S4XC@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>, salvador AT inti DOT gov DOT ar,
djgpp-workers AT delorie DOT com, dj AT delorie DOT com
Date: Mon, 27 Jul 1998 12:16:34 +0000
MIME-Version: 1.0
Subject: Re: Pipes
References: <199807271309 DOT JAA21579 AT delorie DOT com>
In-reply-to: <Pine.SUN.3.91.980727173047.779L-100000@is>

Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote:
 
> On Mon, 27 Jul 1998, DJ Delorie wrote:
> 
> > * In fact, gdb traps int 0x31.  Maybe your shell could somehow trap
> >   that *before* it gets to the DPMI server, so that longjump is still an
> >   option?
> 
> I think there's no problem to longjmp from a software interrupt handler. 
> GDB's source is full of longjmp's (that's Richard Stallman's way of
> writing interactive programs, 

:-)

> Emacs does the same), and we never have any
> problems with that, even though GDB hooks PM Int 31h for its work. 

Ok, the experience shows that the interrupt approach is OK.
 
> > * Has anyone tried longjumping from one djgpp program to another
> >   (parent/child) program?
> 
> Will longjmp work across different selectors?  (The child has a different 
> CS/DS/SS, right?)

Yes, as my other mail to DJ says that's OK. longjmp is very careful and can 
do perfect jumps restoring all the selector and stack.
 
Now one more problem still there:

 Program A calls program B to talk with it. So A makes a spawn, but we don't 
return from spawn and we need to run more code in A ... so we must do some 
stack change. I tried it and works (spawn needs more than 64Kb of stack :-( 
). The problem is: What if in the middle time A wants to do it with another 
program C? Ok, ok is crazy but we will have problems if that isn't supported 
because we can't just disable spawn. 
My experiment showed problems with a second call to spawn and I'm 
not sure if the problem is in spawn or in the DPMI host or in DOS because the 
second call to spawn returned in a very strange way. I put some prints to see 
the stack before and after calling int 21h to spawn the child and I saw the 
prints only ones!! something is very strange there. Any ideas.

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