By interpreting the 1st argument as an address and reading the value on this
address, I get a 0 for the first three lines of my output (which are the futex
calls).
Very nice how you use awk and the created header file in the middle of your
code. I tried it. It works ;-)
A few answers ago, you
You are right. I dont need to restore the signal handler - one system call less
in my signal handler.
I now saved a snapshot of the unfinished futex call. So I can experiment as
often as I want.
Poking a 1 does not work. But Poking a 0 works perfektly fine.
And youre also right : I cannot use
Thanks for your quick answers!
After poking a zero, I performed a little loop to get the system call number
(orig_eax) and the next two arguments (ebx, ecx) of the next 20 system calls.
This is how it looks:
syscall=240 (1st_arg=-1210085564 2nd_arg=0)
syscall=240 (1st_arg=-1210085564 2nd_arg=1)
Hi Rogers,
Thanks for your interesting C-code!
Occasionally I am experiencing the same problem.
The program freezes due to a FUTEX_WAIT call (detected by the use of strace),
directly after the arrival of SIGCHLD.
After reading some documents on futexes I believe to know, that the reason for
the
Basically my program looks like this:
static volatile sig_atomic_t child_terminated=0;
void sigchld_handler(int sig) {
int copy_errno=errno;
debug(Received SIGCHLD);
child_terminated=1;
signal(SIGCHLD,sigchld_handler);
errno=copy_errno;
}
int main() {
By the way: The last system call before SIGCHLD arrives is connect.
This call is also part of the debug procedure. But strace does not mark
this call as unfinished. Normally connect is followed by a send.
--
Futex hang when exiting using the window close button