Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Looking at `man 3 exec', argv0 is controlled by the caller and has no connection to the actual name on the disk.


Well if you can call a syscall you don't need a named file. You can call execfd.

One case where I need an executable named temp file is when I need to pass that named file to another process which in turn will call that file (so I don't have control on how that other process will call exec)


> Well if you can call a syscall you don't need a named file. You can call execfd.

Sadly you can’t exec an fd on macOS.

I don’t think Apple is going to change that, because I think it causes difficulties for their security/codesigning/sandboxing infrastructure, and I think they don’t see the difficulty and risk of making it work with that as being worth the rather limited benefit




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: