I am using BSD style pty/tty pairs to implement running a sub shell. When the user exits the sub shell, how do I detect in the master process that this has occurred? I am using select(nfds, &read_fds, NULL, NULL, &timeout); with the master pty file descriptor set in the read_fds on the master side.
...
Hello,
I have now whittled this down to a minimal test case. Thus far I have been able to determine that this is an issue related to pseudo-terminals which come about with the pipe of ssh. Adding the '-t -t' to the ssh call improved things, in that now, it takes a second call to fgets() to cause the issue. I suspect that the stderr o...
I'm trying to write an app that can login to SSH with a password, by using pseudo terminals. But if I write() to the master device then the data somehow does not appear in the slave device. Here's a simple test case:
#include <sys/wait.h>
#include <sys/types.h>
#include <stdio.h>
#include <unistd.h>
#ifdef __linux__
#include <pty.h>...
I have a child process which runs in a pseudo terminal. The parent process does not run as root, but the child process does, through su or sudo. Because of this it is not possible to send a signal to the child process to force it to exit. I want to force it to exit by one of these means:
emulating a Ctrl-C.
emulating a terminal hangup....
I have a Linux process developed by a third-party that communicates with a terminal. For debugging I want to see the communication going back in forth.
One might think cat would do the trick (to see one direction):
./third-party-app &
cat /dev/tty
...but it does not. Rather, cat will steal half of the data intended for the ...
Having more than one process read from a serial device (/dev/ttyXX) makes it so that both processes can't get all of the data -- the data will be split between them in some way. I'd like to write a program that reads from a serial device, creates several master/slave pty pairs, and then allows programs that were made to read from the se...
Hello,
I am currently trying to send binary data out through pexpect. For some reason, the data gets through just find except for a 0x04, which is just skipped over. I tracked down the pexpect call to determine that all thats happening is an os.write() call to a file descriptor opened from a pty.fork() command.
Any ideas?
(example...
This is the un-redirected output (if you don't know what module is, it doesn't matter much):
$ module help null
----------- Module Specific Help for 'null' -----------------------
This module does absolutely nothing.
It's meant simply as a place holder in your
dot file initialization.
Version 3.2.6
S...