Added cleanup
This commit is contained in:
		
							parent
							
								
									da872ef789
								
							
						
					
					
						commit
						cac49c513c
					
				
					 5 changed files with 9 additions and 6 deletions
				
			
		
							
								
								
									
										3
									
								
								mach/minix/libsys/cleanup.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								mach/minix/libsys/cleanup.c
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,3 @@ | |||
| _cleanup() | ||||
| { | ||||
| } | ||||
|  | @ -1,10 +1,8 @@ | |||
| #include "lib.h" | ||||
| 
 | ||||
| PUBLIC int (*__cleanup)(); | ||||
| 
 | ||||
| PUBLIC int exit(status) | ||||
| int status; | ||||
| { | ||||
|   if (__cleanup) (*__cleanup)(); | ||||
|   _cleanup(); | ||||
|   return callm1(MM, EXIT, status, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR); | ||||
| } | ||||
|  |  | |||
|  | @ -15,6 +15,7 @@ dup.c | |||
| dup2.c | ||||
| exec.c | ||||
| exit.c | ||||
| cleanup.c | ||||
| fork.c | ||||
| fstat.c | ||||
| getegid.c | ||||
|  |  | |||
							
								
								
									
										3
									
								
								mach/minixST/libsys/cleanup.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								mach/minixST/libsys/cleanup.c
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,3 @@ | |||
| _cleanup() | ||||
| { | ||||
| } | ||||
|  | @ -1,10 +1,8 @@ | |||
| #include "lib.h" | ||||
| 
 | ||||
| PUBLIC int (*__cleanup)(); | ||||
| 
 | ||||
| PUBLIC int exit(status) | ||||
| int status; | ||||
| { | ||||
|   if (__cleanup) (*__cleanup)(); | ||||
|   _cleanup(); | ||||
|   return callm1(MM, EXIT, status, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR); | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue