Subject: kern/19027: linux times() syscall incorrectly handles times(NULL)
To: None <>
From: None <>
List: netbsd-bugs
Date: 11/12/2002 04:13:07
>Number:         19027
>Category:       kern
>Synopsis:       linux times() syscall incorrectly handles times(NULL)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 12 10:37:00 PST 2002
>Release:        NetBSD 1.6_STABLE
	NewMonics, Inc.
System: NetBSD percbsd 1.6_STABLE NetBSD 1.6_STABLE (GENERIC) #0: Fri Nov 8 15:01:24 MST 2002 joff@susie:/u0/obj-1.6/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
	linux emulation of times() syscall should just return the uptime of
	the system rather than fail when it is given NULL as its argument.  
	This is consistent with how linux actually behaves.  
	compile a program "int main(void) { printf("%d\n", times(NULL)); }"
	and compare the output between native linux and emulated linux.
	simple mod to sys/compat/linux/common/linux_misc.c linux_sys_times()