| Deutsch English Français Italiano |
|
<87a5dysz6j.fsf@example.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Wolfgang Agnes <wagnes@example.com> Newsgroups: comp.unix.programmer Subject: Re: Faking a TTY on a pipe/socketpair Date: Sun, 17 Nov 2024 11:38:28 -0300 Organization: A noiseless patient Spider Lines: 26 Message-ID: <87a5dysz6j.fsf@example.com> References: <vh9vgr$5bb$1@dont-email.me> <vhb0kg$ih4k$1@news.xmission.com> <vhca72$i0nn$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Sun, 17 Nov 2024 15:38:28 +0100 (CET) Injection-Info: dont-email.me; posting-host="c039ffefe384255c105052bd57429333"; logging-data="725476"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/DFbUk9/bNzwFhxOAc42yW1+bg7GII9WI=" Cancel-Lock: sha1:VrwB0NbYHIhtMFoE3rBRCwrhJyM= sha1:SNcXeI3qHoF+7GlObl8dqha7uPA= Bytes: 2150 Muttley@DastartdlyHQ.org writes: > On Sat, 16 Nov 2024 20:51:28 -0000 (UTC) > gazelle@shell.xmission.com (Kenny McCormack) boring babbled: >>In article <vh9vgr$5bb$1@dont-email.me>, <Muttley@dastardlyhq.com> wrote: >>>So my question is - is there a way to set up a pipe or socketpair** so that >>>it appears to be a tty from the exec'd programs point of view, eg ttyname() >>>returns non null? >> >>I think the short answer to your question is: No. >> >>There's no way to directly do what you want in a clean way. >> >>Thus, all we have is kludgey workarounds. And I'm sure you've got plenty >>of your own kludgey workarounds; you don't need any more from me. >> >>That said, if was me, I'd use Expect. A few lines of Expect would do it, >>such that I could send text to the process and the process would think they >>were coming from a tty. In fact, if you don't want to learn Expect (i.e., >>Tcl) just for this project, I think just using "unbuffer -p" (unbuffer is a >>program that comes with the Expect distribution) would do it for you. > > Hmm, both sound pretty kludgey too tbh. As for Tcl , thats a blast from the > past. Does anyone really still use it? Hey, software doesn't dusty.