runtime/cgo: fixes for calling sigaction in C
runtime/cgo: fixes for calling sigaction in C

Zero out the sigaction structs, in case the sa_restorer field is set.

Clear the SA_RESTORER flag; it is part of the kernel interface, not the
libc interface.

Fixes #17947.

Change-Id: I610348ce3c196d3761cf2170f06c24ecc3507cf7
Reviewed-on: https://go-review.googlesource.com/33331
Run-TryBot: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@golang.org>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Brad Fitzpatrick <ae9783c0b0efc69cd85ab025ddd17aa44cdc4aa5@golang.org>
Reviewed-by: Bryan Mills <1c8aad60184261ccede67f5c63a0d2a3bf3c9ff4@google.com>

cloudflare/go,codestation/go,golang/go,nawawi/go,suncycheng/go,christopher-henderson/Go,linux-on-ibm-z/go,vsekhar/elastic-go,polyverse-security/go,nawawi/go,Cofyc/go,golang/go,derekmarcotte/go,josharian/go,akutz/go,golang/go,codestation/go,goodlang/good,linux-on-ibm-z/go,derekmarcotte/go,Cofyc/go,nawawi/go,codestation/go,akutz/go,CAFxX/go,polyverse-security/go,vsekhar/elastic-go,vsekhar/elastic-go,ImJasonH/go,goodlang/good,nawawi/go,golang/go,suncycheng/go,cloudflare/go,linux-on-ibm-z/go,ImJasonH/go,goodlang/good,derekmarcotte/go,linux-on-ibm-z/go,suncycheng/go,polyverse-security/go,polyverse-security/go,josharian/go,vsekhar/elastic-go,vsekhar/elastic-go,codestation/go,Cofyc/go,linux-on-ibm-z/go,CAFxX/go,akutz/go,codestation/go,nawawi/go,Cofyc/go,vsekhar/elastic-go,golang/go,suncycheng/go,ImJasonH/go,ImJasonH/go,cloudflare/go,codestation/go,goodlang/good,derekmarcotte/go,cloudflare/go,josharian/go,akutz/go,goodlang/good,cloudflare/go,suncycheng/go,CAFxX/go,golang/go,nawawi/go,ImJasonH/go,vsekhar/elastic-go,suncycheng/go,linux-on-ibm-z/go,josharian/go,CAFxX/go,cloudflare/go,Cofyc/go,CAFxX/go,cloudflare/go,polyverse-security/go,josharian/go,polyverse-security/go,ImJasonH/go,derekmarcotte/go,suncycheng/go,akutz/go,goodlang/good,goodlang/good,ImJasonH/go,golang/go,derekmarcotte/go,linux-on-ibm-z/go,cloudflare/go,linux-on-ibm-z/go,codestation/go,polyverse-security/go,nawawi/go,vsekhar/elastic-go,derekmarcotte/go,CAFxX/go,suncycheng/go,goodlang/good,akutz/go,Cofyc/go,CAFxX/go,golang/go,akutz/go,Cofyc/go,akutz/go,josharian/go,josharian/go,ImJasonH/go,nawawi/go,polyverse-security/go,josharian/go,codestation/go,Cofyc/go,CAFxX/go,derekmarcotte/go