mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:52:45 +00:00 
			
		
		
		
	UserspaceEmulator: Transfer the environment to the emulated process
This commit is contained in:
		
							parent
							
								
									1366557094
								
							
						
					
					
						commit
						f097ed6ada
					
				
					 3 changed files with 22 additions and 8 deletions
				
			
		|  | @ -32,7 +32,7 @@ | |||
| #include <LibELF/Loader.h> | ||||
| #include <getopt.h> | ||||
| 
 | ||||
| int main(int argc, char** argv) | ||||
| int main(int argc, char** argv, char** env) | ||||
| { | ||||
|     if (argc == 1) { | ||||
|         out() << "usage: UserspaceEmulator <command>"; | ||||
|  | @ -55,7 +55,12 @@ int main(int argc, char** argv) | |||
|         arguments.append(argv[i]); | ||||
|     } | ||||
| 
 | ||||
|     UserspaceEmulator::Emulator emulator(arguments, move(elf)); | ||||
|     Vector<String> environment; | ||||
|     for (int i = 0; env[i]; ++i) { | ||||
|         environment.append(env[i]); | ||||
|     } | ||||
| 
 | ||||
|     UserspaceEmulator::Emulator emulator(arguments, environment, move(elf)); | ||||
|     if (!emulator.load_elf()) | ||||
|         return 1; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling