]> Cypherpunks repositories - gostls13.git/commitdiff
misc/ios,runtime/cgo: remove SIGINT handshake for the iOS exec wrapper
authorElias Naur <elias.naur@gmail.com>
Tue, 10 Apr 2018 11:26:05 +0000 (13:26 +0200)
committerElias Naur <elias.naur@gmail.com>
Tue, 10 Apr 2018 16:30:07 +0000 (16:30 +0000)
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 <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
misc/ios/go_darwin_arm_exec.go
src/runtime/cgo/gcc_darwin_arm.c
src/runtime/cgo/gcc_darwin_arm64.c

index 56dbb009a185085e0cf28559e537df81a97d7420..134be27b47144b8c00357463713baea5c4bd296f 100644 (file)
@@ -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.
index 30fca9902a7f0971daf86f974a76f7b0fad0b1c3..dd7d4f90e1bd063d3c87e54f2d5495f6840e148d 100644 (file)
@@ -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);
        }
 }
 
index 5c483b1845c3ef7aa172f1db1877e57b6f1f38fb..c99725d2d6d91ea967c8043b82bb507e4f57c390 100644 (file)
@@ -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);
        }
 }