Y
Hacker News
new
|
ask
|
show
|
jobs
by
mbrumlow
661 days 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 , … ).
1 comments
alerighi
660 days ago
Well, 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?
link
mbrumlow
660 days ago
I am mainly pointing out that arg[0] is still valid. Writing portable software is an entirely different topic.
link