Liste des Groupes | Revenir à cu programmer |
On 2024-11-16, Muttley@dastardlyhq.com <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?** Yes I know about the master-slave ptm,pts approach and I have done thatinthe past but its complete overkill for this purpose.>
No; you need a master/slave pseudo TTY pair connected to an active
process, which forwards between that and the socketpair or pipe.
Sockets and pipes cannot be given window dressing so that they look
like tty's. When the standard input (or output) of a process is a tty,
and that process cares about it, it will likely try operations like
tcgetattr.
Les messages affichés proviennent d'usenet.