Implement shell_exec() instead of exec()