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

Functions to get the process id (PID) of the current process. More...

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

Functions

pid_t ft_getpid (void)
 Retrieves the process id (PID) of the current process.
 

Detailed Description

Functions to get the process id (PID) of the current process.

Contains the functions to get the current process id (PID).

Function Documentation

◆ ft_getpid()

pid_t ft_getpid ( void  )

Retrieves the process id (PID) of the current process.

Retrieves the process id (PID) of the current process by reading the status file of the process.

Returns
The process id (PID) of the current process, or -1 on error.