signals

Custom signal from widget to widget

北城余情 提交于 2020-01-02 07:26:33
问题 try to send signal from one gtk.EventBox child to another. on init HeadMode (line 75) got error: TypeError : unknown signal name: message-send why? #!/usr/bin/env python # -*- coding: utf8 -*- import pygtk pygtk.require('2.0') import gtk import gobject def Destroy(widget): gtk.main_quit() class CustomEventBox(gtk.EventBox): def __init__(self): super(CustomEventBox, self).__init__() self.press_hid = self.connect("button_press_event", self.on_press) self.release_hid = self.connect("button

Is it possible to send a signal to process that belongs to different user?

寵の児 提交于 2020-01-02 07:07:38
问题 I need to send a signal to different process for some real-time communication, however the process belongs to different user. For example PID user group 1234 foo foobar 4321 bar foobar I want process 1234 and 4321 to be able to send signals to each other? If I was using sockets or pipes I could set their mask to rw-rw-r-- and communication would work. However I need to do the communication using signals (ordinary or real time, not important). Is there a way to do it? 回答1: Quote from kill(2):

C++: Is using segvcatch safe?

自作多情 提交于 2020-01-02 04:29:47
问题 I just stumbled upon the segvcatch library which promises to wrap segfaults and floating point errors into appropriate exceptions. Is using this library safe, if I add the precondition that all segfaults caught will only be null pointer accesses (i.e., no array overflows or invalid pointers which could have screwed up the memory completely before segfaulting, resulting in undefined behaviour anyway)? Will the program still have defined semantics after catching a nullptr segfault? What about

Inter-thread communication. How to send a signal to another thread

和自甴很熟 提交于 2020-01-02 03:20:48
问题 In my application I have two threads a "main thread" which is busy most of the time an "additional thread" which sends out some HTTP request and which blocks until it gets a response. However, the HTTP response can only be handled by the main thread, since it relies on it's thread-local-storage and on non-threadsafe functions. I'm looking for a way to tell the main thread when a HTTP response was received and the corresponding data. The main thread should be interrupted by the additional

Multithreaded C program; how to kill processes spawned by threads?

烂漫一生 提交于 2020-01-01 11:52:27
问题 Situation: I am writing a program in C that maintains a number of threads. Once a thread ends, a new one is created. Each thread forks - the child runs a process via exec() and the parent waits for it to finish. In addition, there is a signal handler thread that waits for signals. If SIGINT is detected then it tells the main thread to stop creating threads so eventually all the threads end and the program can exit. Signals are blocked in all threads except of course the signal handler thread.

Signal handling in OpenMP parallel program

折月煮酒 提交于 2020-01-01 09:14:12
问题 I have a program which uses POSIX timer ( timer_create() ). Essentially the program sets a timer and starts performing some lengthy (potentially infinite) computation. When the timer expires and a signal handler is called, the handler prints the best result yet that has been computed and quits the program. I consider doing the computation in parallel using OpenMP, because it should speed it up. In pthreads, there are special functions for example for setting signal masks for my threads or so.

Why can't I catch SIGINT when asyncio event loop is running?

守給你的承諾、 提交于 2020-01-01 08:22:11
问题 Using Python 3.4.1 on Windows, I've found that while executing an asyncio event loop, my program can't be interrupted (i.e. by pressing Ctrl+C in the terminal). More to the point, the SIGINT signal is ignored. Conversely, I've determined that SIGINT is handled when not in an event loop. Why is it that SIGINT is ignored when executing an asyncio event loop? The below program should demonstrate the problem - run it in the terminal and try to stop it by pressing Ctrl+C, it should keep running:

Application crash libc: Fatal signal 11 (SIGSEGV), code 1

非 Y 不嫁゛ 提交于 2020-01-01 06:40:07
问题 I have next fatal error: A/libc(30888): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8 in tid 30897 (FinalizerDaemon) I have no ideas what went wrong. Perhaps this is due to RxJava , GsmTaskorService or Greendao 3 . My stacktrace below: 05-20 22:30:03.138: W/CursorWindow(30888): Window is full: requested allocation 72 bytes, free space 43 bytes, window size 2097152 bytes 05-20 22:30:03.170: W/art(30888): Suspending all threads took: 16.742ms 05-20 22:30:03.188: D/greenDAO(30888): Window vs

ORA-24550: signal received: [si_signo=6] error

陌路散爱 提交于 2020-01-01 05:53:05
问题 I want to know what ORA-24550: signal received: [si_signo=6] means? I know this is an oracle error and may an oracle latest patch can solve the issue. When this error is triggered, like the scenario where this signal has to be handled or whether this error occur when my application has to handle something related to oracle and the application failed to do that. 回答1: This is a sign that your Oracle client has received a signal it wasn't expecting. The Oracle docs say: ORA-24550: unhandled

Android: Manipulating voice in phone calls

别说谁变了你拦得住时间么 提交于 2020-01-01 05:46:08
问题 I'm currently searching for options on how to manipulate audio on android. The goal is to process audio from the microphone in real time during a phone call. The best solution would be to do this on a native call. But rebuilding a telephone app (no VOIP) would be fine too. Are there any ways to achieve this with Android APIs (also undocumented)? If not, which steps would be necessary to get things running? On iOS there are some apps which manipulate voice but create a VOIP connection. I heard