>
> Interesting.  Maybe we need to change this line in setsig in 
> runtime/os_darwin.go 
>     *(*uintptr)(unsafe.Pointer(&sa.__sigaction_u)) = fn 
> to be 
>     *(*uintptr)(unsafe.Pointer(&sa.__sigaction_u)) = 
> unsafe.Pointer(funcPC(sigtramp))  
>

That's not possible, the signatures of sa_tramp and sa_sigaction do not 
match:

/* union for signal handlers */ 
union __sigaction_u { 
    void (*__sa_handler)(int);
    void (*__sa_sigaction)(int, struct __siginfo *, void *);
}; 

/* Signal vector template for Kernel user boundary */
struct __sigaction {
    union __sigaction_u __sigaction_u; /* signal handler */ 
    void (*sa_tramp)(void *, int, int, siginfo_t *, void *);
    sigset_t sa_mask; /* signal mask to apply */
    int sa_flags; /* see signal options below */
}; 

Martin 

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to