From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12330 invoked from network); 9 Jan 2023 16:02:45 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 9 Jan 2023 16:02:45 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1673280165; b=Rf62SryA3jULEGaV2rexmX1vX4ETXxxtdKu4YRhcpvURZjKFAH82X/vya+CvaV4zgaXn3d9b7D qEZvSa2xfbkWBbP2Ebd5sw8I1973EfDm+IWC/GyrQXlTF/Lr3/mmLXx5crWwISKEwajQlyEhQ2 S3iKdQ6Ag9ro/CvI65sUolW0CnwZXRi1p8krzsRd7rJ4n9XWxZh6mqpwp1JY6jA2fWMQ8hlvZm Xn55qXS2Ut8k1zTDoOI1EQ5uskPKKvefbfqeqtReVRpZvhGkRqutObMVvVy/hS8fZ0ux8nC/en KYCfVj6RGtRHryjHOU1Wdi/Ac6XtMd0ymJh1MR+niK8GoA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f47.google.com) smtp.remote-ip=209.85.218.47; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1673280165; bh=/h5nf4n1QXwCNRx1BANchwoZx2Tu7gBh87mREJHA4nU=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=WM6uxcCgVq5VQaPwLQEBI4qRJ0MiZGIShRi/Jmw/cHz7Gt/EfE5ePHrXiAbPDv2pKDWXWGeB5n N/59+xpqxnTNUkoNJbcBXOGH/BjBjkBg5rqK0CnPvgKSjrr0k9uNAIWE/CfHD9IoP1ZX55MeXR Ku/yy0A6Hjc6oGUxLScDYs0nJ4NL8J3tERgFbK4yDSz3WbyxLb4g2Xwr/NuIlCJtQuVAbhM8Jx dlesXBUQnjWcI4IxtgB5FL0kXbYXoIjranrLPzLRGjkIfd3JX8KUACh1M+rIfTDfO8CIbLg9M+ xw71oekztHMW1ek0Bl7VLyHljkKsj1gJc46z6aJ6wG6zqw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=Y6JRVpREIklU8J/KEULvsDfKzsh1Lf+w7dBCxV8t4Ow=; b=AB5UD5pnfDqGvM7cEFG5niBWdl dJ2Xr6zQuxzrrEfa7pr6TLfc/uLY18nbvM76EVywxWYugTP3TauhH6RXtYp1c993h34h7PcPoo0Ye o6Q5LefDt7KriKY4KtRrc6nKy48E62Db9v/ZBU8LD138UzCThP/j1MViXG74io7lKFUgC/HfdFktn /2hHQSg1ZUwWhsaIFbrSYHwgqnT8DMHz8gvajakO8nTakquGmeysIqK6VLgsgDXxhq4Tz51TqDyNI qGDRIGTMeRjSUMFh1m5SAbNEnitVzQJGnZbw0mATxU75gFAo3UUgK4VsGqzTV1Yj47OlBvWcFrtja tAfk2ZaQ==; Received: by zero.zsh.org with local id 1pEubk-000KU2-4i; Mon, 09 Jan 2023 16:02:44 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f47.google.com) smtp.remote-ip=209.85.218.47; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-ej1-f47.google.com ([209.85.218.47]:45820) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pEuaj-000Jlg-GA; Mon, 09 Jan 2023 16:01:42 +0000 Received: by mail-ej1-f47.google.com with SMTP id fc4so21224857ejc.12 for ; Mon, 09 Jan 2023 08:01:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Y6JRVpREIklU8J/KEULvsDfKzsh1Lf+w7dBCxV8t4Ow=; b=Jsf8DWoHQYdNwdDSluv3HrrNnOVcSZH0YJiRfjYUiRNJXu22GB3POYrB1XA6/ENbI3 V/KUt7qQyN7ZICujPPHvBCivjMo+leQKmTJ9uqLR5V0ec5gQWCZOFIn6M6/+CdCMuzv5 PNMP4MLNb8T6ZCapuiqV1sXQfOLgR3YgbCDeYnb4nAHMNu3VMWNd7wl08Q9LrsTHLC73 2O2sOC279EYDRkTWLEDGKUlwE/ot38hkF4EXxH5KXson3V5gNOIV5us29bsu4RHPeiet QpZGKgOvluF7kNO47IVRuv4/HlJCI9NY2hS11ak7OThSX7btViCVm1tUHxDR03NPHzgS lB7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Y6JRVpREIklU8J/KEULvsDfKzsh1Lf+w7dBCxV8t4Ow=; b=N9X6iUXYITVg26d4RZfCpq0k/WA3m/SWBLVK/g1rOlbZGlq8eaSU7P9c0yN0P+JA5r 6gS2a7hlwT1d94mDJnpEkofxkW3isunaAU+kOdp+n8KiDwofwdk3ZKww3kTJMHm6+6et emRuTzERlwmBWgTZIDJTjJU4ti/o26akhqs8QX9Dgcw3vHVmeCNEXsCbS3kZ/E48SO/g 4PzDLhiAbqc7ziYFMwHqJGqKMwiEVClj3pHtgL5fA7fsQz2+izTQrhBrbchWBC/KCso4 a8fhd48JR8BPgvs9LLLgETs3p4oDWtNBQxPz5LnyKldd6oxftjA6KO3D8cu2mq63emqB y6SQ== X-Gm-Message-State: AFqh2koz5OoiVRSvZ1Fd8KmwKnDORr+SIfcSturJ6EfDviJfEDiD3mX7 T1l0zx6zy3BJyRYBydkMYg6RkDjcn2s/FAJ88gM= X-Google-Smtp-Source: AMrXdXuBo4N+oH50ccL2kvccJsw8brqGAVG5fHYfihgLPfaXBU+gLt/2ew8rlUr157wrXd9wkFGxmNKlIott75mDixI= X-Received: by 2002:a17:907:6e29:b0:7c0:f45e:22ff with SMTP id sd41-20020a1709076e2900b007c0f45e22ffmr8901231ejc.104.1673280100691; Mon, 09 Jan 2023 08:01:40 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Pier Paolo Grassi Date: Mon, 9 Jan 2023 17:01:04 +0100 Message-ID: Subject: Re: read with redirected stdin To: linuxtechguy@gmail.com Cc: zsh Content-Type: multipart/alternative; boundary="00000000000002f2ea05f1d6e2d8" X-Seq: 28634 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: --00000000000002f2ea05f1d6e2d8 Content-Type: text/plain; charset="UTF-8" hello Jim, your script reads the tty associated with the file descriptors, while I am looking for a way to get the tty controlling a certain process. I don't know much about this argument but it seems to me these are not necessarily the same. cheers Il giorno dom 8 gen 2023 alle 22:18 Jim ha scritto: > > On Sat, Jan 7, 2023 at 10:44 PM Pier Paolo Grassi > wrote: > >> Thanks, I'll check it out. >> >> Pier Paolo Grassi >> > > Not sure this is what you are looking for but in re-reading your original > email you mention > checking for pipes. The script I attached in the earlier email was > checking fd 0, so I also > tried checking fd 1. The results are as follows looking at my /proc. > > zstat +link /proc//fd/0 2>/dev/null > 25189 12199 17227 pts/40 man > 25198 25189 17227 pipe man > 25199 25189 17227 pipe less > zstat +link /proc//fd/1 2>/dev/null > 25189 12199 17227 pts/40 man > 25198 25189 17227 pipe man > 25199 25189 17227 pts/40 less > > Not sure if it will return what you are looking for in your case. The > script is also > collecting other info to output the above results. > > Regards, > > Jim > --00000000000002f2ea05f1d6e2d8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
hello Jim, your script reads the tty ass= ociated with the file descriptors, while I am looking for a way to get the = tty controlling a certain process. I don't know much about this argumen= t but it seems to me these are not necessarily=C2=A0the same.
che= ers

