Mon 14 Oct 23:09:15 CEST 2024
This commit is contained in:
		
							parent
							
								
									efe937998a
								
							
						
					
					
						commit
						240359bb3f
					
				
							
								
								
									
										17
									
								
								user/test/forktest.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								user/test/forktest.c
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,17 @@ | |||
| #include "library/syscalls.h" | ||||
| #include "library/string.h" | ||||
| 
 | ||||
| int main(int argc, char *argv[]) | ||||
| { | ||||
| 	printf("hello world, I am %d.\n", syscall_process_self()); | ||||
| 	int x = syscall_process_fork(); | ||||
| 	printf("My fork returned %d\n", x); | ||||
| 
 | ||||
| 	printf("Some numbers:\n"); | ||||
| 
 | ||||
| 	int i; | ||||
| 	for(i = 0; i < 5; ++i) { | ||||
| 		printf("%d\n", i); | ||||
| 	} | ||||
| 	return 0; | ||||
| } | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user