blob: 0c0c69559172dc677d24b9546a93c2feeab23401 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include "pwd.h"
int main(void)
{
char buf[PATH_MAX];
if (getcwd(buf, PATH_MAX) == NULL) {
perror("getcwd");
exit(EXIT_FAILURE);
}
fprintf(stdout, "%s\n", buf);
exit(EXIT_SUCCESS);
}
|