Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump/librump/rumpkern copy parent's p_comm when forking ...



details:   https://anonhg.NetBSD.org/src/rev/edb8403dee80
branches:  trunk
changeset: 761901:edb8403dee80
user:      pooka <pooka%NetBSD.org@localhost>
date:      Thu Feb 10 13:31:30 2011 +0000

description:
copy parent's p_comm when forking (if it exists)

diffstat:

 sys/rump/librump/rumpkern/lwproc.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 9317fd2332fb -r edb8403dee80 sys/rump/librump/rumpkern/lwproc.c
--- a/sys/rump/librump/rumpkern/lwproc.c        Thu Feb 10 13:29:02 2011 +0000
+++ b/sys/rump/librump/rumpkern/lwproc.c        Thu Feb 10 13:31:30 2011 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: lwproc.c,v 1.13 2011/01/28 18:48:21 pooka Exp $       */
+/*      $NetBSD: lwproc.c,v 1.14 2011/02/10 13:31:30 pooka Exp $       */
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.13 2011/01/28 18:48:21 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.14 2011/02/10 13:31:30 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -116,7 +116,10 @@
 
        p->p_vmspace = vmspace_kernel();
        p->p_emul = &emul_netbsd;
-       strcpy(p->p_comm, "rumproc");
+       if (*parent->p_comm)
+               strcpy(p->p_comm, parent->p_comm);
+       else
+               strcpy(p->p_comm, "rumproc");
 
        if ((flags & RUMP_RFCFDG) == 0)
                KASSERT(parent == curproc);



Home | Main Index | Thread Index | Old Index