mirror of
https://github.com/golang/go
synced 2024-10-04 22:31:22 -06:00
35586f718c
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
23 lines
794 B
C
23 lines
794 B
C
// Copyright 2010 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
#define SIG_DFL ((void*)0)
|
|
#define SIG_IGN ((void*)1)
|
|
|
|
struct sigaction;
|
|
|
|
void runtime·sigpanic(void);
|
|
void runtime·sigaltstack(Sigaltstack*, Sigaltstack*);
|
|
void runtime·sigaction(int32, struct sigaction*, struct sigaction*);
|
|
void runtime·setsig(int32, void(*)(int32, Siginfo*, void*, G*), bool);
|
|
void runtime·sighandler(int32 sig, Siginfo *info, void *context, G *gp);
|
|
void runtime·setitimerval(int32, Itimerval*, Itimerval*);
|
|
void runtime·setitimer(int32, Itimerval*, Itimerval*);
|
|
int32 runtime·sysctl(uint32*, uint32, byte*, uintptr*, byte*, uintptr);
|
|
|
|
void runtime·raisesigpipe(void);
|
|
|
|
#define NSIG 33
|
|
#define SI_USER 0
|