How to write to stdin from an executable process?

I am trying to execute an execve process that is being read from stdin. I want to prepare stdin with some data so that it can execute successfully. How can i do this?

+4
source share
1 answer

You will need to break the execve call into a child process and then create a pipe from the parent process to the child stdin.

Take a look at this link for a detailed example of how to use feeds: http://tldp.org/LDP/lpg/node11.html

+3
source

Source: https://habr.com/ru/post/1436482/


All Articles