cosmopolitan/libc/calls/struct/siginfo.h
Justine Tunney f684e348d4 Improve signals and memory protection
- Document sigaction()
- Simplify New Technology fork() code
- Testing and many bug fixes for mprotect()
- Distribute Intel Xed ILD in the amalgamation
- Turn Xed enums into defines to avoid DWARF bloat
- Improve polyfilling of SA_SIGINFO on BSDs and fix bugs
- setpgid(getpid(), getpid()) on Windows will ignore CTRL-C
- Work around issues relating to NT mappings being executable
- Permit automatic executable stack override via `ape_stack_pf`
2022-04-12 22:11:00 -07:00

58 lines
1.3 KiB
C

#ifndef COSMOPOLITAN_LIBC_CALLS_STRUCT_SIGINFO_H_
#define COSMOPOLITAN_LIBC_CALLS_STRUCT_SIGINFO_H_
#include "libc/calls/struct/sigval.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
struct siginfo {
int32_t si_signo;
int32_t si_errno;
int32_t si_code; /* {SICODE,SEGV,ILL,FPE,POLL}_xxx */
union {
struct {
union {
struct {
int32_t si_pid;
uint32_t si_uid;
};
struct {
int32_t si_timerid; /* SIGALRM */
int32_t si_overrun;
};
};
union {
union sigval si_value; /* provided by third arg of sigqueue(2) */
struct {
int32_t si_status;
int64_t si_utime;
int64_t si_stime;
};
};
};
struct {
void *si_addr;
int16_t si_addr_lsb;
union {
struct {
void *si_lower;
void *si_upper;
};
uint32_t si_pkey;
};
};
struct {
int64_t si_band; /* SIGPOLL */
int32_t si_fd;
};
struct {
void *si_call_addr;
int32_t si_syscall;
uint32_t si_arch;
};
char __ignoreme[128 - 2 * sizeof(int32_t) - sizeof(int64_t)];
};
};
typedef struct siginfo siginfo_t;
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_SIGINFO_H_ */