1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00
sortix--sortix/utils/pwd.cpp

13 lines
217 B
C++
Raw Normal View History

2012-02-29 18:27:30 -05:00
#include <stdio.h>
#include <unistd.h>
int main(int argc, char* argv[])
{
const size_t WDSIZE = 4096;
char wd[WDSIZE];
if ( !getcwd(wd, WDSIZE) ) { perror("getcwd"); return 1; }
printf("%s\n", wd);
return 0;
}