Quantcast
Channel: Active questions tagged expect - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 158

Waiting until an application is reading (over a TTY)

$
0
0

I'm writing an expect-style program to interact with a command-line application on Linux. Is there any way that my program can know when the application on the other side of the PTY tries to perform a read over it?

Ideally, this would be possible without knowing what processes are running on the other side of the PTY (or with only knowledge of the process group). Polling the state of the ptmx file descriptor doesn't work, since I'm always able to write to it, even if that write will be buffered internally by the kernel.


Viewing all articles
Browse latest Browse all 158

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>