clearenv() Sun Solaris

This is a discussion on clearenv() Sun Solaris within the Linux Programming forums, part of the Platform Specific Boards category; This is technically a unix question, but... It seems that clearenv() is not provided by sun. I'm compiling with gcc. ...

  1. #1
    Registered User
    Join Date
    Aug 2002
    Location
    Hermosa Beach, CA
    Posts
    446

    clearenv() Sun Solaris

    This is technically a unix question, but...

    It seems that clearenv() is not provided by sun. I'm compiling with gcc. Does anyone know of an alternate way to clear the environment? Thanks.
    The crows maintain that a single crow could destroy the heavens. Doubtless this is so. But it proves nothing against the heavens, for the heavens signify simply: the impossibility of crows.

  2. #2
    twm
    twm is offline
    root
    Join Date
    Sep 2003
    Posts
    232
    >Does anyone know of an alternate way to clear the environment?
    Walk through all of the strings in the environ vector, cut out the variable name and call unsetenv on it.
    The information given in this message is known to work on FreeBSD 4.8 STABLE.
    *The above statement is false if I was too lazy to test it.*
    Please take note that I am not a technical writer, nor do I care to become one.
    If someone finds a mistake, gleaming error or typo, do me a favor...bite me.
    Don't assume that I'm ever entirely serious or entirely joking.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simulating The Sun In The Sky
    By SMurf in forum Game Programming
    Replies: 1
    Last Post: 06-04-2007, 10:30 AM
  2. mkdir - solaris 10
    By StevieT in forum C Programming
    Replies: 4
    Last Post: 08-17-2006, 03:36 AM
  3. Fatal error with solaris socket
    By WaterNut in forum Linux Programming
    Replies: 10
    Last Post: 05-26-2005, 01:12 PM
  4. Survival Football, ongoing! (GENERIC EXCITED TITLE)
    By PJYelton in forum A Brief History of Cprogramming.com
    Replies: 179
    Last Post: 12-14-2004, 09:19 AM
  5. Sun bursts and glows.
    By VirtualAce in forum Game Programming
    Replies: 11
    Last Post: 04-16-2004, 05:38 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21