by pm215 · 4mo ago · 0 comments
glibc is what deals with PATH, not the shell. On Linux, it's execvp(3) in libc which is implemented in terms of execve(2) in the kernel, but POSIX doesn't make a distinction between syscalls and library functions, so a kernel could implement either or none directly.
$ python3 -c 'print("hi")'
hi
$ hash
hits command
1 /usr/bin/python3