[haiku-bugs] Re: [Haiku] #13546: wait4() doesn't seem to work

  • From: "pulkomandy" <trac@xxxxxxxxxxxx>
  • Date: Sun, 09 Jul 2017 13:46:39 -0000

#13546: wait4() doesn't seem to work
---------------------------------+----------------------------
   Reporter:  korli              |      Owner:  nobody
       Type:  bug                |     Status:  new
   Priority:  normal             |  Milestone:  Unscheduled
  Component:  System/libroot.so  |    Version:  R1/Development
 Resolution:                     |   Keywords:
 Blocked By:                     |   Blocking:
Has a Patch:  0                  |   Platform:  All
---------------------------------+----------------------------

Comment (by pulkomandy):

 I'm not sure this is possible. WNOWAIT still removes the team from the
 running team list (rightfully so, the team isn't running). What it does is
 keep it in the local list for the parent team to use wait on.

 However, our gtrusage (and wait4) is implemented using
 get_team_usage_info, which lookups the team by PID in the running team
 list.

 So, the wait_for_child syscall should be extended to return the rusage
 info (it can extract it before reaping the team). Then, wait4 can get it
 from there.

--
Ticket URL: <https://dev.haiku-os.org/ticket/13546#comment:4>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: