maxishell
Implementation of a shell for Linux-like systems
Loading...
Searching...
No Matches
pwd.c File Reference
#include "shell.h"
#include <unistd.h>
#include "libft.h"
#include <stdio.h>
#include "exit_status.h"
Include dependency graph for pwd.c:

Go to the source code of this file.

Functions

int builtin_pwd (t_ms_data *data)
 

Function Documentation

◆ builtin_pwd()

int builtin_pwd ( t_ms_data data)

Definition at line 24 of file pwd.c.

25{
26 char cwd[4096];
27
28 (void)data;
29 if (getcwd(cwd, sizeof(cwd)) != NULL)
30 ft_putendl_fd(cwd, STDOUT_FILENO);
31 return (EXIT_SUCCESS);
32}
#define EXIT_SUCCESS
Definition exit_status.h:16
void ft_putendl_fd(char *s, int fd)

References EXIT_SUCCESS, and ft_putendl_fd().

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function: