* Removed unused team::pending_signals.
* Added team::flags. Currently only used for setting a flag when a team
has exec()ed.
* Some improvements of _user_setpgid():
- It failed incorrectly when the target process was a process group
leader. According to the standard it shall fail when the process is
a session leader. Moving a process group leader to another process
group is fine, even if that leaves the group leaderless.
- Fixed race conditions. We need to recheck the error conditions when
we hold the team spinlock. Otherwise the situation could change
while we allocated the new process group. This was one of the
reasons for bug #1799 -- after the shell fork()'s both parent and
child invoke setpgid() for the child.
- Fixed behavior for pid == pgid. It doesn't necessarily mean that a
new group has to be created.
- Fixed update of target process group orphaned state.
- Squashed TODO: setpgid() on a child is supposed to fail after the
child has exec()ed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24041 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -41,6 +41,8 @@ enum team_state {
|
||||
TEAM_STATE_DEATH // being killed
|
||||
};
|
||||
|
||||
#define TEAM_FLAG_EXEC_DONE 0x01
|
||||
|
||||
typedef enum job_control_state {
|
||||
JOB_CONTROL_STATE_NONE,
|
||||
JOB_CONTROL_STATE_STOPPED,
|
||||
@@ -155,7 +157,7 @@ struct team {
|
||||
char args[64]; // contents for the team_info::args field
|
||||
int num_threads; // number of threads in this team
|
||||
int state; // current team state, see above
|
||||
int pending_signals;
|
||||
int32 flags;
|
||||
void *io_context;
|
||||
sem_id death_sem; // semaphore to wait on for dying threads
|
||||
struct list dead_threads;
|
||||
|
||||
Reference in New Issue
Block a user