* team::args was not correctly initialized in create_team_struct()
* even worse, in case of fork(), it was never initialized. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19799 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
af1c1a0a03
commit
f4972679f7
@ -560,6 +560,7 @@ create_team_struct(const char *name, bool kernel)
|
||||
team->next = team->siblings_next = team->children = team->parent = NULL;
|
||||
team->id = allocate_thread_id();
|
||||
strlcpy(team->name, name, B_OS_NAME_LENGTH);
|
||||
team->args[0] = '\0';
|
||||
team->num_threads = 0;
|
||||
team->io_context = NULL;
|
||||
team->address_space = NULL;
|
||||
@ -1133,6 +1134,8 @@ fork_team(void)
|
||||
if (team == NULL)
|
||||
return B_NO_MEMORY;
|
||||
|
||||
strlcpy(team->args, parentTeam->args, sizeof(team->args));
|
||||
|
||||
state = disable_interrupts();
|
||||
GRAB_TEAM_LOCK();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user