Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > comp.unix.programmer > #16627
| From | Muttley@DastardlyHQ.org |
|---|---|
| Newsgroups | comp.unix.programmer |
| Subject | Re: Faking a TTY on a pipe/socketpair |
| Date | 2024-12-03 08:20 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <vimf13$3uoji$1@dont-email.me> (permalink) |
| References | <vh9vgr$5bb$1@dont-email.me> <jHw3P.41603$vLg2.41154@fx17.iad> |
On Tue, 03 Dec 2024 05:29:51 GMT rlhamil@smart.net (Richard L. Hamilton) wibbled: >In article <vh9vgr$5bb$1@dont-email.me>, > Muttley@dastardlyhq.com writes: >> There is a command line util (MacOS "say")* that I wish to use fork-exec'd >from >> my own program and send data to it via a socket created by socketpair(). >> Unfortunately "say" behaves differently depending on whether its stdin is >> attached to a tty or not (and there's no cmd line option to prevent this). >> With the former it'll speak after every newline, with the latter not until >it >> gets an EOF and I'd rather not do a fork-exec for each individual word or >> phrase that needs to be spoken. >> >> 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? >> >> * The MacOS speech API is Objective-C only and completely obtuse. >> >> ** Yes I know about the master-slave ptm,pts approach and I have done that >in >> the past but its complete overkill for this purpose. >> >> Thanks for any help >> >> > >Not on a Mac. Use "expect" which does the pts/pty stuff for you. > >(on a system where pipes are STREAMS based, it might be possible >to come up with a module that made a pipe pretend on one side to be a tty; >but you'd have to get into some nasty kernel coding to do that) I'm wondering on Linux if it would be enough on Linux to spoof ttyname() and isatty() using LD_PRELOAD. However it seems doing something similar on a Mac is the usual over complicated Apple hot mess.
Back to comp.unix.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
Faking a TTY on a pipe/socketpair Muttley@dastardlyhq.com - 2024-11-16 11:26 +0000
Re: Faking a TTY on a pipe/socketpair gazelle@shell.xmission.com (Kenny McCormack) - 2024-11-16 20:51 +0000
Re: Faking a TTY on a pipe/socketpair Muttley@DastartdlyHQ.org - 2024-11-17 08:41 +0000
Re: Faking a TTY on a pipe/socketpair Wolfgang Agnes <wagnes@example.com> - 2024-11-17 11:38 -0300
Re: Faking a TTY on a pipe/socketpair gazelle@shell.xmission.com (Kenny McCormack) - 2024-11-17 18:25 +0000
Re: Faking a TTY on a pipe/socketpair Muttley@DastartdlyHQ.org - 2024-11-17 18:41 +0000
Re: Faking a TTY on a pipe/socketpair Kaz Kylheku <643-408-1753@kylheku.com> - 2024-11-17 17:48 +0000
Re: Faking a TTY on a pipe/socketpair Muttley@DastartdlyHQ.org - 2024-11-17 18:39 +0000
Re: Faking a TTY on a pipe/socketpair Eric Pozharski <apple.universe@posteo.net> - 2024-11-18 07:54 +0000
Re: Faking a TTY on a pipe/socketpair scott@slp53.sl.home (Scott Lurndal) - 2024-11-18 14:02 +0000
Re: Faking a TTY on a pipe/socketpair Kaz Kylheku <643-408-1753@kylheku.com> - 2024-11-18 20:43 +0000
Re: Faking a TTY on a pipe/socketpair Eric Pozharski <apple.universe@posteo.net> - 2024-11-19 10:07 +0000
Re: Faking a TTY on a pipe/socketpair Janis Papanagnou <janis_papanagnou@hotmail.com> - 2024-11-18 03:38 +0100
Re: Faking a TTY on a pipe/socketpair Muttley@DastartdlyHQ.org - 2024-11-18 08:26 +0000
Re: Faking a TTY on a pipe/socketpair Richard Kettlewell <invalid@invalid.invalid> - 2024-11-18 09:51 +0000
Re: Faking a TTY on a pipe/socketpair Muttley@DastartdlyHQ.org - 2024-11-18 09:57 +0000
Re: Faking a TTY on a pipe/socketpair rlhamil@smart.net (Richard L. Hamilton) - 2024-12-03 05:29 +0000
Re: Faking a TTY on a pipe/socketpair Muttley@DastardlyHQ.org - 2024-12-03 08:20 +0000
Re: Faking a TTY on a pipe/socketpair Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-03 20:21 +0000
Re: Faking a TTY on a pipe/socketpair Muttley@DastardlyHQ.org - 2024-12-04 08:34 +0000
Re: Faking a TTY on a pipe/socketpair Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-05 02:11 +0000
Re: Faking a TTY on a pipe/socketpair gazelle@shell.xmission.com (Kenny McCormack) - 2024-12-05 06:44 +0000
Re: Faking a TTY on a pipe/socketpair cross@spitfire.i.gajendra.net (Dan Cross) - 2024-12-05 13:15 +0000
Re: Faking a TTY on a pipe/socketpair gazelle@shell.xmission.com (Kenny McCormack) - 2024-12-05 13:57 +0000
Re: Faking a TTY on a pipe/socketpair Muttley@DastardlyHQ.org - 2024-12-05 15:06 +0000
Re: Faking a TTY on a pipe/socketpair Nicolas George <nicolas$george@salle-s.org> - 2024-12-05 08:01 +0000
Re: Faking a TTY on a pipe/socketpair Muttley@DastardlyHQ.org - 2024-12-05 08:19 +0000
Re: Faking a TTY on a pipe/socketpair Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-05 20:45 +0000
Re: Faking a TTY on a pipe/socketpair scott@slp53.sl.home (Scott Lurndal) - 2024-12-05 21:06 +0000
Re: Faking a TTY on a pipe/socketpair Muttley@DastardlyHQ.org - 2024-12-06 10:28 +0000
Re: Faking a TTY on a pipe/socketpair Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-06 20:00 +0000
Re: Faking a TTY on a pipe/socketpair John Ames <commodorejohn@gmail.com> - 2024-12-06 12:37 -0800
Re: Faking a TTY on a pipe/socketpair scott@slp53.sl.home (Scott Lurndal) - 2024-12-06 22:15 +0000
Re: Faking a TTY on a pipe/socketpair Muttley@dastardlyhq.com - 2024-12-07 10:04 +0000
Windows-think and systemd (Was: Something completely unrelated to what we're yapping about now) gazelle@shell.xmission.com (Kenny McCormack) - 2024-12-07 15:00 +0000
Re: Windows-think and systemd (Was: Something completely unrelated to what we're yapping about now) Muttley@dastardlyhq.com - 2024-12-07 16:05 +0000
Re: Windows-think and systemd (Was: Something completely unrelated to what we're yapping about now) rlhamil@smart.net (Richard L. Hamilton) - 2024-12-14 09:09 +0000
AIX (was Re: Windows-think and systemd) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-14 12:24 +0100
Re: Windows-think and systemd (Was: Something completely unrelated to what we're yapping about now) Kaz Kylheku <643-408-1753@kylheku.com> - 2024-12-08 03:51 +0000
Re: Windows-think and systemd (Was: Something completely unrelated to what we're yapping about now) Jim Jackson <jj@franjam.org.uk> - 2024-12-09 20:38 +0000
Re: Faking a TTY on a pipe/socketpair Rainer Weikusat <rweikusat@talktalk.net> - 2024-12-09 16:24 +0000
Re: Faking a TTY on a pipe/socketpair rlhamil@smart.net (Richard L. Hamilton) - 2024-12-14 09:06 +0000
Re: Faking a TTY on a pipe/socketpair Rainer Weikusat <rweikusat@talktalk.net> - 2024-12-06 17:01 +0000
Re: Faking a TTY on a pipe/socketpair Jim Jackson <jj@franjam.org.uk> - 2024-12-09 20:28 +0000
Re: Faking a TTY on a pipe/socketpair Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-10 01:27 +0000
Re: Faking a TTY on a pipe/socketpair Rainer Weikusat <rweikusat@talktalk.net> - 2024-12-10 21:01 +0000
Re: Faking a TTY on a pipe/socketpair Richard Kettlewell <invalid@invalid.invalid> - 2024-12-10 08:50 +0000
Re: Faking a TTY on a pipe/socketpair Muttley@DastardlyHQ.org - 2024-12-10 09:23 +0000
Re: Faking a TTY on a pipe/socketpair Jim Jackson <jj@franjam.org.uk> - 2024-12-10 12:26 +0000
Re: Faking a TTY on a pipe/socketpair Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-10 20:55 +0000
Re: Faking a TTY on a pipe/socketpair Rainer Weikusat <rweikusat@talktalk.net> - 2024-12-10 22:02 +0000
Re: Faking a TTY on a pipe/socketpair Muttley@DastardlyHQ.org - 2024-12-11 08:33 +0000
Re: Faking a TTY on a pipe/socketpair Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-11 22:26 +0000
Re: Faking a TTY on a pipe/socketpair Jim Jackson <jj@franjam.org.uk> - 2024-12-11 22:40 +0000
Re: Faking a TTY on a pipe/socketpair Nicolas George <nicolas$george@salle-s.org> - 2024-12-11 23:34 +0000
Re: Faking a TTY on a pipe/socketpair Alexis <flexibeast@gmail.com> - 2024-12-12 19:15 +1100
Re: Faking a TTY on a pipe/socketpair Nicolas George <nicolas$george@salle-s.org> - 2024-12-12 11:46 +0000
Re: Faking a TTY on a pipe/socketpair Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-12 08:27 +0000
Re: Faking a TTY on a pipe/socketpair Muttley@DastardlyHQ.org - 2024-12-12 09:38 +0000
Re: Faking a TTY on a pipe/socketpair Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-12 22:24 +0000
Re: Faking a TTY on a pipe/socketpair Jim Jackson <jj@franjam.org.uk> - 2024-12-13 20:07 +0000
Re: Faking a TTY on a pipe/socketpair Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-13 22:05 +0000
Re: Faking a TTY on a pipe/socketpair Jim Jackson <jj@franjam.org.uk> - 2024-12-14 15:20 +0000
Re: Faking a TTY on a pipe/socketpair Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-14 22:26 +0000
Re: Faking a TTY on a pipe/socketpair Jim Jackson <jj@franjam.org.uk> - 2024-12-16 23:03 +0000
Re: Faking a TTY on a pipe/socketpair Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-17 02:39 +0000
Re: Faking a TTY on a pipe/socketpair Jim Jackson <jj@franjam.org.uk> - 2024-12-18 21:19 +0000
Re: Faking a TTY on a pipe/socketpair scott@slp53.sl.home (Scott Lurndal) - 2024-12-18 22:16 +0000
Re: Faking a TTY on a pipe/socketpair Jim Jackson <jj@franjam.org.uk> - 2024-12-18 22:25 +0000
Re: Faking a TTY on a pipe/socketpair Muttley@DastardlyHQ.org - 2024-12-12 08:39 +0000
Re: Faking a TTY on a pipe/socketpair Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-12 22:31 +0000
Re: Faking a TTY on a pipe/socketpair Muttley@DastardlyHQ.org - 2024-12-13 10:38 +0000
Re: Faking a TTY on a pipe/socketpair John Ames <commodorejohn@gmail.com> - 2024-12-13 07:42 -0800
Re: Faking a TTY on a pipe/socketpair Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-14 01:35 +0000
Re: Faking a TTY on a pipe/socketpair Rainer Weikusat <rweikusat@talktalk.net> - 2024-12-14 20:16 +0000
Re: Faking a TTY on a pipe/socketpair Muttley@dastardlyhq.com - 2024-12-15 12:43 +0000
Re: Faking a TTY on a pipe/socketpair Rainer Weikusat <rweikusat@talktalk.net> - 2024-12-15 21:25 +0000
Re: Faking a TTY on a pipe/socketpair Muttley@DastardlyHQ.org - 2024-12-16 08:16 +0000
Re: Faking a TTY on a pipe/socketpair Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-16 19:51 +0000
Re: Faking a TTY on a pipe/socketpair Muttley@DastardlyHQ.org - 2024-12-17 08:34 +0000
Re: Faking a TTY on a pipe/socketpair Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-17 19:44 +0000
Re: Faking a TTY on a pipe/socketpair Rainer Weikusat <rweikusat@talktalk.net> - 2024-12-17 17:27 +0000
Re: Faking a TTY on a pipe/socketpair John Ames <commodorejohn@gmail.com> - 2024-12-16 07:55 -0800
Re: Faking a TTY on a pipe/socketpair Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-16 20:15 +0000
Re: Faking a TTY on a pipe/socketpair John Ames <commodorejohn@gmail.com> - 2024-12-16 12:44 -0800
Re: Faking a TTY on a pipe/socketpair Jim Jackson <jj@franjam.org.uk> - 2024-12-16 23:07 +0000
Re: Faking a TTY on a pipe/socketpair Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-17 02:37 +0000
Re: Faking a TTY on a pipe/socketpair Muttley@DastardlyHQ.org - 2024-12-17 08:35 +0000
Re: Faking a TTY on a pipe/socketpair Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-17 19:45 +0000
Re: Faking a TTY on a pipe/socketpair Richard Kettlewell <invalid@invalid.invalid> - 2024-12-17 19:48 +0000
Re: Faking a TTY on a pipe/socketpair Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-17 20:45 +0000
Re: Faking a TTY on a pipe/socketpair gazelle@shell.xmission.com (Kenny McCormack) - 2024-12-17 22:00 +0000
Re: Faking a TTY on a pipe/socketpair Rainer Weikusat <rweikusat@talktalk.net> - 2024-12-17 20:54 +0000
Re: Faking a TTY on a pipe/socketpair Rainer Weikusat <rweikusat@talktalk.net> - 2024-12-17 17:28 +0000
Re: Faking a TTY on a pipe/socketpair Muttley@dastardlyhq.com - 2024-12-14 10:05 +0000
Re: Faking a TTY on a pipe/socketpair Rainer Weikusat <rweikusat@talktalk.net> - 2024-12-13 11:42 +0000
Re: Faking a TTY on a pipe/socketpair Jim Jackson <jj@franjam.org.uk> - 2024-12-13 20:15 +0000
Re: Faking a TTY on a pipe/socketpair rlhamil@smart.net (Richard L. Hamilton) - 2024-12-14 08:52 +0000
Re: Faking a TTY on a pipe/socketpair Muttley@dastardlyhq.com - 2024-12-14 10:09 +0000
Re: Faking a TTY on a pipe/socketpair Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-14 22:28 +0000
Re: Faking a TTY on a pipe/socketpair Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-05 20:46 +0000
Re: Faking a TTY on a pipe/socketpair rlhamil@smart.net (Richard L. Hamilton) - 2024-12-14 08:48 +0000
Re: Faking a TTY on a pipe/socketpair Muttley@dastardlyhq.com - 2024-12-14 10:06 +0000
macOS and UNIX conformance (was: Faking a TTY on a pipe/socketpair) Geoff Clare <geoff@clare.See-My-Signature.invalid> - 2024-12-16 14:05 +0000
Re: Faking a TTY on a pipe/socketpair Richard Kettlewell <invalid@invalid.invalid> - 2024-12-03 08:38 +0000
Re: Faking a TTY on a pipe/socketpair scott@slp53.sl.home (Scott Lurndal) - 2024-12-03 14:22 +0000
csiph-web