mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 10:52:44 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			34 lines
		
	
	
	
		
			377 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
	
		
			377 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| ## Name
 | |
| 
 | |
| clearenv - clear the environment
 | |
| 
 | |
| ## Synopsis
 | |
| 
 | |
| ```**c++
 | |
| #include <stdlib.h>
 | |
| 
 | |
| clearenv();
 | |
| ```
 | |
| 
 | |
| ## Description
 | |
| 
 | |
| Clears all environment variables and sets the external
 | |
| variable `environ` to NULL.
 | |
| 
 | |
| ## Return value
 | |
| 
 | |
| The `clearenv()` function returns zero.
 | |
| 
 | |
| ## Examples
 | |
| 
 | |
| ```c++
 | |
| #include <stdlib.h>
 | |
| 
 | |
| int main()
 | |
| {
 | |
|     clearenv();
 | |
|     putenv("PATH=/bin");
 | |
| 
 | |
|     return 0;
 | |
| }
 | |
| ```
 | 
