2

Hello everyone I am currenlty working on creating a shell in c that can execute commands in the background, while allowing the user to contuine executing commands in the forground. Like how you can in Lniux. However, I don't want to the background process to run on the host shell, I want it to run my shell that I have made. So I know I can't use the execl function to do this. Would anyone know what kind of function I would need to do this? I know I need to create a fork to make a child and parent process. Once that is done I would execute the background command in the child and not call wait in the parent. But I don't know if there is a function I need for executing in the background or not.

Thank you for anyhelp!

1 Answer 1

1

The function you need is called exec... pretty much all other functions that execute other are wrappers for execve system call, possibly coupled with a fork before. But there is no other function in Linux to execute another program but the exec family.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.