PM: add support for wait4(2)

This patch adds support for the wait4 system call, and with that the
wait3 call as well.  The implementation is absolutely minimal: only
user and system times of the exited child are returned (with all other
rusage fields left zero), and there is no support for tracers.  Still,
this should cover the main use cases of wait4.

Change-Id: I7a04589a8423a23990ab39aa38e85d535556743a
This commit is contained in:
David van Moolenbroek
2015-09-28 11:11:55 +00:00
parent bc2d75fa05
commit 29346ab043
17 changed files with 268 additions and 161 deletions

View File

@@ -19,7 +19,6 @@ SRCS+= dhcp_gettag.c dhcp_settag.c fsversion.c gcov.c gcov_flush.c itoa.c \
# closefrom.c confstr.c extattr.c getdevmajor.c \
# pthread_atfork.c \
# sysctlbyname.c sysctlgetmibinfo.c sysctlnametomib.c
# wait3.c
# To be ported
# nlist.c nlist_aout.c nlist_coff.c nlist_ecoff.c nlist_elf32.c nlist_elf64.c
@@ -55,7 +54,7 @@ SRCS+= _errno.c alarm.c alphasort.c arc4random.c assert.c basename.c clock.c \
syslog.c telldir.c time.c \
times.c toascii.c tolower_.c ttyname.c ttyslot.c toupper_.c ualarm.c \
ulimit.c uname.c unvis.c usleep.c utime.c utimens.c utmp.c \
utmpx.c valloc.c vis.c wait.c waitpid.c warn.c warnx.c \
utmpx.c valloc.c vis.c wait.c wait3.c waitpid.c warn.c warnx.c \
vwarn.c vwarnx.c verr.c verrx.c wordexp.c
.endif