Subject: Re: Strange things...
From: [email-masked]

17 Mar 1998 14:29:32 -0800
Message-ID: <[email-masked]>
To: [email-masked]

> But I suspect that GETENV
>returns a null, and when it's passed to strncpy it decides to go belly up.
>I'm not sure if GETENV is supposed to return an empty string or a null? Any
>help on this one?

Sure, it's perfectly normal for getenv() to return NULL.  If the requested
variable does not exist in the environment, it will return NULL.  (If it
exists and is set to an empty string, then getenv() will return an empty
string.)

From the man page:

     RETURN VALUES
          If successful, getenv() returns a pointer to the value in
          the current environment; otherwise, it returns a null
          pointer.

marcus hall

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".