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 29929 invoked from network); 9 Jan 2023 22:48:26 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 9 Jan 2023 22:48:26 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1673304506; b=IbQ+4hoqZfeV5vtzb55GcOqdx9l0geqW8jKcA/4Q4TJflfqUthXT9XjX34M7MBUaLKA0RatfPR z1ZWU2NHIhqyHRDJ6U6FRaKCFjGdrlz+TnCWPXLUV12+h7O8hVxJIBTzQYCzLpVwcZVGJKhZDW JfdzDRL/iFE16f997X5POkljWlFzM3NjWy2OsJPN2Nu+9zDWWkcU0H8lf/0duJ18nDAA8Z4OrG jOlvgL5zDp/7oFL2oCun2sb7ehHk10PnRhg0NJBfXaVRD35CtCn5D30h7wefPSmjdSqlFUj85K qCR7CXH3lS5MOamJ3uTqU9qPmXxzZzGnfcOWYnR2ZSm6RA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-pf1-f172.google.com) smtp.remote-ip=209.85.210.172; 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=1673304506; bh=V6eC1VtdAYGOQIgCw+57XqcoifAXtL3TrlwakKEh60Y=; 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:Reply-To: In-Reply-To:References:MIME-Version:DKIM-Signature:DKIM-Signature; b=BO7YOv82BPFv7579lSXUf5sY3FPa6Vxj0W2XF4Gp55beUAN6PlhmXHnYcegGaUluszjg8WpvQT Mhz29flOSprnvg6pAvuUwx27wsCWLupKBbEmGUpEpMpWwuvBtuBN53aqkGjqL+inHgwN5dstmc VAaSm21e7djFDxssWk4t7lMr62yJgbIpwf3/GmzuadNAOi3W5A1L8IMB2zGBsU9hKxDalckVgJ WDRmx3W54MBUjJw41Xb5z2vP1ki8hWvLPPBTInaIuWlbf7s2QLrkL9a7+JdQ4v/AzEEXRJc7nk FVB5ZfWfyWaXInkrxxjDcrPspZH6685cgEb9S47pVKpE1w==; 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:Reply-To:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=AMcza7klVrCKhqlYZzB8P1Yxkf05R+e7kzU3MUdMD2Q=; b=kPma5TxSEf594cQY0IeC/fDLVA N8PE5UiIrC25hI8frY8lNh83eBg2mG2i8G4JCuwyQQyh2w2bx7fBrtS2NBmVMI4uXwVLGiJZZyUwN tY/QF5psDZpvBkdQ30ALFOYz77nRkr5/iGVu22BvBcjTmQ7vRVzB+C8dJvFOb6iGnKuNA7vF5aaCp weoWnyTbsSNDamL4cxpx7mOtFKg5+4SJuvZMGKRUbnzDpOMS0APCSxFOrlZL05omNyzIQg+UKIb+X 0rx6SVfN89KJUkb70WAluk/rvNlyOXRrSEfr4im6PCawNSuRi/lalsrujRmZgbNrbVa4qbejXxktw uZWUZ9jw==; Received: by zero.zsh.org with local id 1pF0wL-00061O-5g; Mon, 09 Jan 2023 22:48:25 +0000 Authentication-Results: zsh.org; iprev=pass (mail-pf1-f172.google.com) smtp.remote-ip=209.85.210.172; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-pf1-f172.google.com ([209.85.210.172]:42879) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pF0vO-0005LF-4Y; Mon, 09 Jan 2023 22:47:26 +0000 Received: by mail-pf1-f172.google.com with SMTP id a184so7347731pfa.9 for ; Mon, 09 Jan 2023 14:47:26 -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:reply-to:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=AMcza7klVrCKhqlYZzB8P1Yxkf05R+e7kzU3MUdMD2Q=; b=UrEd/kaD1KnmNMUXCruzqK9M1NoBo6WFHKMtlN0wMPM6jY13uvjnqqz08l+babl4eN uQPC1m6nM/1Pe6msfYe1mm8xQ72R3lwkzqEyf61tCLq3uD1Hb2GIJde6PTr4YE3nQuSC mP3IL6Ah3EjDv5IqDNOrXNJx6QtU/uFyp9CiZwgspAh2b/iaBUE4lyTqddgwcjNEFVhF TNrgukI+ZBqFnrzlJwjBC+T/6ZPquFFA+SbtqnT+KIhat+O4euAT8TmLpjzGi1Fhxpfr ubApdsD3JJhYHB0yq2vpjEXw+EiXWY1OsMi9pyBI0BZsQX/tU9HR+74QmeSusjTg3Cx8 7yBw== 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:reply-to:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AMcza7klVrCKhqlYZzB8P1Yxkf05R+e7kzU3MUdMD2Q=; b=uX3DZigmWkWFfctWP5PfrevKASySrgAccnxDzGVkqhese6WaHYDp2vWulzhz4u6Zz1 t+LOUueaR7fNarDNfRUFem8QUXtSA6oFKp1pTLJEO4Zq8A9P4lj89uETyYn7QUTmapCZ JCgrUnCY6B6RYVXjqRwYBiut9OSwJ+myrWOqR384o/vobtLoTG04AJyTj56KLEeEgeR6 PuAD15pcnKaJdO1vqaj1RzCFR3B90ToMik7cyHiTBNIbQA4TQP6SMj16+VYkEnkE4/Fw G6b21pZ54+06JtwS0N6hCn7ezcehPnNHHi4saZC0SBt+UI0EbIp6nHxNphbxfXLzKLsi eM2Q== X-Gm-Message-State: AFqh2kryf/HwwDJQW2HC33k7EwOaMTgaHZZyLSkgTh/YX8LDCbZa54Zj msfwl3F6Fm4Gpzf7OiHr4AhjXAMVDwwTYA/4rGQ= X-Google-Smtp-Source: AMrXdXuT2Ju891f8lYGiiuWGcica7IAMkbtWKEOgDjlxhAbTUArWBNY61bWvFx1Mxavt5GUf3+gJk6eP+RxQJodfr9g= X-Received: by 2002:a05:6a02:101:b0:479:5160:3458 with SMTP id bg1-20020a056a02010100b0047951603458mr4020728pgb.439.1673304444078; Mon, 09 Jan 2023 14:47:24 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Reply-To: linuxtechguy@gmail.com From: Jim Date: Mon, 9 Jan 2023 16:47:08 -0600 Message-ID: Subject: Re: read with redirected stdin To: Pier Paolo Grassi Cc: zsh Content-Type: multipart/alternative; boundary="000000000000fd925005f1dc8c09" X-Seq: 28635 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: --000000000000fd925005f1dc8c09 Content-Type: text/plain; charset="UTF-8" Hi Pier, On Mon, Jan 9, 2023 at 10:01 AM Pier Paolo Grassi wrote: > 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 > Could you explain what you mean by " I am looking for a way to get the tty controlling a certain process". This seems backwards to me or am I misinterpreting what you said? 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. The read command, in several shells, supports this with the "-u N" option. Maybe I'm just looking at this from the wrong perspective(wouldn't be the first time). Regards, Jim --000000000000fd925005f1dc8c09 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

via file descriptors on Linux and Unix systems. The read command, in sev= eral shells,
supports this with the "-u N" option. Mayb= e I'm just looking at this from the wrong
perspective(wouldn&= #39;t=C2=A0 be the first time).

Regards,

Jim
--000000000000fd925005f1dc8c09--