 0ac803292e
			
		
	
	
		0ac803292e
		
	
	
	
	
		
			
			Fix warnings about: . Unused variables . format mismatch in printf/scanf format string and arguments . Missing parenthesis around assignment as truth values . Clang warnings anout unknown GCC pragma
		
			
				
	
	
		
			21 lines
		
	
	
		
			368 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			368 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #include <sys/cdefs.h>
 | |
| #include <lib.h>
 | |
| #include "namespace.h"
 | |
| 
 | |
| #include <sys/wait.h>
 | |
| 
 | |
| #ifdef __weak_alias
 | |
| __weak_alias(waitpid, _waitpid)
 | |
| #endif
 | |
| 
 | |
| pid_t waitpid(pid_t pid, int *status, int options)
 | |
| {
 | |
|   message m;
 | |
| 
 | |
|   m.m1_i1 = pid;
 | |
|   m.m1_i2 = options;
 | |
|   if (_syscall(PM_PROC_NR, WAITPID, &m) < 0) return(-1);
 | |
|   if (status != 0) *status = m.m2_i1;
 | |
|   return m.m_type;
 | |
| }
 |