Home
last modified time | relevance | path

Searched full:fork (Results 1 – 25 of 1705) sorted by relevance

12345678910>>...69

/third_party/grpc/test/core/util/
Dfork_test.cc19 #include "src/core/util/fork.h"
29 ASSERT_FALSE(grpc_core::Fork::Enabled()); in TEST()
31 // Default fork support (disabled) in TEST()
32 grpc_core::Fork::GlobalInit(); in TEST()
33 ASSERT_FALSE(grpc_core::Fork::Enabled()); in TEST()
35 // Explicitly disabled fork support in TEST()
36 grpc_core::Fork::Enable(false); in TEST()
37 grpc_core::Fork::GlobalInit(); in TEST()
38 ASSERT_FALSE(grpc_core::Fork::Enabled()); in TEST()
40 // Explicitly enabled fork support in TEST()
[all …]
/third_party/mesa3d/src/compiler/nir/
Dnir_lower_goto_ifs.c39 /** Fork in the path, if reachable->entries > 1 */
40 struct path_fork *fork; member
133 * Sets all path variables to reach the target block via a fork
136 set_path_vars(nir_builder *b, struct path_fork *fork, nir_block *target) in set_path_vars() argument
138 while (fork) { in set_path_vars()
140 if (_mesa_set_search(fork->paths[i].reachable, target)) { in set_path_vars()
141 if (fork->is_var) { in set_path_vars()
142 nir_store_var(b, fork->path_var, nir_imm_bool(b, i), 1); in set_path_vars()
144 assert(fork->path_ssa == NULL); in set_path_vars()
145 fork->path_ssa = nir_imm_bool(b, i); in set_path_vars()
[all …]
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/
D1-1.c10 * shall declare fork handlers to be called before and after a fork() command, in the context
11 * of the thread that called the fork(). The 'prepare' fork handler shall be called before
12 * fork() processing commences. The 'parent' fork handle shall be called after fork()
13 * processing completes in the parent process. The 'child' fork shall be called after
14 * fork() processing completes in the child process.
17 * 1. Call pthread_atfork() before a fork() call, setting all three fork handlers for
19 * 2. Call fork()
20 * 3. Verify that all three fork handlers were called
68 /* Set up the fork handlers */ in main()
74 /* Now call fork() */ in main()
[all …]
Dassertions.xml7 shall declare fork handlers to be called before and after a fork() command, in the context
8 of the thread that called the fork(). The 'prepare' fork handler shall be called before
9 fork() processing commences. The 'parent' fork handle shall be called after fork()
10 processing completes in the parent process. The 'child' fork shall be called after
11 fork() processing completes in the child process.
15 If no handling is desired at one or more of these three points, the corresponding fork
23 [ENOMEM] - insufficient table space exists to record the fork handler addresses.
/third_party/grpc/src/core/util/
Dfork.cc19 #include "src/core/util/fork.h"
58 // EventEngine is expected to terminate all threads before fork, and so this in IncExecCtxCount()
66 // This only occurs if we are trying to fork. Wait until the fork() in IncExecCtxCount()
168 void Fork::GlobalInit() { in GlobalInit()
175 bool Fork::Enabled() { in Enabled()
180 void Fork::Enable(bool enable) { in Enable()
185 void Fork::DoIncExecCtxCount() { in DoIncExecCtxCount()
189 void Fork::DoDecExecCtxCount() { in DoDecExecCtxCount()
193 bool Fork::RegisterResetChildPollingEngineFunc( in RegisterResetChildPollingEngineFunc()
194 Fork::child_postfork_func reset_child_polling_engine) { in RegisterResetChildPollingEngineFunc()
[all …]
/third_party/grpc/test/cpp/end2end/
Dclient_fork_test.cc18 // No-op for builds without fork support.
22 #include <grpc/fork.h>
36 #include "src/core/util/fork.h"
68 grpc_core::Fork::Enable(true); in TEST()
73 pid_t server_pid = fork(); in TEST()
75 case -1: // fork failed in TEST()
77 case 0: // post-fork child in TEST()
87 default: // post-fork parent in TEST()
91 // Do a round trip before we fork. in TEST()
107 // Fork and do round trips in the post-fork parent and child. in TEST()
[all …]
/third_party/mindspore/mindspore-src/source/mindspore/ccsrc/pybind_api/utils/
Dfork_utils_py.cc37 MS_LOG(DEBUG) << "Register MsContext fork callbacks."; in RegisterForkCallbacks()
40 MS_LOG(DEBUG) << "Register ActorMgr fork callbacks."; in RegisterForkCallbacks()
43 MS_LOG(DEBUG) << "Register Common ThreadPool fork callbacks."; in RegisterForkCallbacks()
47 MS_LOG(DEBUG) << "Register PyNativeExecutor fork callbacks."; in RegisterForkCallbacks()
51 MS_LOG(DEBUG) << "Register GraphExecutorPy fork callbacks."; in RegisterForkCallbacks()
55 MS_LOG(DEBUG) << "Register OpExecutor fork callbacks."; in RegisterForkCallbacks()
59 MS_LOG(DEBUG) << "Register DeviceContextManager fork callbacks."; in RegisterForkCallbacks()
63 MS_LOG(DEBUG) << "Register GraphScheduler fork callbacks."; in RegisterForkCallbacks()
71 MS_LOG(DEBUG) << "Parent process before fork."; in PrepareBeforeFork()
73 // Register fork callbacks when first fork event occurs. in PrepareBeforeFork()
[all …]
/third_party/mindspore/mindspore-src/source/mindspore/core/mindrt/src/
Dfork_utils.cc24 // Function called in parent process before fork.
26 FORK_UTILS_LOG("Fork event occurred, function called in parent process before fork."); in BeforeFork()
32 // Function called in parent process after fork.
34 FORK_UTILS_LOG("Fork event occurred, function called in parent process after fork."); in ParentAtFork()
40 // Function called in child process after fork.
42 FORK_UTILS_LOG("Fork event occurred, function called in child process after fork."); in ChildAtFork()
48 // Function called when fork callback function is nullptr.
/third_party/rust/crates/syn/src/
Ddiscouraged.rs10 /// This is the opposite operation to [`ParseStream::fork`]. You can fork a
12 /// stream to the fork to "commit" the parsing from the fork to the main
18 /// is that when the fork fails to parse an `A`, it's impossible to tell
28 /// [`ParseStream::fork`]: ParseBuffer::fork
39 /// This is the exact kind of parsing behavior which requires the "fork,
40 /// try, commit" behavior that [`ParseStream::fork`] discourages. With
89 /// let fork = input.fork();
90 /// if let Ok(arguments) = fork.parse() {
91 /// input.advance_to(&fork);
158 fn advance_to(&self, fork: &Self); in advance_to()
[all …]
/third_party/ltp/testcases/kernel/controllers/pids/
Dpids.sh96 tst_res TFAIL "fork failed unexpectedly"
98 tst_res TPASS "fork didn't fail"
119 tst_res TPASS "fork failed as expected"
121 tst_res TFAIL "fork didn't fail despite the limit"
141 tst_res TFAIL "fork failed unexpectedly"
143 tst_res TPASS "fork worked as expected"
187 tst_res TPASS "fork failed as expected"
189 tst_res TFAIL "fork didn't fail despite the limit"
218 tst_res TPASS "parent cgroup fork failed as expected"
220 tst_res TFAIL "parent cgroup fork didn't fail despite the limit"
[all …]
/third_party/grpc/src/core/lib/iomgr/
Dfork_posix.cc29 #include <grpc/fork.h>
40 #include "src/core/util/fork.h"
61 if (!grpc_core::Fork::Enabled()) { in grpc_prefork()
62 LOG(ERROR) << "Fork support not enabled; try running with the " in grpc_prefork()
70 LOG(INFO) << "Fork support is only compatible with the epoll1 and poll " in grpc_prefork()
74 if (!grpc_core::Fork::BlockExecCtx()) { in grpc_prefork()
76 "fork() handlers"; in grpc_prefork()
82 grpc_core::Fork::AwaitThreads(); in grpc_prefork()
88 grpc_core::Fork::AllowExecCtx(); in grpc_postfork_parent()
97 grpc_core::Fork::AllowExecCtx(); in grpc_postfork_child()
[all …]
/third_party/grpc/doc/
Dfork_support.md7 etc, to work around the GIL. These modules call `fork()` underneath the hood.
10 hence doesn't support `fork()`. Historically, we didn't support forking in gRPC,
25 The fork-support effort only works with "epoll1" and "poll" polling strategy.
26 There is no active development to extend fork-support's coverage.
31 # Alternative: use after fork
33 Complexities mentioned in the background section are inevitable for "pre-fork"
35 before invoking `fork()`. However, if the application only instantiate gRPC
36 Python objects after calling `fork()`, then `fork()` will work normally, since
/third_party/musl/docs/interface/pthread/
DPTHREAD_ATFORK_FOR_GWPASAN.md8 <200b> register fork handler for GWP sanitizer to make sure prepare handler of
23 ​ The pthread_atfork_for_gwpasan() function registers fork handlers that are
24 ​ to be executed when fork() is called by any thread in a process.
25 ​ The handlers are executed in the context of thread that calls fork().
30 <200b> process before fork() processing starts.
33 <200b> after fork() processing completes.
36 <200b> after fork() processing completes.
38 …ts may be NULL is no handler is needed in<200b> the corresponding phase of fork() processing.
58 ​ ENOMEM Could not allocate memory to record the fork handler list
76 <200b> pthread_atfork() should be used to register fork handler.
[all …]
/third_party/musl/libc-test/src/functionalext/fortify/
Dunistd.c42 int pid = fork(); in unistd_dynamic_chk_001()
45 t_error("fork failed: %d\n", __LINE__); in unistd_dynamic_chk_001()
81 int pid = fork(); in unistd_dynamic_chk_002()
84 t_error("fork failed: %d\n", __LINE__); in unistd_dynamic_chk_002()
121 int pid = fork(); in unistd_dynamic_chk_003()
124 t_error("fork failed: %d\n", __LINE__); in unistd_dynamic_chk_003()
162 int pid = fork(); in unistd_dynamic_chk_004()
165 t_error("fork failed: %d\n", __LINE__); in unistd_dynamic_chk_004()
202 int pid = fork(); in unistd_dynamic_chk_005()
205 t_error("fork failed: %d\n", __LINE__); in unistd_dynamic_chk_005()
[all …]
Dstring_ext.c80 int pid = fork(); in test_strcat_0020()
83 t_error("fork failed: %s\n", strerror(errno)); in test_strcat_0020()
131 int pid = fork(); in test_strncat_0020()
134 t_error("fork failed: %s\n", strerror(errno)); in test_strncat_0020()
179 int pid = fork(); in test_stpcpy_0020()
182 t_error("fork failed: %s\n", strerror(errno)); in test_stpcpy_0020()
230 int pid = fork(); in test_stpncpy_0020()
233 t_error("fork failed: %s\n", strerror(errno)); in test_stpncpy_0020()
280 int pid = fork(); in test_strncpy_0020()
283 t_error("fork failed: %s\n", strerror(errno)); in test_strncpy_0020()
[all …]
Dfcntl_ext.c63 int pid = fork(); in open_0020()
66 t_error("fork failed: %s\n", strerror(errno)); in open_0020()
97 int pid = fork(); in open_0030()
100 t_error("fork failed: %s\n", strerror(errno)); in open_0030()
159 int pid = fork(); in openat_0020()
162 t_error("fork failed: %s\n", strerror(errno)); in openat_0020()
193 int pid = fork(); in openat_0030()
196 t_error("fork failed: %s\n", strerror(errno)); in openat_0030()
256 int pid = fork(); in open64_0020()
259 t_error("fork failed: %s\n", strerror(errno)); in open64_0020()
[all …]
/third_party/musl/libc-test/src/functionalext/info/
Dfatal_message.c34 #define FORK(fpid) \ macro
38 t_error("error in fork!");\
71 fpid = fork(); in fatal_message_0020()
72 FORK(fpid); in fatal_message_0020()
105 fpid = fork(); in fatal_message_0030()
106 FORK(fpid); in fatal_message_0030()
114 fpidChild = fork(); in fatal_message_0030()
116 t_printf("error in fork!"); in fatal_message_0030()
156 fpid = fork(); in fatal_message_0040()
157 FORK(fpid); in fatal_message_0040()
[all …]
/third_party/mindspore/mindspore-src/source/docs/api/api_python_en/
Dmindspore.multiprocessing.md5 …ces to ensure that the MindSpore framework works properly when creating multiple processes by fork.
7 When using mindspore.multiprocessing and creating multiprocesses by fork, the framework internally …
9fork occurs, the parent process waits for the internal thread task to finish executing before the
10 - After fork occurs, the parent process releases the actively held GIL lock.
11 - After fork occurs, the child process releases the actively held GIL lock, then restores and clean…
13 The above process is not triggered when creating a multiprocess without using fork. At this point, …
65fork after executing a computing task, if the module used is not mindspore.multiprocessing, there …
67 > The fork of creating child processes is only supported on POSIX systems (e.g. Linux and macOS), b…
80 multiprocessing.set_start_method("fork", force=True)
96 …rce inaccessibility. After modifying the child process creation method to fork, the framework will…
[all …]
/third_party/ltp/testcases/kernel/syscalls/madvise/
Dmadvise10.c12 * range after a fork(2).
15 * Within the child created by fork(2), the MADV_WIPEONFORK
21 * Mark memory area as wipe-on-fork.
22 * On fork, child process memory should be zeroed.
26 * Mark memory area as wipe-on-fork, with length zero.
27 * On fork, child process memory should be accessible.
31 * Mark memory areas as wipe-on-fork.
32 * On fork, child process memory should be zeroed.
33 * In child, fork to create grand-child,
38 * Mark memory area as wipe-on-fork.
[all …]
/third_party/ltp/testcases/kernel/fs/doio/
Dforker.c39 * FUNCTION TITLE : fork desired number of copies of the current process
40 * fork a process and return control to caller
58 * The background function will do a fork of the current process.
62 * If the fork fails and prefix is not NULL, a error message is printed
65 * The forker function will fork <ncopies> minus one copies
70 * fork the next process, if necessary, and on and on.
86 * If the prefix parameter is not NULL and the fork system call fails,
112 #include <unistd.h> /* fork, getpid, sleep */
122 * This function will fork and the parent will exit zero and
127 * 0 : if fork did not fail
[all …]
/third_party/grpc/src/ruby/end2end/
Dfork_test.rb38 pid = fork do
40 with_logging("child1: first post-fork RPC") { do_rpc(stub) }
42 pid2 = fork do
44 with_logging("child2: first post-fork RPC") { do_rpc(stub) }
45 with_logging("child2: second post-fork RPC") { do_rpc(stub) }
49 with_logging("child1: second post-fork RPC") { do_rpc(stub) }
54 with_logging("parent: first post-fork RPC") { do_rpc(stub) }
55 with_logging("parent: second post-fork RPC") { do_rpc(stub) }
Dsecure_fork_test.rb52 pid = fork do
54 with_logging("child1: first post-fork RPC") { do_rpc(stub) }
56 pid2 = fork do
58 with_logging("child2: first post-fork RPC") { do_rpc(stub) }
59 with_logging("child2: second post-fork RPC") { do_rpc(stub) }
63 with_logging("child1: second post-fork RPC") { do_rpc(stub) }
68 with_logging("parent: first post-fork RPC") { do_rpc(stub) }
69 with_logging("parent: second post-fork RPC") { do_rpc(stub) }
74 # This is designed to test fork support around three key things:
/third_party/rust/crates/nix/test/sys/
Dtest_wait.rs14 match unsafe { fork() }.expect("Error: Fork Failed") { in test_wait_signal()
41 match unsafe { fork() }.expect("Error: Fork Failed") { in test_waitid_signal()
61 match unsafe { fork() }.expect("Error: Fork Failed") { in test_wait_exit()
84 match unsafe { fork() }.expect("Error: Fork Failed") { in test_waitid_exit()
115 match unsafe { fork() }.unwrap() { in test_waitstatus_pid()
134 match unsafe { fork() }.unwrap() { in test_waitid_pid()
240 match unsafe { fork() }.expect("Error: Fork Failed") { in test_wait_ptrace()
252 match unsafe { fork() }.expect("Error: Fork Failed") { in test_waitid_ptrace()
/third_party/mindspore/mindspore-src/source/mindspore/python/mindspore/multiprocessing/
D__init__.py17 Some methods are overrode to support fork-based multiprocess.
31 Trigger fork callbacks by overriding native multiprocessing methods.
37 Trigger child_at_fork callback function after fork by overriding
40 if mp.get_start_method() == "fork":
52 if mp.get_start_method() == "fork":
64 Trigger fork callbacks by overriding native multiprocessing methods.
67 if self._ctx.get_start_method() == "fork":
/third_party/python/Lib/test/
Dtest_fork1.py1 """This test checks for correct fork() behavior.
16 # Skip test if fork does not exist.
18 raise unittest.SkipTest("test module requires working os.fork")
23 """Check fork() in main thread works while a subthread is doing an import"""
39 pid = os.fork()
66 """Check fork() in main thread works while the main thread is doing an import"""
77 pid = os.fork()

12345678910>>...69