| /third_party/pulseaudio/src/pulsecore/ |
| D | pid.c | 4 Copyright 2004-2006 Lennart Poettering 22 #include <config.h> 25 #include <fcntl.h> 26 #include <unistd.h> 27 #include <errno.h> 28 #include <sys/types.h> 29 #include <sys/stat.h> 30 #include <string.h> 31 #include <stdio.h> 32 #include <stdlib.h> [all …]
|
| /third_party/ltp/testcases/kernel/syscalls/waitpid/ |
| D | waitpid09.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 * waitpid(pid, WNOHANG) should return 0 if there is a running child 10 * waitpid(pid, WNOHANG) should return the pid of the child if 13 * waitpid(-1, 0) should return -1 with ECHILD if 16 * waitpid(-1, WNOHANG) should return -1 with ECHILD if 21 #include <sys/types.h> 22 #include <signal.h> 23 #include <errno.h> 24 #include <sys/wait.h> 25 #include <stdlib.h> [all …]
|
| D | waitpid_common.h | 1 // SPDX-License-Identifier: GPL-2.0-or-later 9 #include <sys/types.h> 10 #include <errno.h> 11 #include <sys/wait.h> 12 #include <stdlib.h> 13 #include "tst_test.h" 26 MAP_SHARED | MAP_ANONYMOUS, -1, 0); in waitpid_setup() 70 return -1; in waitpid_errno_check() 85 return -1; in waitpid_ret_test() 88 if ((ret == -1) && waitpid_errno_check(errno, wp_errno)) in waitpid_ret_test() [all …]
|
| /third_party/ltp/testcases/kernel/syscalls/fork/ |
| D | fork13.c | 2 * a race in pid generation that causes pids to be reused immediately 7 * the same pid repeated, especially when it competes with another 9 * implementation. Furthermore, many shell scripts assume that pid 16 * // pid == offset == n // pid == offset == n + 1 17 * test_and_set_bit(offset, map->page) 18 * test_and_set_bit(offset, map->page); 19 * pid_ns->last_pid = pid; 20 * pid_ns->last_pid = pid; 21 * // pid == n + 1 is freed (wait()) 24 * last = pid_ns->last_pid; // == n [all …]
|
| /third_party/Linux_Kernel/include/linux/ |
| D | pid.h | 4 #include <linux/rcupdate.h> 15 * What is struct pid? 17 * A struct pid is the kernel's internal notion of a process identifier. 19 * there are processes attached to it the struct pid lives in a hash 21 * quickly from the numeric pid value. The attached processes may be 22 * quickly accessed by following pointers from struct pid. 25 * problem. The process originally with that pid may have exited and the 26 * pid allocator wrapped, and another process could have come along 27 * and been assigned that pid. 34 * a struct pid is about 64 bytes. [all …]
|
| /third_party/mbedtls/programs/ssl/ |
| D | ssl_fork_server.c | 5 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 17 * http://www.apache.org/licenses/LICENSE-2.0 42 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 48 #include "mbedtls/config.h" 50 #include MBEDTLS_CONFIG_FILE 54 #include "mbedtls/platform.h" 56 #include <stdio.h> 57 #include <stdlib.h> 93 #include "mbedtls/entropy.h" 94 #include "mbedtls/ctr_drbg.h" [all …]
|
| /third_party/ltp/testcases/kernel/sched/hyperthreading/ht_affinity/ |
| D | ht_affinity.c | 2 HTaffinity.c - description 3 ------------------- 15 #include "ht_utils.h" 16 #include <sys/syscall.h> 17 #include <sys/types.h> 18 #include <unistd.h> 19 #include <sys/wait.h> 20 #include <stdio.h> 21 #include <stdlib.h> 22 #include <string.h> [all …]
|
| /third_party/grpc/test/core/util/ |
| D | subprocess_posix.cc | 9 * http://www.apache.org/licenses/LICENSE-2.0 19 #include <grpc/support/port_platform.h> 23 #include <assert.h> 24 #include <errno.h> 25 #include <signal.h> 26 #include <stdbool.h> 27 #include <stdio.h> 28 #include <stdlib.h> 29 #include <string.h> 30 #include <sys/types.h> [all …]
|
| /third_party/ltp/testcases/kernel/containers/pidns/ |
| D | pidns06.c | 13 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 * Testcase tries killing of the parent namespace pid by the container-init. 18 * It also tries killing of non-existent PID, by the container-init. 24 * 2. The pid of the parent namespace is passed to the container. 25 * 3. Container receieves the PID and passes SIGKILL to this PID. 38 #include <stdio.h> 39 #include <stdlib.h> 40 #include <sys/wait.h> 41 #include <assert.h> 42 #include <unistd.h> [all …]
|
| /third_party/glib/tests/ |
| D | child-test.c | 1 /* GLIB - Library of useful routines for C programming 2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald 19 * Modified by the GLib Team and others 1997-2000. See the AUTHORS 25 #include <sys/types.h> 26 #include <stdlib.h> 28 #include <glib.h> 31 #include <unistd.h> 35 #include <windows.h> 54 GPid pid; in get_a_child() local 65 cmdline = g_strdup_printf( "child-test -c%d", ttl); in get_a_child() [all …]
|
| /third_party/ltp/testcases/kernel/syscalls/ptrace/ |
| D | spawn_ptrace_child.h | 2 * Spawn a child and set it up for ptrace()-ing 6 * Licensed under the GPL-2 or later 11 * - add this line after your normal includes: 12 * #include "spawn_ptrace_child.c" 13 * - add this line to the top of your main(): 15 * - access the child pid via the "pid" variable 18 #include <errno.h> /* errno */ 19 #include <signal.h> /* signal() */ 20 #include <stdbool.h> /* true */ 21 #include <string.h> /* strcmp() */ [all …]
|
| D | ptrace07.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 * bogus xcomp_bv"), or CVE-2017-15537. This bug allowed ptrace(pid, 10 * --- specifically, by setting reserved bits in xstate_header.xcomp_bv. This 23 * similar bugs as well, but this test has to be x86-specific because it has to 24 * know about the architecture-dependent FPU state. 27 #include <errno.h> 28 #include <inttypes.h> 29 #include <sched.h> 30 #include <stdbool.h> 31 #include <stdlib.h> [all …]
|
| /third_party/ltp/testcases/kernel/syscalls/ioctl/ |
| D | ioctl_ns05.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 9 * Child cloned with the CLONE_NEWPID flag is created in a new pid namespace. 10 * That's checked by comparing its /proc/self/ns/pid symlink and the parent's 11 * one. Also child thinks its pid is 1. 16 #include <errno.h> 17 #include <stdio.h> 18 #include <sched.h> 19 #include <stdlib.h> 20 #include "tst_test.h" 21 #include "lapi/ioctl_ns.h" [all …]
|
| /third_party/ltp/testcases/kernel/syscalls/madvise/ |
| D | madvise08.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright (c) 2016 Richard Palethorpe <richiejp@f-m.fm> 24 #include <sys/types.h> 25 #include <sys/wait.h> 26 #include <sys/prctl.h> 27 #include <fcntl.h> 28 #include <unistd.h> 29 #include <signal.h> 30 #include <stdlib.h> 31 #include <stdio.h> [all …]
|
| /third_party/flutter/skia/third_party/externals/sdl/visualtest/src/linux/ |
| D | linux_process.c | 9 #include <SDL.h> 10 #include <SDL_test.h> 11 #include <sys/types.h> 12 #include <sys/wait.h> 13 #include <unistd.h> 14 #include <errno.h> 16 #include "SDL_visualtest_process.h" 17 #include "SDL_visualtest_harness_argparser.h" 18 #include "SDL_visualtest_parsehelper.h" 34 pid_t pid; in SDL_LaunchProcess() local [all …]
|
| /third_party/ltp/testcases/kernel/ipc/semaphore/ |
| D | sem02.c | 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 29 * Waiter, pid = <pid#> 30 * Poster, pid = <pid#>, posting 33 * Waiter waiting, pid = <pid#> 39 * -ported 41 * -ported to LTP 45 #include <stdio.h> 46 #include <stdlib.h> 47 #include <unistd.h> 48 #include <sys/sem.h> [all …]
|
| /third_party/ltp/testcases/kernel/syscalls/wait4/ |
| D | wait401.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 4 * Copyright (c) 2012-2018 Cyril Hrubis <chrubis@suse.cz> 8 * wait401 - check that a call to wait4() correctly waits for a child 12 #include <stdlib.h> 13 #include <errno.h> 15 #include <sys/types.h> 16 #include <sys/resource.h> 17 #include <sys/wait.h> 18 #include "tst_test.h" 22 pid_t pid; in run() local [all …]
|
| /third_party/ltp/testcases/kernel/syscalls/pidfd_send_signal/ |
| D | pidfd_send_signal03.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 * a signal to a new process which inherited the PID of the actual 10 * In order to do so it is necessary to start a process with a pre- 11 * determined PID. This is accomplished by writing to the 13 * By utilizing this, this test forks two children with the same PID. 19 #include <signal.h> 20 #include <stdio.h> 21 #include <unistd.h> 22 #include "lapi/pidfd_send_signal.h" 23 #include "tst_safe_pthread.h" [all …]
|
| /third_party/boost/boost/process/detail/posix/ |
| D | child_handle.hpp | 13 #include <utility> 14 #include <system_error> 22 int pid {-1}; member 23 explicit child_handle(int pid) : pid(pid) in child_handle() 30 child_handle(child_handle && c) : pid(c.pid) in child_handle() 32 c.pid = -1; in child_handle() 37 pid = c.pid; in operator =() 38 c.pid = -1; in operator =() 44 return pid; in id() 50 process_handle_t process_handle() const { return pid; } in process_handle() [all …]
|
| /third_party/ltp/testcases/kernel/syscalls/setpgid/ |
| D | setpgid01.c | 21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 39 * 2. Check functioning of setpgid(2) with pid = 0 and pgid = 0. 42 #include <errno.h> 43 #include <string.h> 44 #include <signal.h> 45 #include <stdlib.h> 46 #include <sys/wait.h> 47 #include "test.h" 80 pid_t pgid, pid; in setpgid_test1() local 83 pid = getpid(); in setpgid_test1() [all …]
|
| /third_party/pulseaudio/src/modules/ |
| D | module-esound-compat-spawnpid.c | 5 Copyright 2004-2006 Lennart Poettering 22 #include <config.h> 25 #include <unistd.h> 26 #include <errno.h> 27 #include <signal.h> 29 #include <pulsecore/core-error.h> 30 #include <pulsecore/module.h> 31 #include <pulsecore/modargs.h> 32 #include <pulsecore/log.h> 35 PA_MODULE_DESCRIPTION("ESOUND compatibility module: -spawnpid emulation"); [all …]
|
| /third_party/eudev/src/shared/ |
| D | process-util.c | 20 #include <stdbool.h> 21 #include <sys/types.h> 22 #include <string.h> 23 #include <stdio.h> 24 #include <assert.h> 25 #include <errno.h> 26 #include <unistd.h> 27 #include <sys/wait.h> 28 #include <signal.h> 29 #include <ctype.h> [all …]
|
| /third_party/grpc/third_party/rake-compiler-dock/build/ |
| D | sigfw.c | 3 * It is intended to be run as PID 1. 5 * Docker starts processes with "docker run" as PID 1. 6 * On Linux, the default signal handler for PID 1 ignores any signals. 7 * Therefore Ctrl-C aka SIGINT is ignored per default. 10 #include <unistd.h> 11 #include <stdio.h> 12 #include <signal.h> 13 #include <sys/types.h> 14 #include <sys/wait.h> 16 int pid = 0; variable [all …]
|
| /third_party/libunwind/src/ptrace/ |
| D | _UPT_access_reg.c | 1 /* libunwind - a platform-independent unwind library 2 Copyright (C) 2003-2005 Hewlett-Packard Co 3 Contributed by David Mosberger-Tang <davidm@hpl.hp.com> 27 #include "_UPT_internal.h" 30 # include <elf.h> 32 # include <asm/ptrace_offsets.h> 34 # include "tdep-ia64/rse.h" 38 #include <sys/uio.h> 44 pid_t pid = ui->pid; in _UPT_access_reg() local 54 Debug (16, "%s [%u] <- %lx\n", unw_regname (reg), (unsigned) reg, (long) *val); in _UPT_access_reg() [all …]
|
| /third_party/ltp/testcases/kernel/syscalls/pipe/ |
| D | pipe13.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 15 #include <unistd.h> 16 #include <sys/types.h> 17 #include <sys/wait.h> 18 #include <stdlib.h> 19 #include "tst_test.h" 47 int pid[child_num]; in verify_pipe() local 53 pid[i] = SAFE_FORK(); in verify_pipe() 54 if (pid[i] == 0) in verify_pipe() 57 TST_PROCESS_STATE_WAIT(pid[i], 'S', 0); in verify_pipe() [all …]
|