Thread: clearenv() Sun Solaris

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

    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
    Join Date
    Sep 2003
    >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
    Replies: 179
    Last Post: 12-14-2004, 10:19 AM
  5. Sun bursts and glows.
    By VirtualAce in forum Game Programming
    Replies: 11
    Last Post: 04-16-2004, 05:38 PM