aboutsummaryrefslogtreecommitdiff
path: root/pwd.c
blob: 13aeb060fb9a02e8128d30925e3ad5c7307e5725 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#include "pwd.h"

int main(void)
{
    char buf[PATH_MAX];
    if (getcwd(buf, sizeof(buf)) == NULL) {
        perror("getcwd");
        exit(EXIT_FAILURE);
    }
    fprintf(stdout, "%s\n", buf);
    exit(EXIT_SUCCESS);
}