signals

QML: Using cpp signal in QML always results in “Cannot assign to non-existent property”

走远了吗. 提交于 2019-12-22 06:48:12
问题 I just want to connect a cpp signal to a qml slot and tried different ways, but it always results in the same QML-Error at runtime: Cannot assign to non-existent property "onProcessed" ! Why? This is my Cpp Object: #include <QObject> class ImageProcessor : public QObject { Q_OBJECT public: explicit ImageProcessor(QObject *parent = 0); signals: void Processed(const QString str); public slots: void processImage(const QString& image); }; ImageProcessor::ImageProcessor(QObject *parent) : QObject

Send ctrl-break to java process on 64-bit Windows ala sendsignal on 32-bit

≡放荡痞女 提交于 2019-12-22 06:36:50
问题 I frequently use the sendsignal tool for WebSphere Application Server processes (server, launchClient, wsadmin, etc.) in order to generate heap dumps. However, sendsignal doesn't work on 64-bit machines. Does anyone know of an alternative for sending the ctrl-break to a remote process? Update: Bengt points out that this is basically the same as the following question. So, I guess my question is: has anyone found a way around this limitation in the past two years? Can I send a ctrl-C (SIGINT)

Determine if a function is async-signal-safe (can be called inside a signal handler)

风格不统一 提交于 2019-12-22 06:30:07
问题 My questions are: Is there a way to conclusively determine if a function is async-signal-safe if you don't have access to its implementation? If not, is there a way to test if function would be async-signal-safe enough to call from a signal handler? If you reads the man pages of signal() or sigaction(), you get a list of async-signal-safe functions (functions that can be safely called inside a signal handler). However, I believe that this list is not exhaustive. For example, the following

Enter-Notify-Event Signal not working on gtk.ToolButton

半腔热情 提交于 2019-12-22 06:01:10
问题 On a happy (if not irrevelent) note, this is the absolute last obstacle in this particular project. If I fix this, I have my first significant dot release (1.0), and the project will be going public. Thanks to everyone here on SO for helping me through this project, and my other two (the answers help across the board, as they should). Now, to the actual question... I have a toolbar in my application (Python 2.7, PyGTK) which has a number of gtk.ToolButton objects on it. These function just

Which functions are interrupted by signals even with SA_RESTART?

帅比萌擦擦* 提交于 2019-12-22 05:04:45
问题 Is there any reasonably complete list of which functions in POSIX are interrupted with EINTR when a signal is received or handled, even if there is no signal handler or if the handler was installed with SA_RESTART ? Some examples: select nanosleep etc. 回答1: tcsetattr is also not restartable, at least in Linux 2.6.18 回答2: POSIX says: If the signal-catching function executes a return statement, the behavior of the interrupted function shall be as described individually for that function, except

Which functions are interrupted by signals even with SA_RESTART?

流过昼夜 提交于 2019-12-22 05:04:14
问题 Is there any reasonably complete list of which functions in POSIX are interrupted with EINTR when a signal is received or handled, even if there is no signal handler or if the handler was installed with SA_RESTART ? Some examples: select nanosleep etc. 回答1: tcsetattr is also not restartable, at least in Linux 2.6.18 回答2: POSIX says: If the signal-catching function executes a return statement, the behavior of the interrupted function shall be as described individually for that function, except

Why is signal.SIGALRM not working in Python on windows?

心已入冬 提交于 2019-12-22 04:55:16
问题 I'm trying to understand OS concepts and Python libraries. I came across a specific example mentioned in Python documentation https://docs.python.org/3/library/signal.html link which is not working for me on Windows. import signal, os def handler(signum, frame): print('Signal handler called with signal', signum) raise OSError("Couldn't open device!") # Set the signal handler and a 5-second alarm signal.signal(signal.SIGALRM, handler) signal.alarm(5) # This open() may hang indefinitely fd = os

Ignoring Bash pipefail for error code 141

邮差的信 提交于 2019-12-22 03:59:28
问题 Setting the bash pipefail option (via set -o pipefail ) allows the script to fail if a non-zero error is caught where there is a non-zero error in any step of a pipe. However, we are running into SIGPIPE errors (error code 141), where data is written to a pipe that no longer exists. Is there a way to set bash to ignore SIGPIPE errors, or is there an approach to writing an error handler that will handle all error status codes but, say, 0 and 141? For instance, in Python, we can add: signal

How to reliably unlink() a Unix domain socket in Go programming language

被刻印的时光 ゝ 提交于 2019-12-22 03:48:51
问题 I have a Go program hosting a simple HTTP service on localhost:8080 so I can connect my public nginx host to it via the proxy_pass directive, as a reverse proxy to serve part of my site's requests. This is all working great, no problems there. I want to convert the Go program to host the HTTP service on a Unix domain socket instead of a local TCP socket for improved security and to reduce the unnecessary protocol overhead of TCP. PROBLEM : The problem is that Unix domain sockets cannot be

I want to receive data CONTINUOUSLY from a COM port & simultaneously want to write to file

痞子三分冷 提交于 2019-12-22 01:05:44
问题 I want to read serial COM port and to write the data to a file in LINUX. Actually I'm sending data from hyperterminal from other PC. The problem is without while loop I can write only one line. But with while(1) loop I can't write anything to file. Or else I have to send BIG file, then application exits/terminates and writes to the file. My application should write the data (it may 2 lines or any thing); after that it has to wait for next data. So please help me out..... Here is my Code =====