Lines Matching defs:pid
6288 pid_t pid;
6360 err_code = posix_spawnp(&pid, path->narrow,
6366 err_code = posix_spawn(&pid, path->narrow,
6377 __msan_unpoison(&pid, sizeof(pid));
6379 result = PyLong_FromPid(pid);
6826 pid_t pid;
6833 pid = fork1();
6834 if (pid == 0) {
6841 if (pid == -1)
6843 return PyLong_FromPid(pid);
6861 pid_t pid;
6872 pid = fork();
6873 if (pid == 0) {
6880 if (pid == -1)
6882 return PyLong_FromPid(pid);
6933 pid: pid_t
6936 Get the scheduling policy for the process identified by pid.
6938 Passing 0 for pid returns the scheduling policy for the calling process.
6942 os_sched_getscheduler_impl(PyObject *module, pid_t pid)
6947 policy = sched_getscheduler(pid);
7022 pid: pid_t
7027 Set the scheduling policy for the process identified by pid.
7029 If pid is 0, the calling process is changed.
7034 os_sched_setscheduler_impl(PyObject *module, pid_t pid, int policy,
7048 if (sched_setscheduler(pid, policy, ¶m) == -1)
7058 pid: pid_t
7061 Returns scheduling parameters for the process identified by pid.
7063 If pid is 0, returns parameters for the calling process.
7068 os_sched_getparam_impl(PyObject *module, pid_t pid)
7075 if (sched_getparam(pid, ¶m))
7093 pid: pid_t
7097 Set scheduling parameters for the process identified by pid.
7099 If pid is 0, sets parameters for the calling process.
7104 os_sched_setparam_impl(PyObject *module, pid_t pid, PyObject *param_obj)
7112 if (sched_setparam(pid, ¶m))
7122 pid: pid_t
7125 Return the round-robin quantum for the process identified by pid, in seconds.
7131 os_sched_rr_get_interval_impl(PyObject *module, pid_t pid)
7135 if (sched_rr_get_interval(pid, &interval)) {
7173 pid: pid_t
7177 Set the CPU affinity of the process identified by pid to mask.
7183 os_sched_setaffinity_impl(PyObject *module, pid_t pid, PyObject *mask)
7256 if (sched_setaffinity(pid, setsize, cpu_set)) {
7273 pid: pid_t
7276 Return the affinity of the process identified by pid (or the current process if zero).
7282 os_sched_getaffinity_impl(PyObject *module, pid_t pid)
7296 if (sched_getaffinity(pid, setsize, mask) == 0)
7521 Returns a tuple of (pid, master_fd).
7522 Like fork(), return pid of 0 to the child process,
7523 and pid of child to the parent process.
7532 pid_t pid;
7542 pid = forkpty(&master_fd, NULL, NULL, NULL);
7543 if (pid == 0) {
7550 if (pid == -1) {
7553 return Py_BuildValue("(Ni)", PyLong_FromPid(pid), master_fd);
7858 pid: pid_t
7864 os_getpgid_impl(PyObject *module, pid_t pid)
7867 pid_t pgid = getpgid(pid);
7948 /* If our loop exits and our pid was not found (result will be NULL)
8050 pid: pid_t
8058 os_kill_impl(PyObject *module, pid_t pid, Py_ssize_t signal)
8061 if (PySys_Audit("os.kill", "in", pid, signal) < 0) {
8065 if (kill(pid, (int)signal) == -1) {
8070 // Don't micro-optimize pid == getpid(), since PyErr_SetString() check
8086 if (GenerateConsoleCtrlEvent(sig, (DWORD)pid) == 0) {
8096 handle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, (DWORD)pid);
8361 wait_helper(PyObject *module, pid_t pid, int status, struct rusage *ru)
8366 if (pid == -1)
8371 if (pid == 0) {
8420 return Py_BuildValue("NiN", PyLong_FromPid(pid), status, result);
8433 (pid, status, rusage)
8440 pid_t pid;
8448 pid = wait3(&status, options, &ru);
8450 } while (pid < 0 && errno == EINTR && !(async_err = PyErr_CheckSignals()));
8451 if (pid < 0)
8454 return wait_helper(module, pid, WAIT_STATUS_INT(status), &ru);
8464 pid: pid_t
8470 (pid, status, rusage)
8474 os_wait4_impl(PyObject *module, pid_t pid, int options)
8485 res = wait4(pid, &status, options, &ru);
8559 pid: pid_t
8566 (pid, status)
8572 os_waitpid_impl(PyObject *module, pid_t pid, int options)
8582 res = waitpid(pid, &status, options);
8594 pid: intptr_t
8601 (pid, status << 8)
8607 os_waitpid_impl(PyObject *module, intptr_t pid, int options)
8617 res = _cwait(&status, pid, options);
8639 (pid, status)
8646 pid_t pid;
8653 pid = wait(&status);
8655 } while (pid < 0 && errno == EINTR && !(async_err = PyErr_CheckSignals()));
8656 if (pid < 0)
8659 return Py_BuildValue("Ni", PyLong_FromPid(pid), WAIT_STATUS_INT(status));
8666 pid: pid_t
8669 Return a file descriptor referring to the process *pid*.
8676 os_pidfd_open_impl(PyObject *module, pid_t pid, unsigned int flags)
8679 int fd = syscall(__NR_pidfd_open, pid, flags);
9152 pid: pid_t
9155 Call the system call getsid(pid) and return the result.
9159 os_getsid_impl(PyObject *module, pid_t pid)
9163 sid = getsid(pid);
9193 pid: pid_t
9197 Call the system call setpgid(pid, pgrp).
9201 os_setpgid_impl(PyObject *module, pid_t pid, pid_t pgrp)
9204 if (setpgid(pid, pgrp) < 0)