An oft-recommended approach to timed-waiting on a semaphore is (simplified for brevity): Assuming the semaphore is not posted-to (i.e. timeout is e ...
An oft-recommended approach to timed-waiting on a semaphore is (simplified for brevity): Assuming the semaphore is not posted-to (i.e. timeout is e ...
I have a thread responsible for polling various fds. I am using epoll_wait with timeout set. Following is the code snippet: eventsList memory conta ...
I have a program that creates a TCP server. When the accept() connects to a client, I fork() it and handle the connection. When that client leaves it ...
So I'm studying fclose manpage for quite I while and my conclusion is that if fclose is interrupted by some signal, according to the manpage there is ...
I'm reading integers from a file in this way: What does it happen if a signal arrives? How can I manage errno == EINTR? Do I have to repeat read if ...
I am working on Linux platform. I have a console based multi-threaded application which loads a multi-threaded shared object library for other functio ...
I have a C++ application that includes this function: Normally, this code work just fine, however, in one instance, I saw it get into an infinite l ...
Is there any expert out there that can help me with the following? I have the following system calls in C: I want to know if they may fail with er ...
tl;dr Should I handle EINTR "system call interrupted" errors when reading a pipe in Python, and if so, how do I test such code? Description In the ...
I have c code as such Now, when I run this code, the parent process waits, while the child process sleeps. If I now interrupt (by pressing ctrl+c) ...
My application has two threads. Each threads recevive some data from the server via each sockets. Threads wait to return epoll_wait(). Sometimes epoll ...
I am having trouble using the std::async to have tasks execute in parallel when the task involves a socket. My program is a simple TCP socket server ...
I'm programming iwth gcc version 4.4.3 on Ubuntu 10.04 I don't know how to catch SIGALRM with sigtimedwait(),sigwait(). If timer handler is set , sig ...
As is known, some blocking calls like read and write would return -1 and set errno to EINTR, and we need handle this. My question is: Does this apply ...
A lot of system calls like close( fd ) Can be interrupted by a signal. In this case usually -1 is returned and errno is set EINTR. The question is w ...
Many POSIX blocking functions return EINTR in case of a signal. The idea is that signal handler sets a flag first (say 'stop' flag in case of SIGINT), ...
I have linux board on samsung SoC s3c6410 (ARM11). I build rootfs with buildroot: Python 2.7.1, uClibc-0.9.31. Linux kernel: Linux buildroot 2.6.28.6 ...
In one of my recent projects I happened to have in the same process (a Python program, its a multithreaded application): a Boost::Python module to ...
I am programming a user application for a embedded Linux system, and I am using the common functions such as open, close, read, ioctl, etc. for the de ...
Background: This is a follow-up question to this thread about handling EINTR for system calls in C++ (Linux/GCC). Regardless of whether or not I inten ...