From: Elias Naur Date: Tue, 10 Apr 2018 11:26:05 +0000 (+0200) Subject: misc/ios,runtime/cgo: remove SIGINT handshake for the iOS exec wrapper X-Git-Tag: go1.11beta1~898 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=144fae8ed5edf5912718da9cd722e81399c2e033;p=gostls13.git misc/ios,runtime/cgo: remove SIGINT handshake for the iOS exec wrapper Once upon a time, the iOS exec wrapper needed to change the current working directory for the binary being tested. To allow that, the runtime raised a SIGINT signal that the wrapper caught, changed the working directory and resumed the process. These days, the current working directory is passed from the wrapper to the runtime through a special entry in the app metadata and the SIGINT handshake is not necessary anymore. Remove the signaling from the runtime and the exec harness. Change-Id: Ia53bcc9e4724d2ca00207e22b91ce80a05271b55 Reviewed-on: https://go-review.googlesource.com/106096 Run-TryBot: Elias Naur TryBot-Result: Gobot Gobot Reviewed-by: Hyang-Ah Hana Kim --- diff --git a/misc/ios/go_darwin_arm_exec.go b/misc/ios/go_darwin_arm_exec.go index 56dbb009a1..134be27b47 100644 --- a/misc/ios/go_darwin_arm_exec.go +++ b/misc/ios/go_darwin_arm_exec.go @@ -259,11 +259,9 @@ func run(bin string, args []string) (err error) { } started = true - - s.doCmd("run", "stop reason = signal SIGINT", 20*time.Second) - startTestsLen := s.out.Len() - fmt.Fprintln(s.in, `process continue`) + + s.do("run") passed := func(out *buf) bool { // Just to make things fun, lldb sometimes translates \n into \r\n. diff --git a/src/runtime/cgo/gcc_darwin_arm.c b/src/runtime/cgo/gcc_darwin_arm.c index 30fca9902a..dd7d4f90e1 100644 --- a/src/runtime/cgo/gcc_darwin_arm.c +++ b/src/runtime/cgo/gcc_darwin_arm.c @@ -140,8 +140,6 @@ init_working_dir() if (chdir(buf) != 0) { fprintf(stderr, "runtime/cgo: chdir(%s) failed\n", buf); } - // Notify the test harness that we're correctly set up - raise(SIGINT); } } diff --git a/src/runtime/cgo/gcc_darwin_arm64.c b/src/runtime/cgo/gcc_darwin_arm64.c index 5c483b1845..c99725d2d6 100644 --- a/src/runtime/cgo/gcc_darwin_arm64.c +++ b/src/runtime/cgo/gcc_darwin_arm64.c @@ -142,8 +142,6 @@ init_working_dir() if (chdir(buf) != 0) { fprintf(stderr, "runtime/cgo: chdir(%s) failed\n", buf); } - // Notify the test harness that we're correctly set up - raise(SIGINT); } }