delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/10/01:35:44

Date: Tue, 10 Jun 1997 13:26:11 +0800 (GMT)
From: Orlando Andico <orly AT gibson DOT eee DOT upd DOT edu DOT ph>
To: Michael Bukin <bukinm AT inp DOT nsk DOT su>
cc: djgpp AT delorie DOT com
Subject: Re: One for the Gurus
In-Reply-To: <339a3413.712487@news-win.inp.nsk.su>
Message-ID: <Pine.SGI.3.93.970610132325.25315A-100000@gibson.eee.upd.edu.ph>
MIME-Version: 1.0

> 
>   With `less' I have build debuggable version and stack traceback
> shows that it crashes in getenv by SIGSEGV. But it does not crash
> when run from another djgpp program like bash or redir.
> 
>   I have lost configuration that crashes `less', but I can look for
> configuration where `emacs' will crash (but it is harder to debug).
> 

The execXX() functions and spawnXX() functions have versions in which
you're supposed to pass a pointer to the environment you're giving the
child. Perhaps DJGPP programs set some environment variable (probably TERM
or something) that normal DOS programs don't. getenv() returns NULL if no
variable found, but A LOT of code looks like this:

  strcpy (term_var, getenv ("TERM"));

which _would_ cause a SIGSEGV if TERM was not defined.

-----------------------------------------------------------------------
Orlando Alcantara Andico
WWW:   http://www2.mozcom.com/~orly/           Email:   orly AT mozcom DOT com
ICBM:  14 deg. 30' N, 120 deg. 59' E           POTS:    (+632) 932-2385

- Raw text -


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