Problem

Write your own version of the Unix system function int mysystem(char *command) ; The...

Write your own version of the Unix system function

int mysystem(char *command) ;

The mysystem function executes command by invoking /bin/sh -c command, and then returns after command has completed. If command exits normally (by calling the exit function or executing a return statement), then mysystem returns the command exit status. For example, if command terminates by calling exit (8), then mysystem returns the value 8. Otherwise, if command terminates abnormally, then mysystem returns the status returned by the shell.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search