Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: hppa problems



> I'll investigate the sigsuspend test shortly.

--sigsus.c--
#include <signal.h>
#include <unistd.h>
int child=0;
void handler(sig)
    int sig;
{if(sig==SIGCHLD) child=1;}
main() {
    struct sigaction act;
    sigset_t set;
    int pid, ret;
    act.sa_handler = &handler;
    sigfillset(&act.sa_mask);
    act.sa_flags = 0;
    sigaction(SIGCHLD, &act, 0);
    sigfillset(&set);
    sigprocmask(SIG_SETMASK, &set, 0);
    pid=fork();
    if(pid==0) return 0;
    if(pid>0) {
    sigemptyset(&set);
        ret=sigsuspend(&set);
        exit(child==0);
    }
}
--end sigsus.c--

--strace -ff output--
execve("./sigsuspendtest", ["./sigsuspendtest"], [/* 16 vars */]) = 0
newuname({sys="Linux", node="paer", ...}) = 0
brk(0)                                  = 0x21000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4001a000
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
idle()                                  = 0
mmap(NULL, 14827, PROT_READ, MAP_PRIVATE, 3, 0) = 0x4001b000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\2\1\3\0\0\0\0\0\0\0\0\0\3\0\17\0\0\0\1\0\2\210"..., 1024) = 1024
idle()                                  = 0
mmap(NULL, 1351200, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4002b000
mprotect(0x40158000, 118304, PROT_NONE) = 0
mmap(0x40167000, 45056, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x12c000) = 0x40167000
mmap(0x40172000, 11808, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40172000
close(3)                                = 0
munmap(0x4001b000, 14827)               = 0
getpid()                                = 17711
rt_sigaction(SIGCHLD, {0x20952, ~[], 0}, NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[], NULL, 8) = 0
fork()                                  = 17712
rt_sigsuspend([]--- SIGCHLD (Child exited) ---
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
--end strace -ff output--

--strace -ff child output--
exit(0)                                 = ?
--end strace -ff child output--



Messages sorted by: Reverse Date, Date, Thread, Author