public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Godmar Back via Libc-help <libc-help@sourceware.org>
Subject: Re: supporting terminal ownership assignment (tcsetpgrp()) in posix_spawn
Date: Wed, 09 Jun 2021 08:41:15 +0200	[thread overview]
Message-ID: <87tum78rqs.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <CAB4+JYJwW5i881HFgSwKG1ChcHjNpiBf-S3t=4JrFejCKwNxfw@mail.gmail.com> (Godmar Back via Libc-help's message of "Tue, 8 Jun 2021 18:11:33 -0400")

* Godmar Back via Libc-help:

> I haven't checked how the current implementation works. Do you use a
> pipe or something for the child to report back if something went
> wrong, or does the parent somehow check if the asked-for actions in
> the child will likely succeed?  If the former, doing setsid first, and
> then, if given, doing the tcsetpgrp call will fail as you say and this
> failure would be reported back to the caller. Then they know they've
> misused the API.

It's the first.  We use shared memory (the side effect of vfork) to
communicate errno to the original process.

Thanks,
Florian


  reply	other threads:[~2021-06-09  6:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-03 13:58 Godmar Back
2021-06-07 21:04 ` Adhemerval Zanella
2021-06-07 21:23   ` Godmar Back
2021-06-07 21:36     ` Adhemerval Zanella
2021-06-07 23:57       ` Godmar Back
2021-06-08 13:50         ` Adhemerval Zanella
2021-06-08 14:37           ` Godmar Back
2021-06-08 16:42             ` Adhemerval Zanella
2021-06-08 22:11               ` Godmar Back
2021-06-09  6:41                 ` Florian Weimer [this message]
2021-06-09 12:00                 ` Adhemerval Zanella
2021-06-09 13:12                   ` Godmar Back
2021-06-11 13:45                     ` Adhemerval Zanella
2021-06-11 23:58                       ` Godmar Back

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tum78rqs.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=libc-help@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).