Liste des Groupes | Revenir à cu programmer |
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?
Les messages affichés proviennent d'usenet.