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" | #include "lib.h" | ||||||
| 
 | 
 | ||||||
| PUBLIC int (*__cleanup)(); |  | ||||||
| 
 |  | ||||||
| PUBLIC int exit(status) | PUBLIC int exit(status) | ||||||
| int status; | int status; | ||||||
| { | { | ||||||
|   if (__cleanup) (*__cleanup)(); |   _cleanup(); | ||||||
|   return callm1(MM, EXIT, status, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR); |   return callm1(MM, EXIT, status, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -15,6 +15,7 @@ dup.c | ||||||
| dup2.c | dup2.c | ||||||
| exec.c | exec.c | ||||||
| exit.c | exit.c | ||||||
|  | cleanup.c | ||||||
| fork.c | fork.c | ||||||
| fstat.c | fstat.c | ||||||
| getegid.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" | #include "lib.h" | ||||||
| 
 | 
 | ||||||
| PUBLIC int (*__cleanup)(); |  | ||||||
| 
 |  | ||||||
| PUBLIC int exit(status) | PUBLIC int exit(status) | ||||||
| int status; | int status; | ||||||
| { | { | ||||||
|   if (__cleanup) (*__cleanup)(); |   _cleanup(); | ||||||
|   return callm1(MM, EXIT, status, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR); |   return callm1(MM, EXIT, status, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR); | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue