text: /**
    @brief Launch a program and wait for it to terminate.
    @param args Null terminated list of arguments (including program).
    @return Always returns 1, to continue execution.
   */
  int lsh_launch(char **args)
  {
    pid_t pid, wpid;
    int status;
  
    pid = fork();
    if (pid == 0) {
      // Child process
      if (execvp(args[0], args) == -1) {
        perror("lsh");
      }
      exit(EXIT_FAILURE);
    } else if (pid < 0) {
      // Error forking
      perror("lsh");
    } else {
      // Parent process
      do {
        wpid = waitpid(pid, &status, WUNTRACED);
      } while (!WIFEXITED(status) && !WIFSIGNALED(status));
    }
  
    return 1;
  }
  
  
  
  /**
     @brief Execute shell built-in or launch program.
     @param args Null terminated list of arguments.
     @return 1 if the shell should continue running, 0 if it should terminate
   */
  int shell_execute(char **args)
  {
    int i;
  
    if (args[0] == NULL) {
      // An empty command was entered.
      return 1;
    }
  
    for (i = 0; i < count_shell_number_builtins(); i++) {
      if (strcmp(args[0], shell_builtin_command_list[i]) == 0) {
        return (*shell_array_pointing_builtin_functions[i])(args); // Selects and executes from pointer list pointing to builtin functions
      }
    }
  
    return lsh_launch(args);
  }
  