1
vote
0answers
26 views

Why aren't the argv and envp arguments to execve pointers to const? [migrated]

Take e.g. execve(2), which according to posix has this prototype [1]: int execve(const char *path, char *const argv[], char *const envp[]); To me, it seems as if int execve(const char *path, const ...
9
votes
5answers
1k views

What is meant by “a system call” if not the implementation in the programing language?

I would like to understand the term "system call". I am familiar that system calls are used to get kernel services from a userspace application. The part i need clarification with is the difference ...
5
votes
3answers
379 views

Are there “esoteric” (weird) but standards-compliant C compilers or runtimes?

As we know, the C standard does not specify a lot of details of the implementation, for example value of NULL pointer, order of bits and bytes (endiannes), alignment in structs and of stack ...
4
votes
3answers
389 views

Why is there a type for process ids (pid_t), but not for file descriptors (fd)?

I see that pid_t is typedef'd in unistd.h, and file descriptors are defined to be int in fcntl.h. But since they are used in similar ways, wouldn't it make sense to have a typedef for file ...