1

i am trying to create a shell that get it's commands via socket/pipe and returned the stderr and stdout to the same/ different pip/socket. i don't want to use exec becase i want to allow action such as cd (change directory) that have to be interactive

4
  • 1
    cd doesn't have to be used interactively. By interactive, do you mean that a prompt would have to be issued for instance? Would you expect job control (which needs a terminal device) to work as well? Commented Mar 20, 2018 at 14:00
  • i mean that the exact shell such as sh will work just i will redirect stdin from keyboard to pipe/socket kind of like ssh work's Commented Mar 20, 2018 at 14:05
  • "interaction n 1: a mutual or reciprocal action", usually in the computing sense interactive means something that's used directly by the user: the user enters one command, gets a reply, then enters another, as opposed to something that works without "human supervision". But that doesn't explain why and how you explicitly want a pipe. Where do the commands you run come from in the end? Does it have to be specifically a pipe? What's the big picture here, what are you trying to achieve in the end?
    – ilkkachu
    Commented Mar 20, 2018 at 14:07
  • i am connected to a remote device via ssh, the remote device have process that control the entire device(hosted by Ubuntu) .i want to send via ssh the commands to this process, this process will pipe the command to shell (sh) and it will return me with the input. and the remote will have the same felling such as in serial terminal. Commented Mar 20, 2018 at 14:10

0

You must log in to answer this question.

Browse other questions tagged .