Forgot to put the forked team into its parent group in fork_team() - which
resulted in a nice crash on exit. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9371 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1091,6 +1091,7 @@ fork_team(void)
|
|||||||
{
|
{
|
||||||
struct team *parentTeam = thread_get_current_thread()->team, *team;
|
struct team *parentTeam = thread_get_current_thread()->team, *team;
|
||||||
struct thread *parentThread = thread_get_current_thread();
|
struct thread *parentThread = thread_get_current_thread();
|
||||||
|
struct process_group *group = NULL;
|
||||||
struct fork_arg *forkArgs;
|
struct fork_arg *forkArgs;
|
||||||
struct area_info info;
|
struct area_info info;
|
||||||
thread_id threadID;
|
thread_id threadID;
|
||||||
@@ -1115,6 +1116,7 @@ fork_team(void)
|
|||||||
|
|
||||||
hash_insert(team_hash, team);
|
hash_insert(team_hash, team);
|
||||||
insert_team_into_parent(parentTeam, team);
|
insert_team_into_parent(parentTeam, team);
|
||||||
|
insert_team_into_group(parentTeam->group, team);
|
||||||
|
|
||||||
RELEASE_TEAM_LOCK();
|
RELEASE_TEAM_LOCK();
|
||||||
restore_interrupts(state);
|
restore_interrupts(state);
|
||||||
@@ -1188,11 +1190,14 @@ err1:
|
|||||||
state = disable_interrupts();
|
state = disable_interrupts();
|
||||||
GRAB_TEAM_LOCK();
|
GRAB_TEAM_LOCK();
|
||||||
|
|
||||||
|
remove_team_from_group(team, &group);
|
||||||
remove_team_from_parent(parentTeam, team);
|
remove_team_from_parent(parentTeam, team);
|
||||||
hash_remove(team_hash, team);
|
hash_remove(team_hash, team);
|
||||||
|
|
||||||
RELEASE_TEAM_LOCK();
|
RELEASE_TEAM_LOCK();
|
||||||
restore_interrupts(state);
|
restore_interrupts(state);
|
||||||
|
|
||||||
|
team_delete_process_group(group);
|
||||||
delete_team_struct(team);
|
delete_team_struct(team);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
|||||||
Reference in New Issue
Block a user