2011-03-23 09:31:42 -06:00
|
|
|
#define SIG_DFL ((void*)0)
|
|
|
|
#define SIG_IGN ((void*)1)
|
|
|
|
|
2012-01-09 23:39:17 -07:00
|
|
|
int32 runtime·thr_new(ThrParam*, int32);
|
2012-02-13 15:29:51 -07:00
|
|
|
void runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp);
|
2012-01-09 23:39:17 -07:00
|
|
|
void runtime·sigpanic(void);
|
|
|
|
void runtime·sigaltstack(Sigaltstack*, Sigaltstack*);
|
|
|
|
struct sigaction;
|
|
|
|
void runtime·sigaction(int32, struct sigaction*, struct sigaction*);
|
2012-02-21 21:44:09 -07:00
|
|
|
void runtime·sigprocmask(Sigset *, Sigset *);
|
os/signal: selective signal handling
Restore package os/signal, with new API:
Notify replaces Incoming, allowing clients
to ask for certain signals only. Also, signals
go to everyone who asks, not just one client.
This could plausibly move into package os now
that there are no magic side effects as a result
of the import.
Update runtime for new API: move common Unix
signal handling code into signal_unix.c.
(It's so easy to do this now that we don't have
to edit Makefiles!)
Tested on darwin,linux 386,amd64.
Fixes #1266.
R=r, dsymonds, bradfitz, iant, borman
CC=golang-dev
https://golang.org/cl/3749041
2012-02-13 11:52:37 -07:00
|
|
|
void runtime·setsig(int32, void(*)(int32, Siginfo*, void*, G*), bool);
|
2011-03-23 18:45:12 -06:00
|
|
|
void runtime·setitimer(int32, Itimerval*, Itimerval*);
|
2012-01-09 23:39:17 -07:00
|
|
|
int32 runtime·sysctl(uint32*, uint32, byte*, uintptr*, byte*, uintptr);
|
2011-04-25 14:58:00 -06:00
|
|
|
|
|
|
|
void runtime·raisesigpipe(void);
|
os/signal: selective signal handling
Restore package os/signal, with new API:
Notify replaces Incoming, allowing clients
to ask for certain signals only. Also, signals
go to everyone who asks, not just one client.
This could plausibly move into package os now
that there are no magic side effects as a result
of the import.
Update runtime for new API: move common Unix
signal handling code into signal_unix.c.
(It's so easy to do this now that we don't have
to edit Makefiles!)
Tested on darwin,linux 386,amd64.
Fixes #1266.
R=r, dsymonds, bradfitz, iant, borman
CC=golang-dev
https://golang.org/cl/3749041
2012-02-13 11:52:37 -07:00
|
|
|
|
|
|
|
#define NSIG 33
|
2012-09-16 11:08:41 -06:00
|
|
|
#define SI_USER 0x10001
|
2012-02-24 13:28:51 -07:00
|
|
|
|
|
|
|
#define RLIMIT_AS 10
|
|
|
|
typedef struct Rlimit Rlimit;
|
|
|
|
struct Rlimit {
|
|
|
|
int64 rlim_cur;
|
|
|
|
int64 rlim_max;
|
|
|
|
};
|
|
|
|
int32 runtime·getrlimit(int32, Rlimit*);
|