PERFORCE change 106967 for review

Roman Divacky rdivacky at FreeBSD.org
Sat Sep 30 02:36:39 PDT 2006


http://perforce.freebsd.org/chv.cgi?CH=106967

Change 106967 by rdivacky at rdivacky_witten on 2006/09/30 09:36:25

	Check the status of the options before messing with it.

Affected files ...

.. //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#4 edit

Differences ...

==== //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#4 (text+ko) ====

@@ -795,6 +795,12 @@
 		printf(ARGS(waitpid, "%d, %p, %d"),
 		    args->pid, (void *)args->status, args->options);
 #endif
+	/* 
+	 * this is necessary because the test in kern_wait doesnt
+	 * work because we mess with the options here
+	 */
+	if (args->options &~ (WUNTRACED|WNOHANG|WCONTINUED))
+	   	return (EINVAL);
 
 	options = (args->options & (WNOHANG | WUNTRACED));
 	/* WLINUXCLONE should be equal to __WCLONE, but we make sure */


More information about the p4-projects mailing list