/kernel/linux/linux-6.6/tools/testing/selftests/timens/ |
H A D | vfork_exec.c | 81 pid_t pid; in main() local 109 pid = vfork(); in main() 110 if (pid < 0) in main() 113 if (pid == 0) { in main() 125 if (waitpid(pid, &status, 0) != pid) in main()
|
H A D | timer.c | 75 pid_t pid; in main() local 104 pid = fork(); in main() 105 if (pid < 0) in main() 107 if (pid == 0) { in main() 119 if (waitpid(pid, &status, 0) != pid) in main()
|
H A D | timerfd.c | 82 pid_t pid; in main() local 111 pid = fork(); in main() 112 if (pid < 0) in main() 114 if (pid == 0) { in main() 126 if (waitpid(pid, &status, 0) != pid) in main()
|
/kernel/liteos_a/testsuites/unittest/container/full/ |
H A D | It_pid_container_002.cpp | 44 pid_t pid = getpid(); in ChildFunClone3() local 45 int childFunRet = (int)pid; in ChildFunClone3() 82 pid_t pid = getpid(); in ChildFunClone2() local 83 int childFunRet = (int)pid; in ChildFunClone2() 111 pid_t pid = getpid(); in ChildFunClone1() local 112 int childFunRet = (int)pid; in ChildFunClone1() 113 char *containerType = "pid"; in ChildFunClone1()
|
/kernel/linux/linux-6.6/sound/firewire/oxfw/ |
H A D | oxfw-command.c | 11 unsigned int pid, u8 *format, unsigned int len) in avc_stream_set_format() 27 buf[7] = 0xff & pid; /* Plug ID */ in avc_stream_set_format() 53 enum avc_general_plug_dir dir, unsigned int pid, in avc_stream_get_format() 71 buf[7] = 0xff & pid; /* Plug ID */ in avc_stream_get_format() 113 unsigned short pid) in avc_general_inquiry_sig_fmt() 136 buf[3] = 0xff & pid; /* plug id */ in avc_general_inquiry_sig_fmt() 10 avc_stream_set_format(struct fw_unit *unit, enum avc_general_plug_dir dir, unsigned int pid, u8 *format, unsigned int len) avc_stream_set_format() argument 52 avc_stream_get_format(struct fw_unit *unit, enum avc_general_plug_dir dir, unsigned int pid, u8 *buf, unsigned int *len, unsigned int eid) avc_stream_get_format() argument 111 avc_general_inquiry_sig_fmt(struct fw_unit *unit, unsigned int rate, enum avc_general_plug_dir dir, unsigned short pid) avc_general_inquiry_sig_fmt() argument
|
/kernel/linux/linux-6.6/samples/pidfd/ |
H A D | pidfd-metadata.c | 52 static int pidfd_metadata_fd(pid_t pid, int pidfd) in pidfd_metadata_fd() argument 57 snprintf(path, sizeof(path), "/proc/%d", pid); in pidfd_metadata_fd() 65 * Verify that the pid has not been recycled and our /proc/<pid> handle in pidfd_metadata_fd() 88 pid_t pid; in main() local 92 pid = pidfd_clone(CLONE_PIDFD, &pidfd); in main() 93 if (pid < 0) in main() 100 procfd = pidfd_metadata_fd(pid, pidfd); in main()
|
/kernel/liteos_a/testsuites/unittest/extended/liteipc/smoke/ |
H A D | liteipc_test_001.cpp | 110 pid_t pid = fork(); in TestCase() local 111 ICUNIT_GOTO_WITHIN_EQUAL(pid, 0, 100000, pid, EXIT); in TestCase() 112 if (pid == 0) { in TestCase() 131 ret = waitpid(pid, &status, 0); in TestCase() 132 ICUNIT_GOTO_EQUAL(ret, pid, ret, EXIT); in TestCase()
|
/kernel/liteos_a/testsuites/unittest/libc/posix/mqueue/full/ |
H A D | It_posix_queue_209.cpp | 134 pid_t pid = fork(); in Testcase() local 135 ICUNIT_GOTO_WITHIN_EQUAL(pid, 0, 100000, pid, EXIT); // 100000, Valid range value of pid. in Testcase() 137 if (pid == 0) { in Testcase() 142 ret = waitpid(pid, &status, 0); in Testcase() 143 ICUNIT_ASSERT_EQUAL(ret, pid, ret); in Testcase()
|
H A D | It_posix_queue_208.cpp | 125 pid_t pid = fork(); in Testcase() local 126 ICUNIT_GOTO_WITHIN_EQUAL(pid, 0, 100000, pid, EXIT); // 100000, Valid range value of pid. in Testcase() 128 if (pid == 0) { in Testcase() 133 ret = waitpid(pid, &status, 0); in Testcase() 134 ICUNIT_ASSERT_EQUAL(ret, pid, ret); in Testcase()
|
/kernel/liteos_a/testsuites/unittest/process/lock/mutex/full/ |
H A D | pthread_mutex_test_025.cpp | 126 pid_t pid = fork(); in Testcase() local 127 ICUNIT_GOTO_WITHIN_EQUAL(pid, 0, 100000, pid, EXIT); // 100000, The expected value in Testcase() 129 if (pid == 0) { in Testcase() 134 ret = waitpid(pid, &status, 0); in Testcase() 135 ICUNIT_ASSERT_EQUAL(ret, pid, ret); in Testcase()
|
/test/xts/hats/kernel/syscalls/resource/prlimit64/ |
H A D | Prlimit64ApiTest.cpp | 55 * @tc.desc : Prlimit64 get and set pid resource limits success. 63 pid_t pid = getpid(); in HWTEST_F() local 66 ret = prlimit64(pid, RLIMIT_NPROC, nullptr, &limit); in HWTEST_F() 68 ret = prlimit64(pid, RLIMIT_NPROC, &limit, nullptr); in HWTEST_F() 72 ret = prlimit64(pid, RLIMIT_NOFILE, nullptr, &limit); in HWTEST_F() 99 * @tc.desc : Prlimit64 set and get pid resource limits fail. 108 pid_t pid = getpid(); in HWTEST_F() local 116 ret = prlimit64(pid, -1, nullptr, &limit); in HWTEST_F()
|
/third_party/ltp/testcases/kernel/syscalls/getrusage/ |
H A D | getrusage03.c | 95 pid_t pid = SAFE_FORK(); in zombie() local 97 if (!pid) in zombie() 101 TST_PROCESS_STATE_WAIT(pid, 'Z', 0); in zombie() 124 pid_t pid = SAFE_FORK(); in sig_ign() local 126 if (!pid) in sig_ign() 130 TST_PROCESS_EXIT_WAIT(pid, 0); in sig_ign()
|
/third_party/ltp/testcases/kernel/syscalls/ipc/semop/ |
H A D | semop03.c | 94 pid_t pid; in run() local 99 pid = SAFE_FORK(); in run() 101 if (pid == 0) { in run() 104 TST_PROCESS_STATE_WAIT(pid, 'S', 0); in run() 116 SAFE_KILL(pid, SIGHUP); in run() 119 waitpid(pid, NULL, 0); in run()
|
/third_party/ltp/testcases/kernel/syscalls/times/ |
H A D | times03.c | 80 int pid; in verify_times() local 138 pid = SAFE_FORK(); in verify_times() 140 if (!pid) { in verify_times() 146 SAFE_WAITPID(pid, NULL, 0); in verify_times() 185 int pid = SAFE_FORK(); in do_test() local 187 if (!pid) in do_test()
|
/third_party/ltp/testcases/kernel/syscalls/kill/ |
H A D | kill07.c | 89 pid_t pid; in main() local 127 pid = FORK_OR_VFORK(); in main() 128 if (pid < 0) { in main() 130 } else if (pid == 0) { in main() 143 TEST(kill(pid, TEST_SIG)); in main() 144 waitpid(pid, &status, 0); in main()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_open/ |
H A D | 2-1.c | 50 int pid, ret; in main() local 54 pid = fork(); in main() 55 if (pid == 0) { in main() 114 kill(pid, SIGABRT); in main() 124 kill(pid, SIGABRT); in main() 129 kill(pid, SIGUSR1); in main()
|
H A D | 7-2.c | 47 int pid; in main() local 51 pid = fork(); in main() 52 if (pid == 0) { in main() 120 kill(pid, SIGABRT); in main() 133 kill(pid, SIGABRT); in main() 141 kill(pid, SIGUSR1); in main()
|
/third_party/toybox/porting/liteos_a/toys/posix/ |
H A D | kill.c | 21 usage: kill [-l [SIGNAL] | SIGNAL | -SIGNAL] pid... 61 pid_t pid; in kill_main() local 93 int pid, sid; in kill_main() local 106 sid = getsid(pid = getpid()); in kill_main() 117 if (pid == procpid || sid == procsid || procpid == 1) continue; in kill_main() 144 pid = strtol(arg, &tmp, 10); in kill_main() 145 if (*tmp || kill(pid, signum) < 0) error_msg("unknown pid '%s'", arg); in kill_main()
|
/third_party/toybox/toys/other/ |
H A D | pmap.c | 30 pid_t pid = atolx(*optargs); in pmap_main() local 39 snprintf(toybuf, sizeof(toybuf), "/proc/%u/cmdline", pid); in pmap_main() 41 if (!line) error_msg("No %lu", (long)pid); in pmap_main() 42 xprintf("%u: %s\n", (int)pid, line); in pmap_main() 47 sprintf(toybuf, "/proc/%u/%smaps", pid, in pmap_main() 50 error_msg("No %ld\n", (long)pid); in pmap_main()
|
/third_party/toybox/toys/posix/ |
H A D | kill.c | 62 pid_t pid; in kill_main() local 96 int pid, sid; in kill_main() local 109 sid = getsid(pid = getpid()); in kill_main() 123 if (pid == procpid || sid == procsid || procpid == 1) continue; in kill_main() 148 pid = strtol(arg, &tmp, 10); in kill_main() 149 if (*tmp || kill(pid, signum) < 0) error_msg("unknown pid '%s'", arg); in kill_main()
|
/third_party/wpa_supplicant/wpa_supplicant-2.9/wpa_supplicant/examples/ |
H A D | p2p-action-udhcp.sh | 26 kill_daemon udhcpc /var/run/udhcpc-$GIFNAME.pid 31 kill_daemon udhcpc /var/run/udhcpc-$GIFNAME.pid 32 kill_daemon udhcpd /var/run/udhcpd-$GIFNAME.pid 33 udhcpc -i $GIFNAME -p /var/run/udhcpc-$GIFNAME.pid \ 41 kill_daemon udhcpd /var/run/udhcpd-$GIFNAME.pid 45 kill_daemon udhcpc /var/run/udhcpc-$GIFNAME.pid
|
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/wpa_supplicant/examples/ |
H A D | p2p-action-udhcp.sh | 26 kill_daemon udhcpc /var/run/udhcpc-$GIFNAME.pid 31 kill_daemon udhcpc /var/run/udhcpc-$GIFNAME.pid 32 kill_daemon udhcpd /var/run/udhcpd-$GIFNAME.pid 33 udhcpc -i $GIFNAME -p /var/run/udhcpc-$GIFNAME.pid \ 41 kill_daemon udhcpd /var/run/udhcpd-$GIFNAME.pid 45 kill_daemon udhcpc /var/run/udhcpc-$GIFNAME.pid
|
/kernel/linux/linux-5.10/drivers/char/agp/ |
H A D | compat_ioctl.c | 75 kreserve.pid = ureserve.pid; in compat_agpioc_reserve_wrap() 78 client = agp_find_client_by_pid(kreserve.pid); in compat_agpioc_reserve_wrap() 82 client_priv = agp_find_private(kreserve.pid); in compat_agpioc_reserve_wrap() 92 return agp_remove_client(kreserve.pid); in compat_agpioc_reserve_wrap() 133 client = agp_create_client(kreserve.pid); in compat_agpioc_reserve_wrap() 139 client_priv = agp_find_private(kreserve.pid); in compat_agpioc_reserve_wrap() 232 /* Use the original pid of the controller, in compat_agp_ioctl() 235 if (agp_fe.current_controller->pid != curr_priv->my_pid) { in compat_agp_ioctl()
|
/kernel/linux/linux-5.10/mm/ |
H A D | process_vm_access.c | 140 * @pid: PID of process to read/write from/to 151 static ssize_t process_vm_rw_core(pid_t pid, struct iov_iter *iter, in process_vm_rw_core() argument 197 task = find_get_task_by_vpid(pid); in process_vm_rw_core() 242 * @pid: PID of process to read/write from/to 254 static ssize_t process_vm_rw(pid_t pid, in process_vm_rw() argument 284 rc = process_vm_rw_core(pid, &iter, iov_r, riovcnt, flags, vm_write); in process_vm_rw() 292 SYSCALL_DEFINE6(process_vm_readv, pid_t, pid, const struct iovec __user *, lvec, in SYSCALL_DEFINE6() 296 return process_vm_rw(pid, lvec, liovcnt, rvec, riovcnt, flags, 0); in SYSCALL_DEFINE6() 299 SYSCALL_DEFINE6(process_vm_writev, pid_t, pid, in SYSCALL_DEFINE6() 304 return process_vm_rw(pid, lve in SYSCALL_DEFINE6() [all...] |
/kernel/linux/linux-6.6/drivers/char/agp/ |
H A D | compat_ioctl.c | 75 kreserve.pid = ureserve.pid; in compat_agpioc_reserve_wrap() 78 client = agp_find_client_by_pid(kreserve.pid); in compat_agpioc_reserve_wrap() 82 client_priv = agp_find_private(kreserve.pid); in compat_agpioc_reserve_wrap() 92 return agp_remove_client(kreserve.pid); in compat_agpioc_reserve_wrap() 133 client = agp_create_client(kreserve.pid); in compat_agpioc_reserve_wrap() 139 client_priv = agp_find_private(kreserve.pid); in compat_agpioc_reserve_wrap() 232 /* Use the original pid of the controller, in compat_agp_ioctl() 235 if (agp_fe.current_controller->pid != curr_priv->my_pid) { in compat_agp_ioctl()
|