Closed Coekjan closed 2 months ago
Many programs (e.g. busybox, ex, bash) can have different behaviors on different
argv[0]
. We should only resolve theargv[0]
(program name) to its absolute path but not realpath, i.e. don't resolve the symlinks.
Ok, I agree. But I'm afraid making the change here will have some side effect on other things. This function is used in many places, not just arg[0] resolution.
Ok, I agree. But I'm afraid making the change here will have some side effect on other things. This function is used in many places, not just arg[0] resolution.
Maybe we can have a "soft" version of ResolveFile
? Like ResolveFileSoft
, indicating that it does not resolve symlinks.
Ok, I agree. But I'm afraid making the change here will have some side effect on other things. This function is used in many places, not just arg[0] resolution.
Maybe we can have a "soft" version of
ResolveFile
? LikeResolveFileSoft
, indicating that it does not resolve symlinks.
Yeah, that would limit side-effect I think.
Yeah, that would limit side-effect I think.
Done :) Please review the changes.
Ok, looks good now, thanks.
Many programs (e.g. busybox, ex, bash) can have different behaviors on different
argv[0]
. We should only resolve theargv[0]
(program name) to its absolute path but not realpath, i.e. don't resolve the symlinks.