Il giorno dom 8 gen 2023 alle 22:18 Jim <linux.tech.guy@gmail.com= > ha scritto:

On Sat, Jan 7, 2023 at 10:44 PM Pier Pao= lo Grassi <pie= rpaolog@gmail.com> wrote:
Thanks, I'll check it out.

Pier Paolo Grassi

Not sure this i= s what you are looking for but in re-reading your original email you mentio= n
checking for pipes. The script I attached=C2=A0 in the earlier = email was checking fd 0, so I also
tried checking fd 1.=C2= =A0 The results are as follows looking at my /proc.=C2=A0
zstat +link /proc/<pid>/fd/0 2>/dev/null
25189 121= 99 17227 pts/40 =C2=A0man
25198 25189 17227 pipe =C2=A0 =C2=A0man
251= 99 25189 17227 pipe =C2=A0 =C2=A0less
zstat +link /proc/<pid>/fd/1= 2>/dev/null
25189 12199 17227 pts/40 =C2=A0man
25198 25189 17227 = pipe =C2=A0 =C2=A0man
25199 25189 17227 pts/40 =C2=A0less

=
Not sure if it will return what you are looking for in your case= . The script is also
collecting other info to output the above re= sults.

Regards,

Jim
--00000000000002f2ea05f1d6e2d8--