LibC/Shell: set PWD env in Shell, not libc

I have no idea why I was doing it in the libc
This commit is contained in:
2025-04-19 21:09:55 +03:00
parent 2d19b5074e
commit 28275d86ea
3 changed files with 17 additions and 13 deletions

View File

@@ -28,6 +28,12 @@ int main(int argc, char** argv)
sigaction(SIGTTOU, &sa, nullptr);
}
{
char cwd_buffer[PATH_MAX];
if (getcwd(cwd_buffer, sizeof(cwd_buffer)))
setenv("PWD", cwd_buffer, 1);
}
Builtin::get().initialize();
for (int i = 1; i < argc; i++)