Before now, it might have worked by accident if the return value from open() stayed in the function return area.
		
			
				
	
	
		
			6 lines
		
	
	
	
		
			121 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			6 lines
		
	
	
	
		
			121 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #include <fcntl.h>
 | |
| 
 | |
| int creat(const char *path, mode_t mode)
 | |
| {
 | |
| 	return open(path, O_CREAT | O_TRUNC | O_WRONLY, mode);
 | |
| }
 |