Commit Graph

58 Commits

Author SHA1 Message Date
Ingo Weinhold
35e78b5674 * Some cleanup in _user_setpgid() (use of autolocking, don't use
shadowing variables).
* Resolved TODO: We wake up the parent if waiting in wait_for_child()
  now, if the process group changes.
* Added another TODO: setpgid() is supposed to fail on a child after
  it has executed exec*().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22185 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-05 19:36:38 +00:00
Ingo Weinhold
33f0dbe40a * Resolved TODO: waitpid() clears pending SIGCHLD, if the signal is
blocked and no other child status is available.
* Respect SA_NOCLDWAIT and ignored SIGCHLD in waitpid(): Unless a child
  status is available immediately, the thread shall block until all
  children are gone.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22161 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-03 21:35:24 +00:00
Axel Dörfler
22e95c5911 * creating (or dividing) reserved areas did not acquire a ref to an address
space - but they were released upon deletion. It's probably not really
  needed, but now all reserved areas also grab a reference to their address
  space.
* Rearranged team tear down to be a bit more sane: the I/O context is removed
  first (where semaphores/areas/ports/whatever might still be used), and the
  address space is deleted last.
* delete_area() can now remove its address space reference again (due to the
  two changes above), and therefore fixes bug #1374.
* cleaned up vm_address_space.c a bit (no functional change there, though).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22130 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-31 14:20:28 +00:00
Ingo Weinhold
9774b66a7d Fixed incorrect check.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22116 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-30 00:57:12 +00:00
Ingo Weinhold
f8ae4fe2c2 Added TODO.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22094 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-28 14:28:22 +00:00
Ingo Weinhold
24bcf55926 * Introduced new job_control_entry structure which, among other things,
is used instead of death_entry for team::dead_children.
* Added team::{stopped,continued}_children, which, analoguously to
  dead_children, are used to track the state of stopped/continued
  children.
* A team does have a job_control_entry, which is allocated at team
  creation time. It will be inserted into the parent's
  {stopped,continued}_children lists as the team's main thread is
  stopped/continued and removed when waitpid() retrieves the child
  state. When the team dies the entry is detached from the team and goes
  into the parent's dead_children list.
* Removed the wait_for_any field from team_dead_children. It was solely
  used to avoid deletion of the contained entries in certain situations.
  wait_for_child() (the waitpid() backend) always deletes an entry now,
  regardless of whether other threads are waiting; that's in
  accordance with the waidpid() specification. wait_for_thread() removes
  the entry only, if the caller is the parent of the respective team.
* Introduced team_set_job_control_state() which performes the job
  control entry transitions between the respective lists and wakes up
  threads waiting in wait_for_child(). It is invoked on team death and
  when the team's main thread receives job control signals.
* Reorganized wait_for_child(). It handles WCONTINUED and WUNTRACED now,
  too. Removed a block that interpreted the supplied ID as thread ID.
* Added missing parts in waitpid().

Job control starts to work, though it seems to have some glitches.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22088 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-28 03:29:14 +00:00
Ingo Weinhold
ff895459b7 * Replaced the team::dead_children::sem semaphore by a condition
variable. Due to C code including the header I had to turn it from and
  aggregated member to a pointer. I'm very close to starting to convert
  all remaining .c to .cpp files. :-/
* Got rid of the "waiters" field. It was only written, never read.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22084 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-27 20:30:34 +00:00
Ingo Weinhold
ebe6d10684 Turned the files I intend to devastate to C++.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22074 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-26 20:37:54 +00:00