lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev Re: putenv


From: Mike Castle
Subject: Re: lynx-dev Re: putenv
Date: Thu, 21 Jan 1999 18:20:43 -0600 (CST)

Amazingly enough Kim DeVaughn said:
> 
> FWIW, on FreeBSD 2.2.8-STABLE (whose man page is below), I get:
> 
>   bar
>   Bus error (core dumped)
> 
> ie, a sig-10.
> 
> Note that the man page has no special warnings WRT the manner in which
> the string was allocated, etc.


Is gcc the default compiler for FreeBSD?  If so, recompile with
-fwritable-strings.  By default "foo=bar" is put into a read only section
of the file, so when the program tries to write to the string with
foo[6]='z', it gets pissy.

Or change the program to read foo=strdup("foo=bar"); to get a writable
version.

mrc
-- 
       Mike Castle       Life is like a clock:  You can work constantly
  address@hidden  and be right all the time, or not work at all
www.netcom.com/~dalgoda/ and be right at least twice a day.  -- mrc
    We are all of us living in the shadow of Manhattan.  -- Watchmen

reply via email to

[Prev in Thread] Current Thread [Next in Thread]