Message-Id: Comments: Authenticated sender is From: "Salvador Eduardo Tropea (SET)" Organization: INTI To: Eli Zaretskii , 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 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Pipes References: <199807271309 DOT JAA21579 AT delorie DOT com> In-reply-to: Precedence: bulk Eli Zaretskii 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