/third_party/python/Lib/test/ |
D | test_signal.py | 5 import signal 25 for name in dir(signal): 26 sig = getattr(signal, name) 28 self.assertIsInstance(sig, signal.Handlers) 30 self.assertIsInstance(sig, signal.Sigmasks) 32 self.assertIsInstance(sig, signal.Signals) 34 self.assertIsInstance(sig, signal.Signals) 40 for name in dir(signal): 41 value = getattr(signal, name) 52 self.assertRaises(ValueError, signal.getsignal, 4242) [all …]
|
D | test_threadsignals.py | 4 import signal 21 usr1 = signal.signal(signal.SIGUSR1, for_usr1) 22 usr2 = signal.signal(signal.SIGUSR2, for_usr2) 23 alrm = signal.signal(signal.SIGALRM, for_alrm) 35 os.kill(process_pid, signal.SIGUSR1) 36 os.kill(process_pid, signal.SIGUSR2) 57 if signal_blackboard[signal.SIGUSR1]['tripped'] == 0 \ 58 or signal_blackboard[signal.SIGUSR2]['tripped'] == 0: 60 signal.alarm(1) 61 signal.pause() [all …]
|
D | signalinterproctester.py | 2 import signal 37 signal.pause() 50 signal.signal(signal.SIGHUP, self.sighup_handler) 51 signal.signal(signal.SIGUSR1, self.sigusr1_handler) 52 signal.signal(signal.SIGUSR2, signal.SIG_IGN) 53 signal.signal(signal.SIGALRM, signal.default_int_handler) 75 signal.alarm(1) 80 signal.alarm(0)
|
D | _test_eintr.py | 17 import signal 39 @unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()") 56 self.orig_handler = signal.signal(signal.SIGALRM, self.sighandler) 57 signal.setitimer(signal.ITIMER_REAL, self.signal_delay, 67 signal.setitimer(signal.ITIMER_REAL, 0, 0) 71 signal.signal(signal.SIGALRM, self.orig_handler) 79 @unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()") 184 @unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()") 367 @unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()") 379 @unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()") [all …]
|
/third_party/python/Lib/unittest/test/ |
D | test_break.py | 5 import signal 17 self._default_handler = signal.getsignal(signal.SIGINT) 19 signal.signal(signal.SIGINT, self.int_handler) 22 signal.signal(signal.SIGINT, self._default_handler) 28 default_handler = signal.getsignal(signal.SIGINT) 30 self.assertNotEqual(signal.getsignal(signal.SIGINT), default_handler) 34 os.kill(pid, signal.SIGINT) 51 default_handler = signal.getsignal(signal.SIGINT) 57 self.assertNotEqual(signal.getsignal(signal.SIGINT), default_handler) 61 os.kill(pid, signal.SIGINT) [all …]
|
/third_party/node/test/parallel/ |
D | test-timers-promisified.js | 48 const signal = ac.signal; constant 49 assert.rejects(setTimeout(10, undefined, { signal }), /AbortError/); field 55 const signal = ac.signal; constant 57 assert.rejects(setTimeout(10, undefined, { signal }), /AbortError/); field 62 const signal = ac.signal; constant 63 assert.rejects(setImmediate(10, { signal }), /AbortError/); field 69 const signal = ac.signal; constant 71 assert.rejects(setImmediate(10, { signal }), /AbortError/); field 77 const signal = ac.signal; constant 78 setTimeout(10, undefined, { signal }).then(() => { field [all …]
|
D | test-events-once.js | 129 await Promise.all([1, {}, 'hi', null, false].map((signal) => { 130 return rejects(once(ee, 'foo', { signal }), { field 135 return rejects(once(ee, 'foo', { signal: ac.signal }), { property 144 const r = rejects(once(ee, 'foo', { signal: ac.signal }), { property 158 await once(ee, 'foo', { signal: ac.signal }); property 166 await Promise.all([1, {}, 'hi', null, false].map((signal) => { 167 return rejects(once(et, 'foo', { signal }), { field 172 return rejects(once(et, 'foo', { signal: ac.signal }), { property 180 const r = rejects(once(et, 'foo', { signal: ac.signal }), { property 194 await once(et, 'foo', { signal: ac.signal }); property
|
D | test-abortcontroller.js | 13 ok(ac.signal); 14 ac.signal.onabort = common.mustCall((event) => { 18 ac.signal.addEventListener('abort', common.mustCall((event) => { 24 ok(ac.signal.aborted); 30 ac.signal.addEventListener('abort', common.mustCall((event) => { 42 first.signal.addEventListener('abort', common.mustCall((event) => { 45 second.signal.addEventListener('abort', common.mustCall((event) => { 61 () => new ac.signal.constructor(), 70 strictEqual(toString(ac.signal), '[object AbortSignal]'); 74 const signal = AbortSignal.abort(); constant [all …]
|
D | test-child-process-execFile-promisified-abortController.js | 20 const signal = ac.signal; constant 21 const promise = promisified(process.execPath, [echoFixture, 0], { signal }); field 34 const { signal } = ac; 38 promisified(process.execPath, [echoFixture, 0], { signal }), field 46 const signal = {}; constant 48 promisified(process.execPath, [echoFixture, 0], { signal }); field 55 const signal = 'world!'; constant 57 promisified(process.execPath, [echoFixture, 0], { signal }); field
|
D | test-child-process-execfile.js | 36 assert.strictEqual(err.signal, null); 55 const { signal } = ac; 61 assert.strictEqual(err.signal, undefined); 63 execFile(process.execPath, [echoFixture, 0], { signal }, check); field 74 const { signal } = ac; 80 assert.strictEqual(err.signal, undefined); 82 execFile(process.execPath, [echoFixture, 0], { signal }, check); field 91 execFile(process.execPath, [echoFixture, 0], { signal: 'hello' }, callback); property 97 const { signal } = ac; 100 assert.strictEqual(getEventListeners(ac.signal).length, 0); [all …]
|
/third_party/node/test/fixtures/wpt/dom/abort/ |
D | event.any.js | 3 s = c.signal; 24 const signal = controller.signal; constant 25 assert_equals(controller.signal, signal, 28 assert_equals(controller.signal, signal, 34 const signal = controller.signal; constant 36 signal.onabort = () => { 40 assert_true(signal.aborted); 43 assert_true(signal.aborted); 51 controller.signal.onabort = 57 const signal = controller.signal; constant [all …]
|
/third_party/python/Lib/unittest/ |
D | signals.py | 1 import signal 14 if default_handler == signal.SIG_DFL: 16 default_handler = signal.default_int_handler 17 elif default_handler == signal.SIG_IGN: 29 installed_handler = signal.getsignal(signal.SIGINT) 52 default_handler = signal.getsignal(signal.SIGINT) 54 signal.signal(signal.SIGINT, _interrupt_handler) 61 initial = signal.getsignal(signal.SIGINT) 66 signal.signal(signal.SIGINT, initial) 71 signal.signal(signal.SIGINT, _interrupt_handler.original_handler)
|
/third_party/python/Doc/library/ |
D | signal.rst | 1 :mod:`signal` --- Set handlers for asynchronous events 4 .. module:: signal 9 This module provides mechanisms to use signal handlers in Python. 15 The :func:`signal.signal` function allows defining custom handlers to be 16 executed when a signal is received. A small number of default handlers are 22 A handler for a particular signal, once set, remains installed until it is 28 Execution of Python signal handlers 31 A Python signal handler does not get executed inside the low-level (C) signal 32 handler. Instead, the low-level signal handler sets a flag which tells the 33 :term:`virtual machine` to execute the corresponding Python signal handler [all …]
|
/third_party/rust/crates/signal-hook/src/low_level/ |
D | signal_details.rs | 11 use crate::consts::signal::*; 23 signal: c_int, field 31 signal: $name, 105 pub fn signal_name(signal: c_int) -> Option<&'static str> { in signal_name() 106 DETAILS.iter().find(|d| d.signal == signal).map(|d| d.name) in signal_name() 110 fn restore_default(signal: c_int) -> Result<(), Error> { in restore_default() 123 if libc::sigaction(signal, &action, ptr::null_mut()) == 0 { in restore_default() 132 fn restore_default(signal: c_int) -> Result<(), Error> { in restore_default() 135 if libc::signal(signal, 0) == 0 { in restore_default() 174 pub fn emulate_default_handler(signal: c_int) -> Result<(), Error> { in emulate_default_handler() [all …]
|
/third_party/skia/third_party/externals/swiftshader/third_party/marl/src/ |
D | conditionvariable_test.cpp | 24 bool signal[3] = {false, false, false}; in TEST_F() local 36 signal[i] = true; in TEST_F() 41 ASSERT_FALSE(signal[0]); in TEST_F() 42 ASSERT_FALSE(signal[1]); in TEST_F() 43 ASSERT_FALSE(signal[2]); in TEST_F() 52 return signal[i]; in TEST_F() 57 ASSERT_EQ(signal[0], 0 <= i); in TEST_F() 58 ASSERT_EQ(signal[1], 1 <= i); in TEST_F() 59 ASSERT_EQ(signal[2], 2 <= i); in TEST_F() 67 bool signal[3] = {false, false, false}; in TEST_P() local [all …]
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigaction/templates/ |
D | template_28-1.in | 20 * If the signal action was set with the signal() function, getting it into oact 24 * -> register a signal handler for %%MYSIG%% with signal(). 25 * -> check this signal handler works. 26 * -> change the signal handler with sigaction, saving old handler in oact. 27 * -> check the new signal handler works. 28 * -> set the old signal handler back 29 * -> check the old signal handler still works. 31 * The test fails if a signal handler does not work as expected. 40 #include <signal.h> 63 if (signal(%%MYSIG%%, handler_1) == SIG_ERR) { [all …]
|
/third_party/rust/crates/signal-hook/signal-hook-registry/src/ |
D | lib.rs | 127 signal: c_int, field 146 fn new(signal: libc::c_int) -> Result<Self, Error> { in new() 147 let old = unsafe { libc::signal(signal, handler as sighandler_t) }; in new() 152 prev: Prev { signal, info: old }, in new() 158 fn new(signal: libc::c_int) -> Result<Self, Error> { in new() 177 if unsafe { libc::sigaction(signal, &new, &mut old) } != 0 { in new() 181 prev: Prev { signal, info: old }, in new() 195 signal: c_int, field 204 fn detect(signal: c_int) -> Result<Self, Error> { in detect() 205 let old = unsafe { libc::signal(signal, SIG_GET) }; in detect() [all …]
|
/third_party/node/deps/npm/node_modules/signal-exit/ |
D | README.md | 1 # signal-exit 3 [](https://travis-ci.org/tapjs/signal-e… 4 …erage](https://coveralls.io/repos/tapjs/signal-exit/badge.svg?branch=master)](https://coveralls.io… 5 [](https://www.npmjs.com/package/signal… 6 …mg.shields.io/appveyor/ci/bcoe/signal-exit/master.svg?label=Windows%20Tests)](https://ci.appveyor.… 14 * receiving a fatal signal from outside the process 16 Use `signal-exit`. 19 var onExit = require('signal-exit') 21 onExit(function (code, signal) { 28 `var remove = onExit(function (code, signal) {}, options)` [all …]
|
D | CHANGELOG.md | 6 ## [3.0.1](https://github.com/tapjs/signal-exit/compare/v3.0.0...v3.0.1) (2016-09-08) 11 …and SIGILL ([#40](https://github.com/tapjs/signal-exit/issues/40)) ([5b105fb](https://github.com/t… 16 # [3.0.0](https://github.com/tapjs/signal-exit/compare/v2.1.2...v3.0.0) (2016-06-13) 21 …on Windows ([#23](https://github.com/tapjs/signal-exit/issues/23)) ([6f3eda8](https://github.com/t… 22 …ithub.com/tapjs/signal-exit/issues/21) ([#24](https://github.com/tapjs/signal-exit/issues/24)) ([1… 27 * signal-exit no longer wires into SIGPROF
|
/third_party/node/lib/internal/timers/ |
D | promises.js | 39 const { signal, ref = true } = options; 41 validateAbortSignal(signal, 'options.signal'); 55 if (signal && signal.aborted) { 63 if (signal) { 67 signal.addEventListener('abort', oncancel); 73 () => signal.removeEventListener('abort', oncancel)) : ret; 84 const { signal, ref = true } = options; 86 validateAbortSignal(signal, 'options.signal'); 100 if (signal && signal.aborted) { 107 if (signal) { [all …]
|
/third_party/python/Lib/multiprocessing/ |
D | resource_tracker.py | 19 import signal 29 _HAVE_SIGMASK = hasattr(signal, 'pthread_sigmask') 30 _IGNORED_SIGNALS = (signal.SIGINT, signal.SIGTERM) 128 signal.pthread_sigmask(signal.SIG_BLOCK, _IGNORED_SIGNALS) 132 signal.pthread_sigmask(signal.SIG_UNBLOCK, _IGNORED_SIGNALS) 182 signal.signal(signal.SIGINT, signal.SIG_IGN) 183 signal.signal(signal.SIGTERM, signal.SIG_IGN) 185 signal.pthread_sigmask(signal.SIG_UNBLOCK, _IGNORED_SIGNALS)
|
/third_party/rust/crates/signal-hook/src/ |
D | flag.rs | 153 pub fn register(signal: c_int, flag: Arc<AtomicBool>) -> Result<SigId, Error> { in register() 158 unsafe { low_level::register(signal, move || flag.store(true, Ordering::SeqCst)) } in register() 162 pub fn register_usize(signal: c_int, flag: Arc<AtomicUsize>, value: usize) -> Result<SigId, Error> { in register_usize() 163 unsafe { low_level::register(signal, move || flag.store(value, Ordering::SeqCst)) } in register_usize() 187 signal: c_int, in register_conditional_shutdown() 196 unsafe { low_level::register(signal, action) } in register_conditional_shutdown() 218 signal: c_int, in register_conditional_default() 222 low_level::signal_name(signal).ok_or_else(|| Error::from_raw_os_error(EINVAL))?; in register_conditional_default() 225 let _ = low_level::emulate_default_handler(signal); in register_conditional_default() 228 unsafe { low_level::register(signal, action) } in register_conditional_default() [all …]
|
/third_party/node/lib/internal/ |
D | abort_controller.js | 87 const signal = new EventTarget(); 88 ObjectSetPrototypeOf(signal, AbortSignal.prototype); 89 signal[kAborted] = aborted; 90 return signal; 93 function abortSignal(signal) { argument 94 if (signal[kAborted]) return; 95 signal[kAborted] = true; 99 signal.dispatchEvent(event); 118 get signal() { getter in AbortController 130 signal: this.signal property [all …]
|
/third_party/rust/crates/signal-hook/ |
D | Cargo.toml | 2 name = "signal-hook" 8 description = "Unix signal handling" 9 documentation = "https://docs.rs/signal-hook" 10 repository = "https://github.com/vorner/signal-hook" 12 keywords = ["signal", "unix", "daemon"] 30 "signal-hook-registry", 31 "signal-hook-tokio", 32 "signal-hook-mio", 33 "signal-hook-async-std", 38 signal-hook-registry = { version = "^1.4", path = "signal-hook-registry" }
|
/third_party/ffmpeg/tests/ |
D | audiomatch.c | 44 int16_t *signal, *data; in main() local 82 signal = malloc(siglen * sizeof(*signal)); in main() 86 if (fread(signal, 1, siglen, f[1]) != siglen) in main() 92 signal[i] = ((uint8_t*)(signal + i))[0] + 256*((uint8_t*)(signal + i))[1]; in main() 93 sigamp += signal[i] * signal[i]; in main() 103 c += signal[i] * data[j]; in main() 115 free(signal); in main() 120 free(signal); in main()
|