. helps debugging output; you can see the difference
between parent and child easily (it's sometimes
confusing to see an expected endpoint number with
an unexpected name, i.e. before exec())
. when processes crash after fork and before exec, it's
an instant hint that that's what's going on, instead of
it being the parent (endpoint numbers don't usually convey
this)
. name returns to 'normal' after exec(), so *F isn't visible
normally at all. (Except for for RS which forks apparently.)
struct mem_map *map_ptr; /* virtual address of map inside caller (PM) */
int gen, r;
int p_proc;
+ int namelen;
if(!isokendpt(m_ptr->PR_ENDPT, &p_proc))
return EINVAL;
rpc->p_virt_left = 0; /* disable, clear the process-virtual timers */
rpc->p_prof_left = 0;
+ /* Mark process name as being a forked copy */
+ namelen = strlen(rpc->p_name);
+#define FORKSTR "*F"
+ if(namelen+strlen(FORKSTR) < sizeof(rpc->p_name))
+ strcat(rpc->p_name, FORKSTR);
+
/* the child process is not runnable until it's scheduled. */
RTS_SET(rpc, RTS_NO_QUANTUM);
reset_proc_accounting(rpc);