minishell
Minishell Project for École 42
Loading...
Searching...
No Matches
handle_single_child.c File Reference

Process Handling Functions for a single command. More...

#include "minishell.h"
Include dependency graph for handle_single_child.c:

Functions

void handle_single_child (t_shell *shell)
 Process creation for execution of non-builtin command.
 

Detailed Description

Process Handling Functions for a single command.

This file contains functions responsible for running a single non-builtin command. It is split in the child/parent handler, executing the command, returning the error status from the child to the parents process and updating the last executable in the parent process.

Function Documentation

◆ handle_single_child()

void handle_single_child ( t_shell shell)

Process creation for execution of non-builtin command.

The handle_single_child function creates a child process and executes a non-built-in command in the child process. It waits for the child process to complete and updates the environment variable "_=".

Parameters
[in,out]shellA pointer to the shell struct.