Home
last modified time | relevance | path

Searched refs:signal (Results 1 – 25 of 1853) sorted by relevance

12345678910>>...75

/external/python/cpython3/Lib/test/
Dtest_signal.py3 import signal
22 for name in dir(signal):
23 sig = getattr(signal, name)
25 self.assertIsInstance(sig, signal.Handlers)
27 self.assertIsInstance(sig, signal.Sigmasks)
29 self.assertIsInstance(sig, signal.Signals)
31 self.assertIsInstance(sig, signal.Signals)
41 self.assertRaises(ValueError, signal.getsignal, 4242)
43 self.assertRaises(ValueError, signal.signal, 4242,
47 self.assertRaises(TypeError, signal.signal,
[all …]
Dtest_threadsignals.py4 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 …]
Dsignalinterproctester.py2 import signal
36 signal.pause()
49 signal.signal(signal.SIGHUP, self.sighup_handler)
50 signal.signal(signal.SIGUSR1, self.sigusr1_handler)
51 signal.signal(signal.SIGUSR2, signal.SIG_IGN)
52 signal.signal(signal.SIGALRM, signal.default_int_handler)
74 signal.alarm(1)
79 signal.alarm(0)
/external/python/cpython2/Lib/test/
Dtest_signal.py7 import signal
80 signal.signal(signal.SIGHUP, self.handlerA)
81 signal.signal(signal.SIGUSR1, self.handlerB)
82 signal.signal(signal.SIGUSR2, signal.SIG_IGN)
83 signal.signal(signal.SIGALRM, signal.default_int_handler)
124 signal.alarm(1)
128 signal.pause()
142 signal.alarm(0)
186 os.kill(child, signal.SIGKILL)
200 self.assertRaises(ValueError, signal.getsignal, 4242)
[all …]
Dtest_threadsignals.py4 import signal
18 usr1 = signal.signal(signal.SIGUSR1, for_usr1)
19 usr2 = signal.signal(signal.SIGUSR2, for_usr2)
20 alrm = signal.signal(signal.SIGALRM, for_alrm)
32 os.kill(process_pid, signal.SIGUSR1)
33 os.kill(process_pid, signal.SIGUSR2)
53 if signal_blackboard[signal.SIGUSR1]['tripped'] == 0 \
54 or signal_blackboard[signal.SIGUSR2]['tripped'] == 0:
56 signal.alarm(1)
57 signal.pause()
[all …]
/external/python/cpython3/Lib/unittest/test/
Dtest_break.py5 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 …]
/external/wayland/tests/
Dsignal-test.c40 struct wl_signal signal; in TEST() local
42 wl_signal_init(&signal); in TEST()
45 assert(&signal.listener_list == signal.listener_list.next in TEST()
47 assert(signal.listener_list.next == signal.listener_list.prev in TEST()
53 struct wl_signal signal; in TEST() local
62 wl_signal_init(&signal); in TEST()
64 wl_signal_add(&signal, &l1); in TEST()
65 wl_signal_add(&signal, &l2); in TEST()
66 wl_signal_add(&signal, &l3); in TEST()
67 wl_signal_add(&signal, &l4); in TEST()
[all …]
/external/python/cpython2/Lib/unittest/test/
Dtest_break.py4 import signal
21 self._default_handler = signal.getsignal(signal.SIGINT)
23 signal.signal(signal.SIGINT, self.int_handler)
26 signal.signal(signal.SIGINT, self._default_handler)
32 default_handler = signal.getsignal(signal.SIGINT)
34 self.assertNotEqual(signal.getsignal(signal.SIGINT), default_handler)
38 os.kill(pid, signal.SIGINT)
58 default_handler = signal.getsignal(signal.SIGINT)
64 self.assertNotEqual(signal.getsignal(signal.SIGINT), default_handler)
68 os.kill(pid, signal.SIGINT)
[all …]
/external/tensorflow/tensorflow/python/ops/signal/
Dreconstruction_ops.py30 def overlap_and_add(signal, frame_step, name=None): argument
54 with ops.name_scope(name, "overlap_and_add", [signal, frame_step]):
55 signal = ops.convert_to_tensor(signal, name="signal")
56 signal.shape.with_rank_at_least(2)
63 signal_shape = array_ops.shape(signal)
82 if (frame_step_static is not None and signal.shape.dims is not None and
83 frame_step_static == signal.shape.dims[-1].value):
85 return array_ops.reshape(signal, output_shape, name="fast_path")
109 signal = array_ops.pad(signal, paddings)
119 signal = array_ops.reshape(signal, shape)
[all …]
Dsignal.py42 from tensorflow.python.ops.signal.dct_ops import dct
43 from tensorflow.python.ops.signal.dct_ops import idct
44 from tensorflow.python.ops.signal.fft_ops import fft
45 from tensorflow.python.ops.signal.fft_ops import fft2d
46 from tensorflow.python.ops.signal.fft_ops import fft3d
47 from tensorflow.python.ops.signal.fft_ops import ifft
48 from tensorflow.python.ops.signal.fft_ops import ifft2d
49 from tensorflow.python.ops.signal.fft_ops import ifft3d
50 from tensorflow.python.ops.signal.fft_ops import irfft
51 from tensorflow.python.ops.signal.fft_ops import irfft2d
[all …]
Dshape_ops.py25 from tensorflow.python.ops.signal import util_ops
29 def _infer_frame_shape(signal, frame_length, frame_step, pad_end, axis): argument
34 if signal.shape.ndims is None:
37 return [None] * (signal.shape.ndims + 1)
39 signal_shape = signal.shape.as_list()
56 def frame(signal, frame_length, frame_step, pad_end=False, pad_value=0, axis=-1, argument
97 with ops.name_scope(name, "frame", [signal, frame_length, frame_step,
99 signal = ops.convert_to_tensor(signal, name="signal")
104 signal.shape.with_rank_at_least(1)
109 result_shape = _infer_frame_shape(signal, frame_length, frame_step, pad_end,
[all …]
/external/python/cpython3/Lib/unittest/
Dsignals.py1 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)
/external/python/cpython2/Lib/unittest/
Dsignals.py1 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)
/external/flac/libFLAC/
Dmd5.c274 static void format_input_(FLAC__multibyte *mbuf, const FLAC__int32 * const signal[], unsigned chann… in format_input_() argument
291 *buf_++ = signal[0][sample]; in format_input_()
296 *buf_++ = signal[0][sample]; in format_input_()
297 *buf_++ = signal[1][sample]; in format_input_()
303 *buf_++ = signal[0][sample]; in format_input_()
304 *buf_++ = signal[1][sample]; in format_input_()
305 *buf_++ = signal[2][sample]; in format_input_()
306 *buf_++ = signal[3][sample]; in format_input_()
312 *buf_++ = signal[0][sample]; in format_input_()
313 *buf_++ = signal[1][sample]; in format_input_()
[all …]
/external/python/cpython3/Doc/library/
Dsignal.rst1 :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
21 A handler for a particular signal, once set, remains installed until it is
27 Execution of Python signal handlers
30 A Python signal handler does not get executed inside the low-level (C) signal
31 handler. Instead, the low-level signal handler sets a flag which tells the
32 :term:`virtual machine` to execute the corresponding Python signal handler
[all …]
/external/python/cpython2/Doc/library/
Dsignal.rst2 :mod:`signal` --- Set handlers for asynchronous events
5 .. module:: signal
9 This module provides mechanisms to use signal handlers in Python. Some general
12 * A handler for a particular signal, once set, remains installed until it is
20 * Although Python signal handlers are called asynchronously as far as the Python
26 * When a signal arrives during an I/O operation, it is possible that the I/O
27 operation raises an exception after the signal handler returns. This is
31 * Because the C signal handler always returns, it makes little sense to catch
34 * Python installs a small number of signal handlers by default: :const:`SIGPIPE`
41 simultaneously is: always perform :func:`signal` operations in the main thread
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/signal/
Dshape_ops_test.py27 from tensorflow.python.kernel_tests.signal import test_util
30 from tensorflow.python.ops.signal import shape_ops
93 signal = constant_op.constant([], dtype=dtypes.float32)
98 result = shape_ops.frame(signal, frame_length, frame_step,
102 result = shape_ops.frame(signal, frame_length, frame_step,
108 signal = array_ops.placeholder(dtypes.int32, shape=[1, 1])
113 result = shape_ops.frame(signal, frame_length, frame_step,
117 result = shape_ops.frame(signal, frame_length, frame_step,
123 signal = array_ops.placeholder(dtypes.int32, shape=[1, 2, 3, 4])
126 result = shape_ops.frame(signal, frame_length, frame_step,
[all …]
Dspectral_ops_test.py29 from tensorflow.python.ops.signal import spectral_ops
30 from tensorflow.python.ops.signal import window_ops
82 def _compare(self, signal, frame_length, frame_step, fft_length): argument
86 signal, frame_length, frame_step, fft_length, pad_end=False)
87 signal_ph = array_ops.placeholder(dtype=dtypes.as_dtype(signal.dtype))
96 feed_dict={signal_ph: signal})
110 signal, fft_length, frame_step, frame_length)
121 signal = np.zeros((512,)).astype(np.float32)
125 stft = spectral_ops.stft(signal, frame_length=7, frame_step=8,
130 stft = spectral_ops.stft(signal, frame_length=8, frame_step=8,
[all …]
Dreconstruction_ops_test.py30 from tensorflow.python.ops.signal import reconstruction_ops
57 signal = array_ops.ones([3, 5])
58 reconstruction = reconstruction_ops.overlap_and_add(signal, 2)
75 signal = array_ops.placeholder(dtype=dtypes.int32, shape=[None, None, None])
77 reconstruction = reconstruction_ops.overlap_and_add(signal, frame_step)
83 feed_dict={signal: np.ones([4, 3, 5]), frame_step: 2})
95 signal = array_ops.placeholder(dtype=dtypes.int32, shape=None)
97 reconstruction = reconstruction_ops.overlap_and_add(signal, frame_step)
103 feed_dict={signal: np.ones([4, 3, 5]), frame_step: 2})
115 signal = array_ops.ones([3, 5])
[all …]
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigaction/templates/
Dtemplate_28-1.in20 * 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 …]
/external/chromium-trace/catapult/devil/devil/utils/
Dsignal_handler.py6 import signal
17 existing_handler = signal.getsignal(signalnum)
20 signal.signal(signalnum, handler)
23 signal.signal(signalnum, existing_handler)
37 existing_handler = signal.getsignal(signalnum)
45 signal.signal(signalnum, handler)
48 signal.signal(signalnum, existing_handler)
/external/libbrillo/brillo/
Dasynchronous_signal_handler.cc59 void AsynchronousSignalHandler::RegisterHandler(int signal, in RegisterHandler() argument
61 registered_callbacks_[signal] = callback; in RegisterHandler()
62 CHECK_EQ(0, sigaddset(&signal_mask_, signal)); in RegisterHandler()
66 void AsynchronousSignalHandler::UnregisterHandler(int signal) { in UnregisterHandler() argument
67 Callbacks::iterator callback_it = registered_callbacks_.find(signal); in UnregisterHandler()
70 ResetSignal(signal); in UnregisterHandler()
78 int signal = info.ssi_signo; in OnFileCanReadWithoutBlocking() local
79 Callbacks::iterator callback_it = registered_callbacks_.find(signal); in OnFileCanReadWithoutBlocking()
81 LOG(WARNING) << "Unable to find a signal handler for signal: " << signal; in OnFileCanReadWithoutBlocking()
89 UnregisterHandler(signal); in OnFileCanReadWithoutBlocking()
[all …]
/external/autotest/client/bin/
Dautotestd_monitor4 import sys, os, signal, time, subprocess, fcntl
15 os.kill(os.getpid(), signal.SIGTERM)
16 signal.signal(signal.SIGCHLD, kill_self)
51 exit_code = -signal.SIGKILL # autotestd was nuked
64 signal.signal(signal.SIGCHLD, signal.SIG_DFL)
65 os.kill(stdout_pump.pid, signal.SIGTERM)
66 os.kill(stderr_pump.pid, signal.SIGTERM)
/external/v8/tools/testrunner/local/
Dpool.py10 import signal
85 int_handler = signal.signal(signal.SIGINT, signal.SIG_IGN)
86 term_handler = signal.signal(signal.SIGTERM, signal.SIG_IGN)
90 signal.signal(signal.SIGINT, int_handler)
91 signal.signal(signal.SIGTERM, term_handler)
248 os.kill(p.pid, signal.SIGTERM)
/external/tcpdump/tests/
Dieee802.11_exthdr.out1 10016360us tsft 1.0 Mb/s 2412 MHz 11b -22dBm signal -86dBm noise antenna 1 [bit 32] Probe Request (…
2 10018922us tsft 1.0 Mb/s 2412 MHz 11b -19dBm signal -86dBm noise antenna 0 [bit 32] Acknowledgment …
4 10085301us tsft 1.0 Mb/s 2412 MHz 11b -19dBm signal -86dBm noise antenna 1 [bit 32] Probe Request (…
5 10087718us tsft 1.0 Mb/s 2412 MHz 11b -18dBm signal -86dBm noise antenna 0 [bit 32] Acknowledgment …
7 10284358us tsft 1.0 Mb/s 2412 MHz 11b -61dBm signal -86dBm noise antenna 1 [bit 32] Probe Request (…
8 10288217us tsft 1.0 Mb/s 2412 MHz 11b -46dBm signal -86dBm noise antenna 0 [bit 32] Acknowledgment …
10 10351366us tsft 1.0 Mb/s 2412 MHz 11b -70dBm signal -86dBm noise antenna 1 [bit 32] Probe Request (…
11 10353769us tsft 1.0 Mb/s 2412 MHz 11b -57dBm signal -86dBm noise antenna 0 [bit 32] Acknowledgment …
13 10418368us tsft 1.0 Mb/s 2412 MHz 11b -67dBm signal -86dBm noise antenna 1 [bit 32] Probe Request (…
14 10420929us tsft 1.0 Mb/s 2412 MHz 11b -73dBm signal -86dBm noise antenna 0 [bit 32] Acknowledgment …
[all …]

12345678910>>...75