zsh-users
 help / color / mirror / code / Atom feed
From: Pier Paolo Grassi <pierpaolog@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: linuxtechguy@gmail.com, zsh <zsh-users@zsh.org>
Subject: Re: read with redirected stdin
Date: Tue, 10 Jan 2023 07:03:33 +0100	[thread overview]
Message-ID: <CAP+y1xDQUV2HFvOp7uo7CB1+BGyYL=PWSmFVnTRk6dor3PJzTw@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7ZpTnYYZD7yzKr-5pk97Lao1prVSF5UDP7P=Lxd+zkmvA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1299 bytes --]

thanks Bart for this explanation and the solution, I wasn't so sure how to
explain what I was looking for because I was missing this mechanic.

Pier Paolo Grassi


Il giorno mar 10 gen 2023 alle ore 03:46 Bart Schaefer <
schaefer@brasslantern.com> ha scritto:

> On Mon, Jan 9, 2023 at 2:47 PM Jim <linux.tech.guy@gmail.com> wrote:
> >
> > I haven't seen anything that shows ttys pointing to a process. It may
> exist, but I don't
> > know where you would find it if it does. I just know that processes
> attach tty devices
> > via file descriptors on Linux and Unix systems.
>
> Although the foregoing is correct, once a process is attached to a tty
> the corresponding descriptor can be closed or duplicated without
> detaching the process from the tty again.  All descendants of that
> process form a "process group" (unless one of them explicitly takes
> over as a new "group leader") and all processes in a group are
> eligible to receive signals such as INT and QUIT and TSTP generated by
> the terminal (usually by keyboard interaction).
>
> So Pier wants to know what tty is associated with the current
> process's group, not what tty may be performing i/o with any of the
> currently open descriptors.  The simplest way to do that is to use the
> coreutils "tty" command:  tty < /dev/tty
>

[-- Attachment #2: Type: text/html, Size: 1964 bytes --]

  reply	other threads:[~2023-01-10  6:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-07 13:31 Pier Paolo Grassi
2023-01-07 13:44 ` Roman Perepelitsa
2023-01-07 17:21   ` Pier Paolo Grassi
2023-01-07 17:31     ` Roman Perepelitsa
2023-01-07 17:36       ` Pier Paolo Grassi
2023-01-07 17:52         ` Roman Perepelitsa
2023-01-08 13:23       ` Daniel Shahaf
2023-01-08 13:48         ` Roman Perepelitsa
2023-01-08 14:21           ` Daniel Shahaf
2023-01-08 14:42             ` Roman Perepelitsa
2023-01-07 17:33     ` Pier Paolo Grassi
2023-01-08  4:28     ` Jim
2023-01-08  4:44       ` Pier Paolo Grassi
2023-01-08 21:18         ` Jim
2023-01-09 16:01           ` Pier Paolo Grassi
2023-01-09 22:47             ` Jim
2023-01-10  2:46               ` Bart Schaefer
2023-01-10  6:03                 ` Pier Paolo Grassi [this message]
2023-01-08 14:44       ` Ray Andrews
2023-01-08 15:06         ` Roman Perepelitsa
2023-01-08 20:23           ` Ray Andrews

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='CAP+y1xDQUV2HFvOp7uo7CB1+BGyYL=PWSmFVnTRk6dor3PJzTw@mail.gmail.com' \
    --to=pierpaolog@gmail.com \
    --cc=linuxtechguy@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).