signals

How to disable ctrl-z, ctrl-c from breaking out of a php script

Can someone point me in the correct direction for researching how to prevent users from breaking out of a php script with ctrl-z, ctrl-c? ...

Qt QNetworkAccessManager does not emit signals

The function CheckSite() is called with an url like http://site.com, it initializes a QNetworkAccessManager object and connect() slots and signals. The manger->get() call seems work (it generates http traffic) but does not call the slot replyFinished() at the request end. What's wrong with this code? #include <QtCore> #include <QtNe...

How to Track Emitted Signals in QT?

Is there any way to observe all signals which are emitted? PS. Of course we can write slots for all signals, but that is not I want. Thanks. ...

Dynamic, reflective SignalHandler in Java

How do I install signal handling logic iff sun.misc.Signal is available? Background First generation of my code, which assumed signal handling availability, looked something like this: class MyApp { public static void main(String[] args) { ... Signal.handle(term_sig, new SignalHandler() { public void han...

Pausing a process?

Is there a way to pause a process (running from an executable) so that it stops the cpu load while it's paused, and waits till it's unpaused to go on with its work? Possibly in python, or in some way accessible by python. ...

C++ Win/Linux thread syncronization Event

Hello I have some code that is cross-platform by unsing #ifdef OS, I have a Queue protected by a CriticalSection on Windows, and by a pthread_mutex_t on Linux. I would like to implement a Wait(timeout) call that would block a thread until something has been enqueued. I though about using WaitForSingleObject on windows but it don't seem...

How to "signal" interested child processes (without signals)?

I'm trying to find a good and simple method to signal child processes (created through SocketServer with ForkingMixIn) from the parent process. While Unix signals could be used, I want to avoid them since only children who are interested should receive the signal, and it would be overkill and complicated to require some kind of registra...

shmat() sending signal 11

Please let me know when a call to shmat function can raise a signal 11. if ((shmId=shmget(shmKey, 0, 0)) <= 0) { printf( "shmget(0x%x)", shmKey); return 0; } printf( "queueOpen - Key 0x%x gives ID %d", shmKey, shmId); qh = shmat(shmId, 0, SHM_RND); I am getting a signal 11 by the code above. Please help ...

Tracing UNIX signal origins?

If I have a process that receives signals from other processes, is there a way for me to somehow tell which process (if any) sent a signal? strace lets me trace which signals a process has received, but doesn't allow me to trace who issued them. ...

How can I retrieve the signal strength of nearby wireless LAN networks on Windows using Python?

How can I retrieve the signal strength of nearby wireless LAN networks on Windows using Python? I would like to either show or graph the values. ...

Using sigprocmask to implement locks

I'm implementing user threads in Linux kernel 2.4, and I'm using ualarm to invoke context switches between the threads. We have a requirement that our thread library's functions should be uninterruptable by the context switching mechanism for threads, so I looked into blocking signals and learned that using sigprocmask is the standard ...

How to properly handle signals when using the worker thread pattern?

I have a simple server that looks something like this: void *run_thread(void *arg) { // Communicate via a blocking socket } int main() { // Initialization happens here... // Main event loop while (1) { new_client = accept(socket, ...); pthread_create(&thread, NULL, &run_thread, *thread_data*); p...

In a CPU all the memory Signals and DATA go through the memoryController, right?

for example: When the MEM CTRLER wants a instruction register to be populated with the DATA which the next ADDR REGISTER points to. Does it send a signal to the ADDR REGISTER to place the next ADDR on the ADDR bus or does the ADDR go to the MEM CTRLER and is placed on the BUS by the MEM CTRLER? ...

Why my linux signal handler run only once

#include <iostream> #include <signal.h> #include <fenv.h> #include <string.h> void signal_handler(int sig, siginfo_t *siginfo, void* context) { std::cout << " signal_handler " << fetestexcept(FE_ALL_EXCEPT) << std::endl; throw "exception"; } void divide() { float a = 1000., b = 0., c, f = 1e-300; c = a / b; std::cout << ...

Connecting click signal to QGraphicsView

Hi, how can I connect a clicked() signal to a widget which doesn't seem to handle it (like QGraphicsView). If I try to rely on autoconnect, I get only: QMetaObject::connectSlotsByName: No matching signal for on_xxx_clicked() What's the solution for situations like that? Thanks ...

sigwait in Linux (Fedora 13) vs OS X

So I'm trying to create a signal handler using pthreads which works on both OS X and Linux. The code below works on OS X but doesn't work on Fedora 13. The application is fairly simple. It spawns a pthread, registers SIGHUP and waits for a signal. After spawning the signal handler I block SIGHUP in the main thread so the signal should o...

PyQt4.QtCore.pyqtSignal object has no attribute 'connect'

I'm having issues with a custom signal in a class I made. Relevant code: self.parse_triggered = QtCore.pyqtSignal() def parseFile(self): self.emit(self.parse_triggered) Both of those belong to the class: RefreshWidget. In its parent class I have: self.refreshWidget.parse_triggered.connect(self.tabWidget.giveTabsData()) When I...

Problem with signals and slots

Using Qt Creator, I am creating a class with custom slots in Qt: class CustomEdit : public QTextEdit { Q_OBJECT public: CustomEdit(QWidget* parent); public slots: void onTextChanged (); }; However, I'm getting thise linker error: undefined reference to 'vtable for CustomEdit' The documentation says: if you get ...

Catching / blocking SIGINT during system call

I've written a web crawler that I'd like to be able to stop via the keyboard. I don't want the program to die when I interrupt it; it needs to flush its data to disk first. I also don't want to catch KeyboardInterruptedException, because the persistent data could be in an inconsistent state. My current solution is to define a signal h...

Boost signals and passing class method

Hello, I've defined some signal: typedef boost::signals2::signal<void (int temp)> SomeSig; typedef SomeSig::slot_type SomeSigType; I have some class: class SomeClass { SomeClass() { SomeSig.connect(&SomeClass::doMethod); } void doMethod(const SomeSig &slot); }; And got a lot of errors: error: ‘BOOST_PP_ENUM_SHIFTE...