3 ms·
I think you forget the exec system call’s first argument is a path to an executable, followed by an array of arguments, where arg[0] lives. I can’t find issue
by mbrumlow 2y ago
I think you forget the exec system call’s first argument is a path to an executable, followed by an array of arguments, where arg[0] lives.
I can’t find issue with exec(“/proc/self/exe”, [ program , … ).
- alerighi 2y agoWell, it could be for example that /proc is not mounted. A lot of software breaks for this, while really there is no need for it to be so. Also that approach only works on Linux, if you want to write a portable software what you do?
- mbrumlow 2y agoI am mainly pointing out that arg[0] is still valid. Writing portable software is an entirely different topic.