process: forks should inherit parents name
authorAlan Cox <alan@linux.intel.com>
Fri, 22 May 2015 23:36:58 +0000 (00:36 +0100)
committerAlan Cox <alan@linux.intel.com>
Fri, 22 May 2015 23:36:58 +0000 (00:36 +0100)
This fixes the cases where forks show up oddly in ps with a blank name

Kernel/process.c

index cea8c33..caf94fd 100644 (file)
@@ -279,6 +279,7 @@ ptptr ptab_alloc(void)
                        newp = NULL;
                 }
                 newp->p_pgrp = udata.u_ptab->p_pgrp;
+                memcpy(newp->p_name, udata.u_ptab->p_name, sizeof(newp->p_name));
        }
        irqrestore(irq);
        if (newp)