From bfb9581757e7dcf392c4fabd6da2a82cbb2aa514 Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 15 Nov 2007 02:13:44 +0000 Subject: When forking, the new thread deserves a name too. Don't just use the td_startcopy section as it is not the right thing to do in other cases (e.g. if starting a new thread from one that is already named). --- sys/kern/kern_fork.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/kern/kern_fork.c') diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 4c5a730..e6f891d 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -495,6 +495,7 @@ again: bcopy(&td->td_startcopy, &td2->td_startcopy, __rangeof(struct thread, td_startcopy, td_endcopy)); + bcopy(&p2->p_comm, &td2->td_name, sizeof(td2->td_name)); td2->td_sigstk = td->td_sigstk; td2->td_sigmask = td->td_sigmask; td2->td_flags = TDF_INMEM; -- cgit v1.1