| /external/strace/ |
| D | README-linux-ptrace | 13 process (tracer). Attachment and subsequent commands are per-thread: in 14 multi-threaded process, every thread can be individually attached to a 17 (possibly multi-threaded) process". Ptrace commands are always sent to 28 ptrace commands from the tracer is called ptrace-stop. Ptrace-stops can 29 be further subdivided into signal-delivery-stop, group-stop, 30 syscall-stop and so on. They are described in detail later. 35 When a (possibly multi-threaded) process receives a killing signal (a 36 signal set to SIG_DFL and whose default action is to kill the process), 37 all threads exit. Tracees report their death to the tracer(s). This is 38 not a ptrace-stop (because tracer can't query tracee status such as [all …]
|
| /external/python/cpython3/Modules/clinic/ |
| D | signalmodule.c.h | 7 "--\n" 28 goto exit; in signal_default_int_handler() 31 if (signalnum == -1 && PyErr_Occurred()) { in signal_default_int_handler() 32 goto exit; in signal_default_int_handler() 37 exit: in signal_default_int_handler() 45 "--\n" 63 if (seconds == -1 && PyErr_Occurred()) { in signal_alarm() 64 goto exit; in signal_alarm() 67 if ((_return_value == -1) && PyErr_Occurred()) { in signal_alarm() 68 goto exit; in signal_alarm() [all …]
|
| /external/bcc/tools/ |
| D | exitsnoop_example.txt | 4 - is implemented using BPF, which requires CAP_SYS_ADMIN and 6 - traces sched_process_exit tracepoint in kernel/exit.c 7 - includes processes by root and all users 8 - includes processes in containers 9 - includes processes that become zombie 12 when run in a loop that is interrupted with Ctrl-C from the terminal: 16 # for((i=65;i<100;i+=5)); do bash -c "sleep 1.$i;exit $i"; done 29 sleep 19014 19013 19014 0.23 signal 2 (INT) 30 bash 19013 17656 19013 0.23 signal 2 (INT) 37 the process exit (EXIT_CODE). [all …]
|
| /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedwrlock/ |
| D | 6-2.c | 8 * If a signal that causes a signal handler to be executed is delivered to 9 * a thread blocked on a read-write lock via a call to pthread_rwlock_timedwrlock(), 10 * upon return from the signal handler the thread shall resume waiting for the lock 14 * 1. main thread create read-write lock 'rwlock', and lock it for writing 22 * 6. While sig_thread sleeping in signal handler, main thread unlock 'rwlock' 30 #include <signal.h> 40 3: just before child thread exit; 66 printf("sig_handler: signal is handled by thread\n"); in sig_handler() 74 printf("sig_handler: signal is not handled by thread\n"); in sig_handler() 75 exit(PTS_UNRESOLVED); in sig_handler() [all …]
|
| D | 6-1.c | 8 * If a signal that causes a signal handler to be executed is delivered to 9 * a thread blocked on a read-write lock via a call to pthread_rwlock_timedwrlock(), 10 * upon return from the signal handler the thread shall resume waiting for the lock 13 * Test that after returning from a signal handler, the reader will continue 15 * time spent in signal handler is longer than the specified 'timeout'). 20 * 3. sig_thread timed write-lock 'rwlock' for writing, it should block 32 #include <signal.h> 49 3: just before child thread exit; 58 /* Signal handler called by the thread when SIGUSR1 is received */ 63 printf("sig_handler: signal is handled by sig_thread\n"); in sig_handler() [all …]
|
| /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_timedrdlock/ |
| D | 6-2.c | 8 * If a signal that causes a signal handler to be executed is delivered to 9 * a thread blocked on a read-write lock via a call to pthread_rwlock_timedrdlock(), 10 * upon return from the signal handler the thread shall resume waiting for the lock 14 * 1. main thread create read-write lock 'rwlock', and lock it for writing 22 * 6. While sig_thread sleeping in signal handler, main thread unlock 'rwlock' 30 #include <signal.h> 40 3: just before child thread exit; 66 printf("sig_handler: signal is handled by thread\n"); in sig_handler() 74 printf("sig_handler: signal is not handled by thread\n"); in sig_handler() 75 exit(PTS_UNRESOLVED); in sig_handler() [all …]
|
| D | 6-1.c | 8 * If a signal that causes a signal handler to be executed is delivered to 9 * a thread blocked on a read-write lock via a call to pthread_rwlock_timedrdlock(), 10 * upon return from the signal handler the thread shall resume waiting for the lock 13 * Test that after returning from a signal handler, the reader will continue 15 * time spent in signal handler is longer than the specified 'timeout'). 20 * 3. sig_thread timed read-lock 'rwlock' for reading, it should block 32 #include <signal.h> 49 3: just before child thread exit; 58 /* Signal handler called by the thread when SIGUSR1 is received */ 63 printf("sig_handler: signal is handled by sig_thread\n"); in sig_handler() [all …]
|
| /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_wrlock/ |
| D | 2-1.c | 8 * If a signal is delivered to a thread waiting for a read-write lock for writing, upon 9 * return from the signal handler the thread resumes waiting for the read-write lock for 13 * 1. main thread create read-write lock 'rwlock', and lock it for writing 25 #include <signal.h> 36 3: just before child thread exit; 49 printf("sig_handler: handled signal SIGUSR1\n"); in sig_handler() 52 printf("signal was not handled by sig_thread\n"); in sig_handler() 53 exit(PTS_UNRESOLVED); in sig_handler() 62 /* Set up signal handler for SIGUSR1 */ in th_fn() 65 /* block all the signal while handling SIGUSR1 */ in th_fn() [all …]
|
| /external/ltp/testcases/kernel/syscalls/sigrelse/ |
| D | sigrelse01.c | 21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 35 * OS Test - Silicon Graphics, Inc. Eagan, Minnesota 44 * CO-PILOT : Dave Baumgartner 63 * send alarm signal to speed up timeout 64 * wait for child to terminate and check exit value 66 * if exit value is EXIT_OK 67 * get message from pipe (contains array of signal counters) 68 * loop through array of signal counters and record any 72 * else if exit is SIG_CAUGHT then BROK (signal caught 74 * else if exit is WRITE_BROK then BROK (write() to pipe failed) [all …]
|
| /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigpending/ |
| D | 1-3.c | 3 * Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com 10 * in the main function and in the signal handler. 12 * 2) Block three signals from delivery to a signal handler. 13 * 3) Raise the signal to get into that signal handler. 14 * From the signal handler: 15 * 4) Raise one blocked signal in the signal handler. 16 * 5) Raise one blocked signal in the main process. 23 * Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com 28 * Signal handler uses exit() to leave so that the signals are not executed. 31 #include <signal.h> [all …]
|
| D | 1-2.c | 3 * Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com 9 * are blocked from delivery to a signal handler function. Steps are: 10 * 1) Block three signals from delivery to a signal handler. 11 * 2) Raise the signal to get into that signal handler. 12 * From the signal handler: 15 * 5) Verify the one signal not raised is not shown. 20 * Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com 27 * It uses exit() to leave so that the signals are not executed. 30 #include <signal.h> 39 if (sigemptyset(&pendingset) == -1) { in handler() [all …]
|
| /external/linux-kselftest/tools/testing/selftests/powerpc/tm/ |
| D | tm-signal-pagefault.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * This test starts a transaction and triggers a signal, forcing a pagefault to 6 * happen when the kernel signal handling code touches the user signal stack. 8 * In order to avoid pre-faulting the signal stack memory and to force the 9 * pagefault to happen precisely in the kernel signal handling code, the 12 * Further pagefaults are triggered by crafting the signal handler's ucontext 14 * the same mechanism used to avoid pre-faulting the signal stack memory. 31 #include <signal.h> 44 * Data that will be copied into the faulting pages (instead of zero-filled 46 * when we return from the signal handler. Since we are making the signal [all …]
|
| D | tm-signal-context-force-tm.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * This test raises a SIGUSR1 signal, and toggle the MSR[TS] 6 * fields at the signal handler. With MSR[TS] being set, the kernel will 8 * user space. Since the test needs to re-run, the segfault needs to be 12 * saved prior to the signal being raised, and it is restored when there is 22 #include <signal.h> 47 /* count is changed in the signal handler, so it must be volatile */ 56 * Allocating memory in a signal handler, and never freeing it on in usr_signal_handler() 60 ucp->uc_link = mmap(NULL, sizeof(ucontext_t), in usr_signal_handler() 63 if (ucp->uc_link == (void *)-1) { in usr_signal_handler() [all …]
|
| /external/rust/crates/tokio/src/process/unix/ |
| D | reap.rs | 3 use crate::signal::unix::InternalStream; 23 signal: S, field 33 fn deref(&self) -> &Self::Target { in deref() 43 pub(crate) fn new(inner: W, orphan_queue: Q, signal: S) -> Self { in new() 47 signal, in new() 51 fn inner(&self) -> &W { in inner() 55 pub(crate) fn inner_mut(&mut self) -> &mut W { in inner_mut() 68 fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> { in poll() 72 // make progress. We can use the delivery of a SIGCHLD signal as a in poll() 75 // However, we will register for a notification on the next signal in poll() [all …]
|
| /external/tensorflow/tensorflow/python/distribute/failure_handling/ |
| D | failure_handling.py | 7 # http://www.apache.org/licenses/LICENSE-2.0 20 termination (preemption or maintenance) of workers in multi-worker synchronous 25 import signal 47 # one that receives a preemption signal) sets _received_own_sigterm, 56 """Returns a directory for non-chief worker to save checkpoint.""" 77 platforms. Thus `PreemptionCheckpointHandler` may take a user-defined 81 `False` otherwise. The function should be lightweight and non-blocking so that 82 resources can be cleaned up properly if no termination signal is ever raised 85 * How to exit the program 88 `PreemptionCheckpointHandler` executes after saving the checkpoint to exit the [all …]
|
| /external/libwebsockets/lib/misc/ |
| D | daemonize.c | 4 * http://www-theorie.physik.unizh.ch/~dpotter/howto/daemonize 6 * I contacted him 2007-04-16 about the license for the original code, 11 * Copyright (c)2006 - 2013 Andy Green <andy@warmcat.com> 21 #include <signal.h> 30 #include "private-lib-core.h" 49 exit(0); in child_handler() 55 exit(0); in child_handler() 64 exit(0); in child_handler() 75 exit(0); in child_handler() 79 exit(0); in child_handler() [all …]
|
| /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/ |
| D | 4-1.c | 8 * If a signal is delivered to a thread waiting for a read-write lock for reading, upon 9 * return from the signal handler the thread resumes waiting for the read-write lock for 13 * 1. main thread create read-write lock 'rwlock', and lock it for writing 25 #include <signal.h> 39 3: just before child thread exit; 49 printf("sig_handler: handled signal SIGUSR1\n"); in sig_handler() 52 printf("signal is not handled by sig_thread\n"); in sig_handler() 53 exit(PTS_UNRESOLVED); in sig_handler() 75 exit(PTS_FAIL); in th_fn() 82 exit(PTS_UNRESOLVED); in th_fn() [all …]
|
| /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/raise/ |
| D | 1-2.c | 3 * Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com 8 * Test that the raise(<signal>) function shall send the signal 11 * 1) Set up a signal handler for a signal in the parent process. 15 * 3) Set up a signal handler for the same signal as in the parent process. 17 * 4) Raise the signal. 18 * 5) If signal handler was called, return 1 (so WEXITSTATUS can test 21 * This test is only performed on one signal. All other signals are 25 #include <signal.h> 37 printf("Caught signal from parent!\n"); in parenthandler() 38 exit(-1); in parenthandler() [all …]
|
| /external/ltp/testcases/kernel/syscalls/kill/ |
| D | kill02.c | 21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 36 OS Test - Silicon Graphics, Inc. 38 TEST IDENTIFIER : kill02 Sending a signal to processes with the same process group ID. 44 CO-PILOT : Barrie Kletscher 50 1. Sending a signal to pid of zero sends to all processes whose process 53 2. Sending a signal to pid of zero does not send to processes in another process group. 58 kiltcs02 1 PASS The signal was sent to all processes in the process group. 59 kiltcs02 2 PASS The signal was not sent to selective processes that were not in the process group. 62 kiltcs02 1 FAIL The signal was not sent to all processes in the process group. 63 kiltcs02 2 FAIL The signal was sent to a process that was not in the process group. [all …]
|
| /external/ltp/testcases/kernel/syscalls/vfork/ |
| D | vfork02.c | 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 28 * The signal which is pending in the parent should not be pending in the 33 * Setup signal handling. 39 * Check return code, if system call failed (return=-1) 44 * Issue Functionality-Pass message. 46 * Issue Functionality-Fail message. 50 * Usage: <for command-line> 51 * vfork02 [-c n] [-e] [-f] [-i n] [-I x] [-p x] [-t] 52 * where, -c n : Run n copies concurrently. 53 * -e : Turn on errno logging. [all …]
|
| /external/rust/crates/rustix/src/process/ |
| D | exit.rs | 3 /// `EXIT_SUCCESS` for use with [`exit`]. 5 /// [`exit`]: std::process::exit 8 /// - [POSIX] 9 /// - [Linux] 12 /// [Linux]: https://man7.org/linux/man-pages/man3/exit.3.html 15 /// `EXIT_FAILURE` for use with [`exit`]. 17 /// [`exit`]: std::process::exit 20 /// - [POSIX] 21 /// - [Linux] 24 /// [Linux]: https://man7.org/linux/man-pages/man3/exit.3.html [all …]
|
| /external/linux-kselftest/tools/testing/selftests/ptrace/ |
| D | get_syscall_info.c | 1 // SPDX-License-Identifier: GPL-2.0+ 12 #include <signal.h> 46 /* a sequence of architecture-agnostic syscalls */ in TEST() 106 { 1, -ENOENT }, /* chdir */ in TEST() 118 (void *) &info.entry - (void *) &info; in TEST() 120 (void *) &info.entry.args[6] - (void *) &info; in TEST() 122 (void *) (&info.exit.is_error + 1) - in TEST() 138 LOG_KILL_TRACEE("unexpected signal %u", in TEST() 149 LOG_KILL_TRACEE("unexpected signal stop"); in TEST() 161 LOG_KILL_TRACEE("signal stop mismatch"); in TEST() [all …]
|
| /external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigsuspend/ |
| D | 1-1.c | 3 * Created by: salwan.searty REMOVE-THIS AT intel DOT com 13 1. sigsuspend() replaces the original signal mask (containing SIGUSR1) 14 with the new signal mask (containing SIGUSR2.) This can be accomplished 16 child a SIGUSR2 signal. The signal should remain pending while as long 17 as the child is suspended. How do we verify that a signal is pending? 20 the child is suspended, we have to somehow verify that the signal is 22 parent send the child another signal, one that will cause the child to 26 did successfully temporarily replace the original signal mask with one 35 Because the child did receive the signal that the parent later sent before 41 #include <signal.h> [all …]
|
| /external/autotest/client/bin/ |
| D | autotestd_monitor | 7 import sys, os, signal, time, subprocess, fcntl 18 # TODO (crosbug.com/38224)- sbasi: Remove extra logging. 25 os.kill(os.getpid(), signal.SIGTERM) 26 signal.signal(signal.SIGCHLD, kill_self) 33 argv = ['tail', '--retry', '--follow=name', '--bytes=+%d' % start, path] 34 # stdout=sys.stdout fails on pre-2.5 python (bug in subprocess module) 48 if time.time() - start_time >= 30: 54 # watch the exit code file for an exit 62 exit_code = -signal.SIGKILL # autotestd was nuked 77 signal.signal(signal.SIGCHLD, signal.SIG_DFL) [all …]
|
| /external/linux-kselftest/tools/testing/selftests/net/mptcp/ |
| D | pm_netlink.sh | 2 # SPDX-License-Identifier: GPL-2.0 8 echo "Usage: $0 [ -h ]" 16 exit 0 20 exit 1 26 rndh=$(printf %x $sec)-$(mktemp -u XXXXXX) 27 ns1="ns1-$rndh" 33 rm -f $err 37 ip -Version > /dev/null 2>&1 38 if [ $? -ne 0 ];then 40 exit $ksft_skip [all …]
|