Package: strace
Version: 4.5.12-1
Severity: normal
Hello Roland,
strace hangs on wait4:
[EMAIL PROTECTED]:~$ strace -f ./a.out
...
fork(Process 749 attached
) = 749
[pid 748] fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
[pid 748] old_mmap(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40016000
[pid 748] write(1, "parent\n", 7parent
) = 7
[pid 748] wait4(749, Process 748 suspended
child
<hangs>
[EMAIL PROTECTED]:~$ ps ax |grep a.out |grep -v grep
750 pts/0 S+ 0:00 strace -f ./a.out
751 pts/0 T+ 0:00 ./a.out
752 pts/0 Z+ 0:00 [a.out] <defunct>
The same works on i386. I don't know whether this is a kernel or strace
problem. How should I proceed?
Thanks in advance,
Baurzhan.
-- System Information:
Debian Release: 3.1
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: arm (armv5tel)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.4.19-rmk7-pxa1-rtc-m24-nfs
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages strace depends on:
ii libc6 2.3.5-6 GNU C Library: Shared libraries an
-- no debconf information
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int
main(void)
{
int status;
pid_t pid = fork();
switch (pid) {
case -1:
perror("fork");
return 2;
case 0:
sleep(1);
printf("child\n");
break;
default:
printf("parent\n");
wait4(pid, &status, 0, NULL);
break;
}
return 0;
}