• Home
  • Raw
  • Download

Lines Matching +full:qemu +full:- +full:user +full:- +full:static

35 # include <sys/linux-syscalls.h>
41 /* If this is ever expanded to non-Linux platforms, verify what calls are
53 # define dirfd(dirp) ((dirp)->dd_fd)
70 #define POSIX_CALL(call) do { if ((call) == -1) goto error; } while (0)
72 static struct PyModuleDef _posixsubprocessmodule;
74 /* Convert ASCII to a positive int, no libc call. no overflow. -1 on error. */
75 static int
80 num = num * 10 + (*name - '0'); in _pos_int_from_ascii()
84 return -1; /* Non digit found, not a number. */ in _pos_int_from_ascii()
90 /* When /dev/fd isn't mounted it is often a static directory populated
96 static int
106 return 0; /* / == /dev == /dev/fd means it is static. #fail */ in _is_fdescfs_mounted_on_dev_fd()
113 static int
117 long prev_fd = -1; in _sanity_check_python_fd_sequence()
136 static int
141 Py_ssize_t search_max = PyTuple_GET_SIZE(fd_sequence) - 1; in _is_fd_in_sorted_fd_sequence()
152 search_max = middle - 1; in _is_fd_in_sorted_fd_sequence()
157 static int
175 return -1; in make_inheritable()
184 static long
196 * safe. TODO - Someone should audit OpenBSD to make sure. */ in safe_get_max_fd()
202 if (local_max_fd == -1) in safe_get_max_fd()
217 static void
230 _Py_closerange(start_fd, keep_fd - 1); in _close_fds_by_brute_force()
251 char d_name[256]; /* Filename (null-terminated) */
269 static void
275 if (fd_dir_fd == -1) { in _close_open_fds_safe()
290 for (offset = 0; offset < bytes; offset += entry->d_reclen) { in _close_open_fds_safe()
293 if ((fd = _pos_int_from_ascii(entry->d_name)) < 0) in _close_open_fds_safe()
321 * http://womble.decadent.org.uk/readdir_r-advisory.html
323 static void
353 int fd_used_by_opendir = start_fd - 1; in _close_open_fds_maybe_unsafe()
358 if ((fd = _pos_int_from_ascii(dir_entry->d_name)) < 0) in _close_open_fds_maybe_unsafe()
384 static void
404 if (sigaction(sig, NULL, &sa) == -1) { in reset_signal_handlers()
427 * All of the code in this function must only use async-signal-safe functions,
437 * async-signal-safe functions vfork-unsafe. In particular, on Linux,
439 * they have to interact with the library-level thread list and send
440 * library-internal signals to implement per-process credentials semantics
444 * See bpo-35823 for further discussion and references.
447 * behavior since resource limits were per-thread attributes before
451 * If vfork-unsafe functionality is desired after vfork(), consider using
454 _Py_NO_INLINE static void
483 if (p2cwrite != -1) in child_exec()
485 if (c2pread != -1) in child_exec()
487 if (errread != -1) in child_exec()
510 would be a no-op (issue #10806). */ in child_exec()
515 else if (p2cread != -1) in child_exec()
522 else if (c2pwrite != -1) in child_exec()
529 else if (errwrite != -1) in child_exec()
533 * _close_open_fds takes care when it is not already non-inheritable. */ in child_exec()
576 /* This is where the user has asked us to deadlock their program. */ in child_exec()
588 /* Py_DECREF(result); - We're about to exec so why bother? */ in child_exec()
593 /* TODO HP-UX could use pstat_getproc() if anyone cares about it. */ in child_exec()
627 *--cur = Py_hexdigits[saved_errno % 16]; in child_exec()
630 _Py_write_noraise(errpipe_write, cur, hex_errno + sizeof(hex_errno) - cur); in child_exec()
650 * child_exec() should not be inlined to avoid spurious -Wclobber warnings from
651 * GCC (see bpo-35823).
653 _Py_NO_INLINE static pid_t
701 * This call may not be async-signal-safe but neither is calling in do_fork_exec()
702 * back into Python. The user asked us to use hope as a strategy in do_fork_exec()
719 static PyObject *
738 pid_t pid = -1; in subprocess_fork_exec()
775 if (config->_isolated_interpreter) { in subprocess_fork_exec()
928 /* NOTE: When old_sigmask is non-NULL, do_fork_exec() may use vfork(). */ in subprocess_fork_exec()
941 * might send such a signal to be vfork-unsafe and do not call it in in subprocess_fork_exec()
962 if (pid == -1) { in subprocess_fork_exec()
973 * such as QEMU user-mode emulation, the parent won't be blocked, in subprocess_fork_exec()
1013 return pid == -1 ? NULL : PyLong_FromPid(pid); in subprocess_fork_exec()
1050 static PyMethodDef module_methods[] = {
1055 static PyModuleDef_Slot _posixsubprocess_slots[] = {
1059 static struct PyModuleDef _posixsubprocessmodule = {