Skip to contentSkip to conversation

compat_wait4 fix

PATCH New Anton Blanchard 1 participant 1 message May 29, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 compat_wait4 fix

Hi,

sys_wait4 can return a pid and in this case we want to copy the struct rusage out to userspace.

Anton

kernel/compat.c +1 -2
@@ -362,8 +362,7 @@
 		ret = sys_wait4(pid, stat_addr ? &status : NULL, options, &r);
 		set_fs (old_fs);
 
-		if (!ret)
-		{
+		if (ret > 0) {
 			if (put_compat_rusage(ru, &r)) 
 				return -EFAULT;
 			if (stat_addr && put_user(status, stat_addr))