1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:27:35 +00:00

LibC: Make errno codes be #defines instead of enum values.

It turns out that a lot of 3rd party software does things like:

    #ifdef EINTR
        ...
    #endif

This won't work if EINTR is an enum. So much for that nice idea.
This commit is contained in:
Andreas Kling 2019-02-26 22:40:35 +01:00
parent 83e78648e4
commit 424368034b
4 changed files with 146 additions and 87 deletions

View file

@ -64,7 +64,9 @@ static void make_shell(int ptm_fd)
perror("ioctl(TIOCSCTTY)");
exit(1);
}
rc = execvp("/bin/sh", nullptr);
char* args[] = { "/bin/sh", nullptr };
char* envs[] = { "TERM=vt100", nullptr };
rc = execve("/bin/sh", args, envs);
if (rc < 0) {
perror("execve");
exit(1);