blob: a9999a16caff6be9023aebb9d5887c08fe213286 (
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, sizeof(buf)) == NULL) {
perror("getcwd");
exit(EXIT_FAILURE);
}
fprintf(stdout, "%s\n", buf);
exit(EXIT_SUCCESS);
}
|