mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 19:12:43 +00:00 
			
		
		
		
	Add a "pwd" utility to userland.
It's implemented as a separate process. How cute is that. Tasks now have a current working directory. Spawned tasks inherit their parent task's working directory. Currently everyone just uses "/" as there's no way to chdir().
This commit is contained in:
		
							parent
							
								
									eb4074bb9d
								
							
						
					
					
						commit
						ec1d16b307
					
				
					 17 changed files with 87 additions and 14 deletions
				
			
		|  | @ -45,5 +45,13 @@ int lstat(const char* path, stat* statbuf) | |||
|     return Syscall::invoke(Syscall::PosixLstat, (dword)path, (dword)statbuf); | ||||
| } | ||||
| 
 | ||||
| char* getcwd(char* buffer, size_t size) | ||||
| { | ||||
|     int rc = Syscall::invoke(Syscall::PosixGetcwd, (dword)buffer, (dword)size); | ||||
|     if (rc != 0) | ||||
|         return nullptr; | ||||
|     return buffer; | ||||
| } | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling