1 // Copyright 2012 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 // Test that setgid does not hang on GNU/Linux.
6 // See https://golang.org/issue/3871 for details.
11 #include <sys/types.h>
24 func runTestSetgid() bool {
33 case <-time
.After(5 * time
.Second
):
39 func testSetgid(t
*testing
.T
) {
41 t
.Error("setgid hung")
44 // Now try it again after using signal.Notify.
45 signal
.Notify(make(chan os
.Signal
, 1), syscall
.SIGINT
)
47 t
.Error("setgid hung after signal.Notify")