git: system - Add wait6(), waitid(), and si_pid/si_uid siginfo support

Matthew Dillon dillon at crater.dragonflybsd.org
Sun Sep 30 13:23:38 PDT 2018


commit 33b81dc9633739f35a61170c31e64dd522fec577
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sun Sep 30 12:45:14 2018 -0700

    system - Add wait6(), waitid(), and si_pid/si_uid siginfo support
    
    * Add the wait6() system call (header definitions taken from FreeBSD).
      This required rearranging kern_wait() a bit.  In particular, we now
      maintain a hold count of 1 on the process during processing instead
      of releasing the hold count early.
    
    * Add waitid() to libc (waitid.c taken from FreeBSD).
    
    * Adjust manual pages (taken from FreeBSD).
    
    * Add siginfo si_pid and si_uid support.  This basically allows a process
      taking a signal to determine where the signal came from.  The fields
      already existed in siginfo but were not implemented.
    
      Implemented using a non-queued per-process array of signal numbers.
      The last originator sending any given signal is recorded and passed
      through to userland in the siginfo.
    
    * Fixes the 'lightdm' X display manager.  lightdm relies on si_pid
      support.  In addition, note that avoiding long lightdm related
      latencies and timeouts require a softlink from libmozjs-52.so to
      libmozjs-52.so.0 (must be addressed in dports, not addressed in this
      commit).
    
    Loosely-taken-from: FreeBSD (wait6, waitid support only)
    Reviewed-by: swildner

Summary of changes:
 lib/libc/gen/Makefile.inc                  |   2 +-
 lib/libc/gen/Symbol.map                    |   3 +
 sbin/newfs/defs.h => lib/libc/gen/waitid.c |  62 ++--
 lib/libc/include/namespace.h               |   2 +
 lib/libc/include/un-namespace.h            |   2 +
 lib/libc/sys/Makefile.inc                  |   2 +
 lib/libc/sys/Symbol.map                    |   6 +
 lib/libc/sys/wait.2                        | 510 +++++++++++++++++++++++++----
 sys/kern/init_sysent.c                     |   1 +
 sys/kern/kern_exit.c                       | 267 ++++++++++++---
 sys/kern/kern_proc.c                       |  18 +-
 sys/kern/kern_sig.c                        |  29 ++
 sys/kern/syscalls.c                        |   1 +
 sys/kern/syscalls.master                   |   2 +
 sys/platform/pc64/x86_64/machdep.c         |   2 +
 sys/platform/vkernel64/x86_64/cpu_regs.c   |   2 +
 sys/sys/kern_syscall.h                     |   7 +-
 sys/sys/procctl.h                          |   6 +
 sys/sys/resource.h                         |   7 +
 sys/sys/signalvar.h                        |   4 +
 sys/sys/syscall.h                          |   3 +-
 sys/sys/syscall.mk                         |   3 +-
 sys/sys/sysproto.h                         |  12 +
 sys/sys/sysunion.h                         |   1 +
 sys/sys/wait.h                             |  61 +++-
 25 files changed, 853 insertions(+), 162 deletions(-)
 copy sbin/newfs/defs.h => lib/libc/gen/waitid.c (59%)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/33b81dc9633739f35a61170c31e64dd522fec577


-- 
DragonFly BSD source repository



More information about the Commits mailing list