Hello Ian,
I dont see why the program would need any more than to block the signal with
sigprocmask before calling tcsetpgrp. I am currently testing a patch to do
exactly that.
So far ive added the sigset_t data type to syscall/types_linux and regenerated
ztypes_linux_amd64, and added calls to sigprocmask via RawSyscall to access
the current signal set. Next, I need to use sigaddset to add SIGTTOU to the
signal mask before calling sigprocmask again to set the mask.
My understanding is that the sigset type is different depending on the
architecture, so I should use the sigaddset function declared in the runtime
package. I tried forward declaring the sigaddset and sigprocmask from the
runtime package in the syscall package (as is done for runtime_BeforeFork),
but when I compile I get "relocation target not defined" for these functions.
By the way, I appreciate the help you have given me. It's been a learning
experience tackling this issue.
Thanks,
Aidan
On Monday, December 28, 2020 9:37:35 AM PST you wrote:
> On Mon, Dec 28, 2020 at 12:15 AM Aidan Hahn <ai...@aidanis.online> wrote:
> > What I am trying to do is use signal.Notify to intercept SIGTTOU while
> > starting a process with the foreground attribute (see github issue
> > 37217).
> >
> > Perhaps instead I can instead call it in the forkAndExecInChild function
> > (syscall/exec_linux.go) before calling forkAndExecInChild1, that way
> > there would not be a circular import at least.
> Please reply to the mailing list, not just to me. Thanks.
>
> For issue 37217, can the child just block and then unblock the signal
> by calling sigprocmask? Is anything else required to make the program
> work?
>
> Ian
>
> > On Dec 27, 2020 9:29 PM, Ian Lance Taylor wrote: > > On Sun, Dec 27, 2020
> > at 6:42 PM Aidan Hahn wrote: > > > > I am writing a modification to the
> > > Ian > > -- > You received this message because you are subscribed to a
> > topic in the Google Groups "golang-nuts" group. > To unsubscribe from
> > this topic, visit
> >
https://groups.google.com/d/topic/golang-nuts/gzXwC3ygnRI/unsubscribe. >
> > To unsubscribe from this group and all its topics, send an email to
> >
golang-nuts...@googlegroups.com. > To view this discussion on
> > the web visit
> >
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcXu-Kq8CUAY_gF6B2UkzP
> > npFxF%3DwioHXgXaeY6OuPaKhA%
40mail.gmail.com.