Home
last modified time | relevance | path

Searched refs:pid (Results 726 - 750 of 6938) sorted by relevance

1...<<21222324252627282930>>...278

/kernel/linux/linux-6.6/tools/testing/selftests/timens/
H A Dexec.c25 pid_t pid; in main() local
61 pid = fork(); in main()
62 if (pid < 0) in main()
65 if (pid == 0) { in main()
84 if (waitpid(pid, &status, 0) != pid) in main()
/kernel/linux/linux-6.6/tools/testing/selftests/powerpc/signal/
H A Dsignal.c23 extern long signal_self(pid_t pid, int sig);
41 pid_t pid; in test_signal() local
57 pid = fork(); in test_signal()
58 if (pid == -1) { in test_signal()
62 if (pid == 0) { in test_signal()
75 waitpid(pid, NULL, 0); in test_signal()
/kernel/liteos_a/testsuites/unittest/basic/exc/smoke/
H A Dit_test_exc_002.cpp87 pid_t pid = fork(); in TestCase() local
88 ICUNIT_ASSERT_WITHIN_EQUAL(pid, 0, INVALID_PROCESS_ID, pid); in TestCase()
89 if (pid == 0) { in TestCase()
95 ret = waitpid(pid, &status, 0); in TestCase()
96 ICUNIT_ASSERT_EQUAL(ret, pid, ret); in TestCase()
H A Dit_test_exc_003.cpp96 pid_t pid = fork(); in TestCase() local
97 ICUNIT_ASSERT_WITHIN_EQUAL(pid, 0, INVALID_PROCESS_ID, pid); in TestCase()
98 if (pid == 0) { in TestCase()
104 ret = waitpid(pid, &status, 0); in TestCase()
105 ICUNIT_ASSERT_EQUAL(ret, pid, ret); in TestCase()
/kernel/liteos_a/testsuites/unittest/container/smoke/
H A DIt_container_chroot_002.cpp86 auto pid = clone(ChildFunc, stackTop, SIGCHLD, arg); in TestFunc() local
87 if (pid == -1) { in TestFunc()
91 ret = waitpid(pid, &status, 0); in TestFunc()
110 auto pid = clone(TestFunc, stackTop, SIGCHLD, &arg); in ItContainerChroot002() local
111 ASSERT_NE(pid, -1); in ItContainerChroot002()
114 ret = waitpid(pid, &status, 0); in ItContainerChroot002()
/kernel/liteos_a/testsuites/unittest/extended/signal/full/
H A Dpipe_test_003.cpp38 pid_t pid; in TestPipeSingleProcessFcntl() local
52 pid = fork(); in TestPipeSingleProcessFcntl()
53 if (pid == -1) { in TestPipeSingleProcessFcntl()
56 } else if (pid == 0) { in TestPipeSingleProcessFcntl()
94 ret = waitpid(pid, &status, 0); in TestPipeSingleProcessFcntl()
95 ICUNIT_ASSERT_EQUAL(ret, pid, ret); in TestPipeSingleProcessFcntl()
H A Dpipe_test_001.cpp39 pid_t pid; in TestPipeSingleProcess() local
52 pid = fork(); in TestPipeSingleProcess()
53 if (pid == -1) { in TestPipeSingleProcess()
56 } else if (pid == 0) { in TestPipeSingleProcess()
77 ret = waitpid(pid, &status, 0); in TestPipeSingleProcess()
78 ICUNIT_ASSERT_EQUAL(ret, pid, ret); in TestPipeSingleProcess()
/kernel/liteos_a/testsuites/unittest/extended/signal/smoke/
H A Dpipe_test_002.cpp39 pid_t pid; in TestPipeMultiProcess() local
59 pid = fork(); in TestPipeMultiProcess()
60 if (pid == -1) { in TestPipeMultiProcess()
63 } else if (pid == 0) { in TestPipeMultiProcess()
98 ret = waitpid(pid, &status, 0); in TestPipeMultiProcess()
99 ICUNIT_ASSERT_EQUAL(ret, pid, ret); in TestPipeMultiProcess()
/kernel/liteos_a/testsuites/unittest/libc/posix/mqueue/full/
H A DIt_posix_queue_207.cpp99 pid_t pid = fork(); in Testcase() local
100 ICUNIT_GOTO_WITHIN_EQUAL(pid, 0, 100000, pid, EXIT); // 100000, Valid range value of pid. in Testcase()
102 if (pid == 0) { in Testcase()
107 ret = waitpid(pid, &status, 0); in Testcase()
108 ICUNIT_ASSERT_EQUAL(ret, pid, ret); in Testcase()
H A DIt_posix_queue_205.cpp101 pid_t pid = fork(); in TestCase() local
102 ICUNIT_GOTO_WITHIN_EQUAL(pid, 0, 100000, pid, EXIT); // 100000, Valid range value of pid. in TestCase()
104 if (pid == 0) { in TestCase()
109 ret = waitpid(pid, &status, 0); in TestCase()
110 ICUNIT_ASSERT_EQUAL(ret, pid, ret); in TestCase()
/test/xts/device_attest/common/permission/src/
H A Dpermission.cpp39 pid_t pid = IPCSkeleton::GetCallingPid(); in IsSystem() local
42 HILOGD("[IsSystem] check permission, type=%{public}d, pid=%{public}d,uid=%{public}d", in IsSystem()
43 static_cast<int32_t>(type), pid, uid); in IsSystem()
58 HILOGE("[IsSystem] system denied, type=%{public}d, pid=%{public}d, uid=%{public}d", in IsSystem()
59 static_cast<int32_t>(type), pid, uid); in IsSystem()
68 pid_t pid = IPCSkeleton::GetCallingPid(); in IsPermissionGranted() local
71 HILOGD("[IsPermissionGranted] check permission, perm=%{public}s type=%{public}d, pid=%{public}d,uid=%{public}d", in IsPermissionGranted()
72 perm.c_str(), static_cast<int32_t>(type), pid, uid); in IsPermissionGranted()
87 HILOGE("[IsPermissionGranted] permis denied, perm=%{public}s type=%{public}d, pid=%{public}d, uid=%{public}d", in IsPermissionGranted()
88 perm.c_str(), static_cast<int32_t>(type), pid, ui in IsPermissionGranted()
[all...]
/third_party/ltp/testcases/kernel/containers/share/
H A Dns_exec.c56 static int open_ns_fd(const char *pid, const char *ns) in open_ns_fd() argument
61 sprintf(file_buf, "%s/%s/ns/%s", PROC_PATH, pid, ns); in open_ns_fd()
94 * ./ns_exec <NS_PID> <ipc,mnt,net,pid,user,uts> <PROGRAM> [ARGS]
98 int i, rv, pid; in main() local
140 pid = ltp_clone_quick(SIGCHLD, (void *)child_fn, (void *)argv); in main()
141 if (pid == -1) { in main()
147 if (waitpid(pid, &rv, 0) == -1) { in main()
/third_party/ltp/testcases/kernel/controllers/cgroup/
H A Dcgroup_core03.c31 static int wait_for_pid(pid_t pid) in wait_for_pid() argument
36 ret = waitpid(pid, &status, 0); in wait_for_pid()
52 int pid; in cg_run_nowait() local
54 pid = SAFE_FORK(); in cg_run_nowait()
55 if (pid == 0) { in cg_run_nowait()
62 return pid; in cg_run_nowait()
/third_party/ltp/testcases/kernel/controllers/memcg/stress/
H A Dmemcg_stress_test.sh66 local i pid pids
78 for pid in $pids; do
79 kill -USR1 $pid 2> /dev/null
87 for pid in $pids; do
88 kill -KILL $pid 2> /dev/null
89 wait $pid 2> /dev/null
/third_party/ltp/testcases/kernel/syscalls/pidfd_getfd/
H A Dpidfd_getfd02.c69 int pid; in run() local
72 pid = SAFE_FORK(); in run()
73 if (!pid) { in run()
85 pid = SAFE_FORK(); in run()
86 if (!pid) { in run()
90 pidfd = SAFE_PIDFD_OPEN(pid, 0); in run()
/third_party/ltp/testcases/kernel/syscalls/kill/
H A Dkill11.c62 pid_t pid, npid; in verify_kill() local
66 pid = SAFE_FORK(); in verify_kill()
67 if (!pid) in verify_kill()
70 SAFE_KILL(pid, tc->sig); in verify_kill()
73 if (npid != pid) { in verify_kill()
74 tst_res(TFAIL, "wait() returned %d, expected %d", npid, pid); in verify_kill()
/third_party/ltp/testcases/kernel/syscalls/sched_getattr/
H A Dsched_getattr02.c16 * 1) sched_getattr fails with unused pid
41 static pid_t pid; variable
46 pid_t *pid; member
53 {&pid, NULL, sizeof(struct sched_attr), 0, EINVAL},
54 {&pid, &attr_copy, sizeof(struct sched_attr) - 1, 0, EINVAL},
55 {&pid, &attr_copy, sizeof(struct sched_attr), 1000, EINVAL}
65 TEST(sched_getattr(*(test->pid), test->a, test->size, in sched_getattr_verify()
/third_party/ltp/testcases/kernel/syscalls/pidfd_send_signal/
H A Dpidfd_send_signal03.c47 pid_t pid, new_pid; in verify_pidfd_send_signal() local
54 pid = SAFE_FORK(); in verify_pidfd_send_signal()
55 if (pid == 0) { in verify_pidfd_send_signal()
60 sprintf(pid_filename, "/proc/%d", pid); in verify_pidfd_send_signal()
68 sprintf(pid_str, "%d", pid - 1); in verify_pidfd_send_signal()
77 if (new_pid == pid) { in verify_pidfd_send_signal()
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_init/
H A D4-1.c108 pid_t pid; in main() local
112 pid = fork(); in main()
113 if (pid < 0) { in main()
119 if (pid == 0) in main()
123 if (pid != waitpid(pid, &child_status, 0)) { in main()
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/
H A D5-2.c55 int pid; in main() local
79 if ((pid = fork()) == 0) { in main()
115 kill(pid, SIGABRT); //signal child in main()
122 kill(pid, SIGKILL); //kill child if not gone in main()
130 kill(pid, SIGKILL); //kill child if not gone in main()
136 kill(pid, SIGKILL); //kill child if not gone in main()
/third_party/musl/libc-test/src/functionalext/supplement/thread/
H A Dpthread_atfork.c102 pid_t pid = fork(); in pthread_atfork_0100() local
103 if (pid == 0) { in pthread_atfork_0100()
109 } else if (pid > 0) { in pthread_atfork_0100()
137 pid_t pid = fork(); in pthread_atfork_0200() local
138 if (pid == 0) { in pthread_atfork_0200()
141 } else if (pid > 0) { in pthread_atfork_0200()
/third_party/python/Lib/test/
H A Dsignalinterproctester.py42 def subprocess_send_signal(self, pid, signame):
43 code = 'import os, signal; os.kill(%s, signal.%s)' % (pid, signame)
56 pid = str(os.getpid())
58 with self.subprocess_send_signal(pid, "SIGHUP") as child:
64 with self.subprocess_send_signal(pid, "SIGUSR1") as child:
69 with self.subprocess_send_signal(pid, "SIGUSR2") as child:
/third_party/toybox/toys/other/
H A Dchrt.c17 -p Set/query given pid (instead of running COMMAND)
43 #define sched_getparam(pid, param) \
44 syscall(SYS_sched_getparam, (pid_t)pid, (void *)param)
45 #define sched_getscheduler(pid) \
46 syscall(SYS_sched_getscheduler, (pid_t)pid)
47 #define sched_setscheduler(pid, scheduler, param) \
48 syscall(SYS_sched_setscheduler, (pid_t)pid, (int)scheduler, (void *)param)
73 if (-1==(pol = sched_getscheduler(TT.p))) perror_exit("pid %ld", TT.p); in chrt_main()
76 printf("pid %ld's current scheduling policy: %s%s\n", TT.p, s, R); in chrt_main()
79 printf("pid in chrt_main()
[all...]
/kernel/linux/linux-5.10/arch/x86/um/
H A Dptrace_user.c9 int ptrace_getregs(long pid, unsigned long *regs_out) in ptrace_getregs() argument
11 if (ptrace(PTRACE_GETREGS, pid, 0, regs_out) < 0) in ptrace_getregs()
16 int ptrace_setregs(long pid, unsigned long *regs) in ptrace_setregs() argument
18 if (ptrace(PTRACE_SETREGS, pid, 0, regs) < 0) in ptrace_setregs()
/kernel/linux/linux-6.6/arch/x86/um/
H A Dptrace_user.c9 int ptrace_getregs(long pid, unsigned long *regs_out) in ptrace_getregs() argument
11 if (ptrace(PTRACE_GETREGS, pid, 0, regs_out) < 0) in ptrace_getregs()
16 int ptrace_setregs(long pid, unsigned long *regs) in ptrace_setregs() argument
18 if (ptrace(PTRACE_SETREGS, pid, 0, regs) < 0) in ptrace_setregs()

Completed in 9 milliseconds

1...<<21222324252627282930>>...278