I’m trying to execve a process that reads from stdin. I want to prepare stdin with some data so it can execute successfully. How can I do that?
I’m trying to execve a process that reads from stdin. I want to prepare
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You will need to fork the execve call into a child process and then create a pipe from the parent process to the child’s stdin.
Take a look at this link for a detailed example on how to use pipes: http://tldp.org/LDP/lpg/node11.html