From a3fdd6e64970b87768f3aed733c6fe72c983bb3e Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Fri, 27 Jan 2012 14:47:02 -0800 Subject: [PATCH] os: remove SIGXXX signals variables. They're not portable, and pkg os is supposed to be portable. Fixes #2562 R=golang-dev, mikioh.mikioh, r, n13m3y3r, rsc CC=golang-dev https://golang.org/cl/5574078 --- src/buildscript/darwin_386.sh | 2 +- src/buildscript/darwin_amd64.sh | 2 +- src/buildscript/freebsd_386.sh | 2 +- src/buildscript/freebsd_amd64.sh | 2 +- src/buildscript/linux_386.sh | 2 +- src/buildscript/linux_amd64.sh | 2 +- src/buildscript/linux_arm.sh | 2 +- src/buildscript/netbsd_386.sh | 2 +- src/buildscript/netbsd_amd64.sh | 2 +- src/buildscript/openbsd_386.sh | 2 +- src/buildscript/openbsd_amd64.sh | 2 +- src/buildscript/windows_386.sh | 2 +- src/buildscript/windows_amd64.sh | 2 +- src/pkg/os/Makefile | 6 ---- src/pkg/os/exec_posix.go | 2 +- src/pkg/os/exec_windows.go | 3 +- src/pkg/os/mksignals.sh | 24 -------------- src/pkg/os/mkunixsignals.sh | 27 --------------- src/pkg/os/signal/signal_test.go | 6 ++-- src/pkg/os/zsignal_darwin_386.go | 48 --------------------------- src/pkg/os/zsignal_darwin_amd64.go | 48 --------------------------- src/pkg/os/zsignal_freebsd_386.go | 50 ---------------------------- src/pkg/os/zsignal_freebsd_amd64.go | 50 ---------------------------- src/pkg/os/zsignal_linux_386.go | 51 ----------------------------- src/pkg/os/zsignal_linux_amd64.go | 51 ----------------------------- src/pkg/os/zsignal_linux_arm.go | 51 ----------------------------- src/pkg/os/zsignal_netbsd_386.go | 49 --------------------------- src/pkg/os/zsignal_netbsd_amd64.go | 49 --------------------------- src/pkg/os/zsignal_openbsd_386.go | 49 --------------------------- src/pkg/os/zsignal_openbsd_amd64.go | 49 --------------------------- src/pkg/os/zsignal_windows_386.go | 29 ---------------- src/pkg/os/zsignal_windows_amd64.go | 29 ---------------- 32 files changed, 19 insertions(+), 678 deletions(-) delete mode 100755 src/pkg/os/mksignals.sh delete mode 100755 src/pkg/os/mkunixsignals.sh delete mode 100644 src/pkg/os/zsignal_darwin_386.go delete mode 100644 src/pkg/os/zsignal_darwin_amd64.go delete mode 100644 src/pkg/os/zsignal_freebsd_386.go delete mode 100644 src/pkg/os/zsignal_freebsd_amd64.go delete mode 100644 src/pkg/os/zsignal_linux_386.go delete mode 100644 src/pkg/os/zsignal_linux_amd64.go delete mode 100644 src/pkg/os/zsignal_linux_arm.go delete mode 100644 src/pkg/os/zsignal_netbsd_386.go delete mode 100644 src/pkg/os/zsignal_netbsd_amd64.go delete mode 100644 src/pkg/os/zsignal_openbsd_386.go delete mode 100644 src/pkg/os/zsignal_openbsd_amd64.go delete mode 100644 src/pkg/os/zsignal_windows_386.go delete mode 100644 src/pkg/os/zsignal_windows_amd64.go diff --git a/src/buildscript/darwin_386.sh b/src/buildscript/darwin_386.sh index baa3fd6b78..73897ba418 100755 --- a/src/buildscript/darwin_386.sh +++ b/src/buildscript/darwin_386.sh @@ -253,7 +253,7 @@ cp "$WORK"/time.a "$GOROOT"/pkg/darwin_386/time.a mkdir -p "$WORK"/os/_obj/ cd "$GOROOT"/src/pkg/os -8g -o "$WORK"/os/_obj/_go_.8 -p os -I "$WORK" ./dir_unix.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_unix.go ./file.go ./file_posix.go ./file_unix.go ./getwd.go ./path.go ./path_unix.go ./proc.go ./stat_darwin.go ./sys_bsd.go ./time.go ./types.go ./zsignal_darwin_386.go +8g -o "$WORK"/os/_obj/_go_.8 -p os -I "$WORK" ./dir_unix.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_unix.go ./file.go ./file_posix.go ./file_unix.go ./getwd.go ./path.go ./path_unix.go ./proc.go ./stat_darwin.go ./sys_bsd.go ./time.go ./types.go gopack grc "$WORK"/os.a "$WORK"/os/_obj/_go_.8 cp "$WORK"/os.a "$GOROOT"/pkg/darwin_386/os.a diff --git a/src/buildscript/darwin_amd64.sh b/src/buildscript/darwin_amd64.sh index e31d6f9e8b..b0cab57404 100755 --- a/src/buildscript/darwin_amd64.sh +++ b/src/buildscript/darwin_amd64.sh @@ -252,7 +252,7 @@ cp "$WORK"/time.a "$GOROOT"/pkg/darwin_amd64/time.a mkdir -p "$WORK"/os/_obj/ cd "$GOROOT"/src/pkg/os -6g -o "$WORK"/os/_obj/_go_.6 -p os -I "$WORK" ./dir_unix.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_unix.go ./file.go ./file_posix.go ./file_unix.go ./getwd.go ./path.go ./path_unix.go ./proc.go ./stat_darwin.go ./sys_bsd.go ./time.go ./types.go ./zsignal_darwin_amd64.go +6g -o "$WORK"/os/_obj/_go_.6 -p os -I "$WORK" ./dir_unix.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_unix.go ./file.go ./file_posix.go ./file_unix.go ./getwd.go ./path.go ./path_unix.go ./proc.go ./stat_darwin.go ./sys_bsd.go ./time.go ./types.go gopack grc "$WORK"/os.a "$WORK"/os/_obj/_go_.6 cp "$WORK"/os.a "$GOROOT"/pkg/darwin_amd64/os.a diff --git a/src/buildscript/freebsd_386.sh b/src/buildscript/freebsd_386.sh index f17f9da188..0c24e12c5a 100755 --- a/src/buildscript/freebsd_386.sh +++ b/src/buildscript/freebsd_386.sh @@ -253,7 +253,7 @@ cp "$WORK"/time.a "$GOROOT"/pkg/freebsd_386/time.a mkdir -p "$WORK"/os/_obj/ cd "$GOROOT"/src/pkg/os -8g -o "$WORK"/os/_obj/_go_.8 -p os -I "$WORK" ./dir_unix.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_unix.go ./file.go ./file_posix.go ./file_unix.go ./getwd.go ./path.go ./path_unix.go ./proc.go ./stat_freebsd.go ./sys_bsd.go ./time.go ./types.go ./zsignal_freebsd_386.go +8g -o "$WORK"/os/_obj/_go_.8 -p os -I "$WORK" ./dir_unix.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_unix.go ./file.go ./file_posix.go ./file_unix.go ./getwd.go ./path.go ./path_unix.go ./proc.go ./stat_freebsd.go ./sys_bsd.go ./time.go ./types.go gopack grc "$WORK"/os.a "$WORK"/os/_obj/_go_.8 cp "$WORK"/os.a "$GOROOT"/pkg/freebsd_386/os.a diff --git a/src/buildscript/freebsd_amd64.sh b/src/buildscript/freebsd_amd64.sh index be0070ac16..0a645cca20 100755 --- a/src/buildscript/freebsd_amd64.sh +++ b/src/buildscript/freebsd_amd64.sh @@ -252,7 +252,7 @@ cp "$WORK"/time.a "$GOROOT"/pkg/freebsd_amd64/time.a mkdir -p "$WORK"/os/_obj/ cd "$GOROOT"/src/pkg/os -6g -o "$WORK"/os/_obj/_go_.6 -p os -I "$WORK" ./dir_unix.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_unix.go ./file.go ./file_posix.go ./file_unix.go ./getwd.go ./path.go ./path_unix.go ./proc.go ./stat_freebsd.go ./sys_bsd.go ./time.go ./types.go ./zsignal_freebsd_amd64.go +6g -o "$WORK"/os/_obj/_go_.6 -p os -I "$WORK" ./dir_unix.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_unix.go ./file.go ./file_posix.go ./file_unix.go ./getwd.go ./path.go ./path_unix.go ./proc.go ./stat_freebsd.go ./sys_bsd.go ./time.go ./types.go gopack grc "$WORK"/os.a "$WORK"/os/_obj/_go_.6 cp "$WORK"/os.a "$GOROOT"/pkg/freebsd_amd64/os.a diff --git a/src/buildscript/linux_386.sh b/src/buildscript/linux_386.sh index 8ae424d395..246f17b061 100755 --- a/src/buildscript/linux_386.sh +++ b/src/buildscript/linux_386.sh @@ -253,7 +253,7 @@ cp "$WORK"/time.a "$GOROOT"/pkg/linux_386/time.a mkdir -p "$WORK"/os/_obj/ cd "$GOROOT"/src/pkg/os -8g -o "$WORK"/os/_obj/_go_.8 -p os -I "$WORK" ./dir_unix.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_unix.go ./file.go ./file_posix.go ./file_unix.go ./getwd.go ./path.go ./path_unix.go ./proc.go ./stat_linux.go ./sys_linux.go ./time.go ./types.go ./zsignal_linux_386.go +8g -o "$WORK"/os/_obj/_go_.8 -p os -I "$WORK" ./dir_unix.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_unix.go ./file.go ./file_posix.go ./file_unix.go ./getwd.go ./path.go ./path_unix.go ./proc.go ./stat_linux.go ./sys_linux.go ./time.go ./types.go gopack grc "$WORK"/os.a "$WORK"/os/_obj/_go_.8 cp "$WORK"/os.a "$GOROOT"/pkg/linux_386/os.a diff --git a/src/buildscript/linux_amd64.sh b/src/buildscript/linux_amd64.sh index 4786f61748..1c1ff21a90 100755 --- a/src/buildscript/linux_amd64.sh +++ b/src/buildscript/linux_amd64.sh @@ -252,7 +252,7 @@ cp "$WORK"/time.a "$GOROOT"/pkg/linux_amd64/time.a mkdir -p "$WORK"/os/_obj/ cd "$GOROOT"/src/pkg/os -6g -o "$WORK"/os/_obj/_go_.6 -p os -I "$WORK" ./dir_unix.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_unix.go ./file.go ./file_posix.go ./file_unix.go ./getwd.go ./path.go ./path_unix.go ./proc.go ./stat_linux.go ./sys_linux.go ./time.go ./types.go ./zsignal_linux_amd64.go +6g -o "$WORK"/os/_obj/_go_.6 -p os -I "$WORK" ./dir_unix.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_unix.go ./file.go ./file_posix.go ./file_unix.go ./getwd.go ./path.go ./path_unix.go ./proc.go ./stat_linux.go ./sys_linux.go ./time.go ./types.go gopack grc "$WORK"/os.a "$WORK"/os/_obj/_go_.6 cp "$WORK"/os.a "$GOROOT"/pkg/linux_amd64/os.a diff --git a/src/buildscript/linux_arm.sh b/src/buildscript/linux_arm.sh index bfa814343f..d2e1a7a100 100755 --- a/src/buildscript/linux_arm.sh +++ b/src/buildscript/linux_arm.sh @@ -256,7 +256,7 @@ cp "$WORK"/time.a "$GOROOT"/pkg/linux_arm/time.a mkdir -p "$WORK"/os/_obj/ cd "$GOROOT"/src/pkg/os -5g -o "$WORK"/os/_obj/_go_.5 -p os -I "$WORK" ./dir_unix.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_unix.go ./file.go ./file_posix.go ./file_unix.go ./getwd.go ./path.go ./path_unix.go ./proc.go ./stat_linux.go ./sys_linux.go ./time.go ./types.go ./zsignal_linux_arm.go +5g -o "$WORK"/os/_obj/_go_.5 -p os -I "$WORK" ./dir_unix.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_unix.go ./file.go ./file_posix.go ./file_unix.go ./getwd.go ./path.go ./path_unix.go ./proc.go ./stat_linux.go ./sys_linux.go ./time.go ./types.go gopack grc "$WORK"/os.a "$WORK"/os/_obj/_go_.5 cp "$WORK"/os.a "$GOROOT"/pkg/linux_arm/os.a diff --git a/src/buildscript/netbsd_386.sh b/src/buildscript/netbsd_386.sh index 6235a2f6dd..fcf847571b 100755 --- a/src/buildscript/netbsd_386.sh +++ b/src/buildscript/netbsd_386.sh @@ -253,7 +253,7 @@ cp "$WORK"/time.a "$GOROOT"/pkg/netbsd_386/time.a mkdir -p "$WORK"/os/_obj/ cd "$GOROOT"/src/pkg/os -8g -o "$WORK"/os/_obj/_go_.8 -p os -I "$WORK" ./dir_unix.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_unix.go ./file.go ./file_posix.go ./file_unix.go ./getwd.go ./path.go ./path_unix.go ./proc.go ./stat_netbsd.go ./sys_bsd.go ./time.go ./types.go ./zsignal_netbsd_386.go +8g -o "$WORK"/os/_obj/_go_.8 -p os -I "$WORK" ./dir_unix.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_unix.go ./file.go ./file_posix.go ./file_unix.go ./getwd.go ./path.go ./path_unix.go ./proc.go ./stat_netbsd.go ./sys_bsd.go ./time.go ./types.go gopack grc "$WORK"/os.a "$WORK"/os/_obj/_go_.8 cp "$WORK"/os.a "$GOROOT"/pkg/netbsd_386/os.a diff --git a/src/buildscript/netbsd_amd64.sh b/src/buildscript/netbsd_amd64.sh index cf4c91a36c..8ad1a15436 100755 --- a/src/buildscript/netbsd_amd64.sh +++ b/src/buildscript/netbsd_amd64.sh @@ -252,7 +252,7 @@ cp "$WORK"/time.a "$GOROOT"/pkg/netbsd_amd64/time.a mkdir -p "$WORK"/os/_obj/ cd "$GOROOT"/src/pkg/os -6g -o "$WORK"/os/_obj/_go_.6 -p os -I "$WORK" ./dir_unix.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_unix.go ./file.go ./file_posix.go ./file_unix.go ./getwd.go ./path.go ./path_unix.go ./proc.go ./stat_netbsd.go ./sys_bsd.go ./time.go ./types.go ./zsignal_netbsd_amd64.go +6g -o "$WORK"/os/_obj/_go_.6 -p os -I "$WORK" ./dir_unix.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_unix.go ./file.go ./file_posix.go ./file_unix.go ./getwd.go ./path.go ./path_unix.go ./proc.go ./stat_netbsd.go ./sys_bsd.go ./time.go ./types.go gopack grc "$WORK"/os.a "$WORK"/os/_obj/_go_.6 cp "$WORK"/os.a "$GOROOT"/pkg/netbsd_amd64/os.a diff --git a/src/buildscript/openbsd_386.sh b/src/buildscript/openbsd_386.sh index 5907822df2..f80e1e0acb 100755 --- a/src/buildscript/openbsd_386.sh +++ b/src/buildscript/openbsd_386.sh @@ -253,7 +253,7 @@ cp "$WORK"/time.a "$GOROOT"/pkg/openbsd_386/time.a mkdir -p "$WORK"/os/_obj/ cd "$GOROOT"/src/pkg/os -8g -o "$WORK"/os/_obj/_go_.8 -p os -I "$WORK" ./dir_unix.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_unix.go ./file.go ./file_posix.go ./file_unix.go ./getwd.go ./path.go ./path_unix.go ./proc.go ./stat_openbsd.go ./sys_bsd.go ./time.go ./types.go ./zsignal_openbsd_386.go +8g -o "$WORK"/os/_obj/_go_.8 -p os -I "$WORK" ./dir_unix.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_unix.go ./file.go ./file_posix.go ./file_unix.go ./getwd.go ./path.go ./path_unix.go ./proc.go ./stat_openbsd.go ./sys_bsd.go ./time.go ./types.go gopack grc "$WORK"/os.a "$WORK"/os/_obj/_go_.8 cp "$WORK"/os.a "$GOROOT"/pkg/openbsd_386/os.a diff --git a/src/buildscript/openbsd_amd64.sh b/src/buildscript/openbsd_amd64.sh index 7db8d8e423..257eecc96e 100755 --- a/src/buildscript/openbsd_amd64.sh +++ b/src/buildscript/openbsd_amd64.sh @@ -252,7 +252,7 @@ cp "$WORK"/time.a "$GOROOT"/pkg/openbsd_amd64/time.a mkdir -p "$WORK"/os/_obj/ cd "$GOROOT"/src/pkg/os -6g -o "$WORK"/os/_obj/_go_.6 -p os -I "$WORK" ./dir_unix.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_unix.go ./file.go ./file_posix.go ./file_unix.go ./getwd.go ./path.go ./path_unix.go ./proc.go ./stat_openbsd.go ./sys_bsd.go ./time.go ./types.go ./zsignal_openbsd_amd64.go +6g -o "$WORK"/os/_obj/_go_.6 -p os -I "$WORK" ./dir_unix.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_unix.go ./file.go ./file_posix.go ./file_unix.go ./getwd.go ./path.go ./path_unix.go ./proc.go ./stat_openbsd.go ./sys_bsd.go ./time.go ./types.go gopack grc "$WORK"/os.a "$WORK"/os/_obj/_go_.6 cp "$WORK"/os.a "$GOROOT"/pkg/openbsd_amd64/os.a diff --git a/src/buildscript/windows_386.sh b/src/buildscript/windows_386.sh index 3a3ec03da3..789d5b67ff 100755 --- a/src/buildscript/windows_386.sh +++ b/src/buildscript/windows_386.sh @@ -265,7 +265,7 @@ cp "$WORK"/time.a "$GOROOT"/pkg/windows_386/time.a mkdir -p "$WORK"/os/_obj/ cd "$GOROOT"/src/pkg/os -8g -o "$WORK"/os/_obj/_go_.8 -p os -I "$WORK" ./dir_windows.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_windows.go ./file.go ./file_posix.go ./file_windows.go ./getwd.go ./path.go ./path_windows.go ./proc.go ./stat_windows.go ./sys_windows.go ./time.go ./types.go ./zsignal_windows_386.go +8g -o "$WORK"/os/_obj/_go_.8 -p os -I "$WORK" ./dir_windows.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_windows.go ./file.go ./file_posix.go ./file_windows.go ./getwd.go ./path.go ./path_windows.go ./proc.go ./stat_windows.go ./sys_windows.go ./time.go ./types.go gopack grc "$WORK"/os.a "$WORK"/os/_obj/_go_.8 cp "$WORK"/os.a "$GOROOT"/pkg/windows_386/os.a diff --git a/src/buildscript/windows_amd64.sh b/src/buildscript/windows_amd64.sh index 1858b22063..0026c1e086 100755 --- a/src/buildscript/windows_amd64.sh +++ b/src/buildscript/windows_amd64.sh @@ -264,7 +264,7 @@ cp "$WORK"/time.a "$GOROOT"/pkg/windows_amd64/time.a mkdir -p "$WORK"/os/_obj/ cd "$GOROOT"/src/pkg/os -6g -o "$WORK"/os/_obj/_go_.6 -p os -I "$WORK" ./dir_windows.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_windows.go ./file.go ./file_posix.go ./file_windows.go ./getwd.go ./path.go ./path_windows.go ./proc.go ./stat_windows.go ./sys_windows.go ./time.go ./types.go ./zsignal_windows_amd64.go +6g -o "$WORK"/os/_obj/_go_.6 -p os -I "$WORK" ./dir_windows.go ./doc.go ./env.go ./error.go ./error_posix.go ./exec.go ./exec_posix.go ./exec_windows.go ./file.go ./file_posix.go ./file_windows.go ./getwd.go ./path.go ./path_windows.go ./proc.go ./stat_windows.go ./sys_windows.go ./time.go ./types.go gopack grc "$WORK"/os.a "$WORK"/os/_obj/_go_.6 cp "$WORK"/os.a "$GOROOT"/pkg/windows_amd64/os.a diff --git a/src/pkg/os/Makefile b/src/pkg/os/Makefile index 9f8d527ba3..ca83ff1a99 100644 --- a/src/pkg/os/Makefile +++ b/src/pkg/os/Makefile @@ -27,7 +27,6 @@ GOFILES_freebsd=\ sys_bsd.go\ exec_posix.go\ exec_unix.go\ - zsignal_$(GOOS)_$(GOARCH).go\ GOFILES_darwin=\ dir_unix.go\ @@ -38,7 +37,6 @@ GOFILES_darwin=\ sys_bsd.go\ exec_posix.go\ exec_unix.go\ - zsignal_$(GOOS)_$(GOARCH).go\ GOFILES_linux=\ dir_unix.go\ @@ -49,7 +47,6 @@ GOFILES_linux=\ sys_linux.go\ exec_posix.go\ exec_unix.go\ - zsignal_$(GOOS)_$(GOARCH).go\ GOFILES_netbsd=\ dir_unix.go\ @@ -60,7 +57,6 @@ GOFILES_netbsd=\ sys_bsd.go\ exec_posix.go\ exec_unix.go\ - zsignal_$(GOOS)_$(GOARCH).go\ GOFILES_openbsd=\ dir_unix.go\ @@ -71,7 +67,6 @@ GOFILES_openbsd=\ sys_bsd.go\ exec_posix.go\ exec_unix.go\ - zsignal_$(GOOS)_$(GOARCH).go\ GOFILES_windows=\ dir_windows.go\ @@ -82,7 +77,6 @@ GOFILES_windows=\ sys_windows.go\ exec_posix.go\ exec_windows.go\ - zsignal_$(GOOS)_$(GOARCH).go\ GOFILES_plan9=\ dir_plan9.go\ diff --git a/src/pkg/os/exec_posix.go b/src/pkg/os/exec_posix.go index 218b8cdc1d..6465bfbb65 100644 --- a/src/pkg/os/exec_posix.go +++ b/src/pkg/os/exec_posix.go @@ -48,7 +48,7 @@ func StartProcess(name string, argv []string, attr *ProcAttr) (p *Process, err e // Kill causes the Process to exit immediately. func (p *Process) Kill() error { - return p.Signal(SIGKILL) + return p.Signal(UnixSignal(syscall.SIGKILL)) } // Exec replaces the current process with an execution of the diff --git a/src/pkg/os/exec_windows.go b/src/pkg/os/exec_windows.go index 7eb7d194d6..c7e25f9853 100644 --- a/src/pkg/os/exec_windows.go +++ b/src/pkg/os/exec_windows.go @@ -37,8 +37,7 @@ func (p *Process) Signal(sig Signal) error { if p.done { return errors.New("os: process already finished") } - switch sig.(UnixSignal) { - case SIGKILL: + if us, ok := sig.(UnixSignal); ok && us == syscall.SIGKILL { e := syscall.TerminateProcess(syscall.Handle(p.handle), 1) return NewSyscallError("TerminateProcess", e) } diff --git a/src/pkg/os/mksignals.sh b/src/pkg/os/mksignals.sh deleted file mode 100755 index 401e39f143..0000000000 --- a/src/pkg/os/mksignals.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -for targ in \ - darwin_386 \ - darwin_amd64 \ - freebsd_386 \ - freebsd_amd64 \ - linux_386 \ - linux_amd64 \ - linux_arm \ - netbsd_386 \ - netbsd_amd64 \ - openbsd_386 \ - openbsd_amd64 \ -; do - ./mkunixsignals.sh ../syscall/zerrors_$targ.go |gofmt >zsignal_$targ.go -done - -for targ in \ - windows_386 \ - windows_amd64 \ -; do - ./mkunixsignals.sh ../syscall/ztypes_windows.go |gofmt >zsignal_$targ.go -done diff --git a/src/pkg/os/mkunixsignals.sh b/src/pkg/os/mkunixsignals.sh deleted file mode 100755 index ec62f1d708..0000000000 --- a/src/pkg/os/mkunixsignals.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -# 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. - -echo '// MACHINE GENERATED; DO NOT EDIT' -echo '// To regenerate, run' -echo '// ./mksignals.sh' -echo '// which, for this file, will run' -echo '// ./mkunixsignals.sh' "$1" -echo - -cat <