mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 17:40:27 +00:00
ec1d16b307
It's implemented as a separate process. How cute is that. Tasks now have a current working directory. Spawned tasks inherit their parent task's working directory. Currently everyone just uses "/" as there's no way to chdir().
15 lines
268 B
C++
15 lines
268 B
C++
#include <LibC/unistd.h>
|
|
#include <LibC/stdio.h>
|
|
|
|
int main(int c, char** v)
|
|
{
|
|
char buffer[1024];
|
|
char* ptr = getcwd(buffer, sizeof(buffer));
|
|
if (!ptr) {
|
|
printf("getcwd() failed\n");
|
|
return 1;
|
|
}
|
|
printf("%s\n", ptr);
|
|
return 0;
|
|
}
|
|
|