Re: [go-nuts] cgo pam module signal handling

2023-08-15 Thread Ian Lance Taylor
On Mon, Aug 14, 2023 at 4:52 PM Chandrasekhar R wrote: > > The scenario is: > 1) sudo starts and sets up a signal handler for SIGCHLD > 2) pam modules gets loaded > 3) Go gets initialized and sets the SA_ONSTACK flag specifically by calling > rt_sigaction with a pointer to the existing signal

Re: [go-nuts] cgo pam module signal handling

2023-08-14 Thread Chandrasekhar R
The scenario is: 1) sudo starts and sets up a signal handler for SIGCHLD 2) pam modules gets loaded 3) Go gets initialized and sets the SA_ONSTACK flag specifically by calling rt_sigaction with a pointer to the existing signal handler in *sa_handler * field*.* 4) Sudo initialized a new signal

Re: [go-nuts] cgo pam module signal handling

2023-08-14 Thread Ian Lance Taylor
On Mon, Aug 14, 2023 at 12:02 PM Chandrasekhar R wrote: > > My understanding currently is sudo sets up a signal handler in pre_exec and > another signal handler later on which is tied into its main event loop. > Go gets initialized when the pre_exec signal handler is used and it adds >

Re: [go-nuts] cgo pam module signal handling

2023-08-14 Thread Chandrasekhar R
My understanding currently is sudo sets up a signal handler in pre_exec and another signal handler later on which is tied into its main event loop. Go gets initialized when the pre_exec signal handler is used and it adds rt_sigaction(SIGCHLD..) with the SA_ONSTACK flag as mentioned here

Re: [go-nuts] cgo pam module signal handling

2023-08-11 Thread Ian Lance Taylor
On Fri, Aug 11, 2023 at 11:51 AM Chandrasekhar R wrote: > > I am planning on using a pam module written in Go (specifically > https://github.com/uber/pam-ussh) . When I run a script which calls sudo > continuously with an echo command, I am noticing zombie/defunct processes > starting to pop

[go-nuts] cgo pam module signal handling

2023-08-11 Thread Chandrasekhar R
Hey community, I am planning on using a pam module written in Go (specifically https://github.com/uber/pam-ussh) . When I run a script which calls sudo continuously with an echo command, I am noticing zombie/defunct processes starting to pop up. On doing strace, I noticed that the SIGCHLD