patch-1.3.77 linux/kernel/fork.c

Next file: linux/kernel/sched.c
Previous file: linux/include/net/sock.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.76/linux/kernel/fork.c linux/kernel/fork.c
@@ -28,6 +28,7 @@
 
 int nr_tasks=1;
 int nr_running=1;
+unsigned long int total_forks=0;	/* Handle normal Linux uptimes. */
 
 static inline int find_empty_process(void)
 {
@@ -269,6 +270,7 @@
 	p->exit_signal = clone_flags & CSIGNAL;
 	p->counter = current->counter >> 1;
 	wake_up_process(p);			/* do this last, just in case */
+	++total_forks;
 	return p->pid;
 
 bad_fork_cleanup_sighand:

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this