<p dir="auto">by <strong><a href="mailto:r@rcrowley.org">r@rcrowley.org</a></strong>:</p>
<pre class="notranslate">What steps will reproduce the problem?

1. `8g fence.go &amp;&amp; 8l fence.8 &amp;&amp; ./8.out`
2. In another terminal, send SIGUSR2 to the 8.out process.

What is the expected output?

18:49:05.074168 fence.go:16: (open a file descriptor and do work)
18:49:27.745035 fence.go:37: SIGUSR2: user-defined signal 2
18:49:27.745898 fence.go:80: p.Pid: 12823
18:49:27.746709 fence.go:18: (do work with an inherited file descriptor)

The child process whose PID is printed delivers SIGQUIT to its parent, which exits
gracefully by returning from main.main, and then should remain running as a child of
init.  Delivering SIGUSR2 to the child repeats the process, leaving its child behind,
and so on.

What do you see instead?

The expected output plus a panic.  See attached panic.txt.  The child does remain as a
child of init and the process can be repeated.  The parent consistently panics instead
of successfully handling the SIGQUIT and returning from main.main.

Which compiler are you using (5g, 6g, 8g, gccgo)?

8g version weekly.2011-08-17 9460

Which operating system are you using?

Ubuntu 11.04 on i386.  I have additionally tested in Ubuntu 10.04 and 11.04 on amd64.

Which revision are you using?  (hg identify)

c62cf48b7dc4 tip

Please provide any additional information below.

Without a call to os.StartProcess or syscall.ForkExec, any number of signals may be
handled by &lt;-signal.Incoming.

It additionally doesn't matter...

* which of os.StartProcess or syscall.ForkExec is used.
* that the same program is being executed.
* what's passed in the *os.ProcAttr.
* that exec.LookPath, os.Setenv, are os.Getpid are called in this code path.
* whether the architecture is i386 or amd64.
* whether the hypervisor is VirtualBox or Xen.
* whether the child or an unrelated process delivers the SIGQUIT.
* whether signals are recieved indirectly by &lt;-signal.Incoming or directly in the
main goroutine by runtime.Sigrecv().</pre>
<p dir="auto">Attachments:</p>
<ol dir="auto">
<li><a href="https://storage.googleapis.com/go-attachment/2161/0/panic.txt" rel="nofollow">panic.txt</a> (2366 bytes)</li>
<li><a href="https://storage.googleapis.com/go-attachment/2161/0/fence.go" rel="nofollow">fence.go</a> (1735 bytes)</li>
</ol>
<p dir="auto">by <strong>aka.spin</strong>:</p>
<pre class="notranslate">It would be nice to set additional library path to gotest. Like "-L" in *l.</pre>