News for hackers. Stuff that matters.
Re:Mkfile(8) is severely syscall limited on OS X by gwu78 on Sunday February 12, 2017 @01:00PM (#13629546)
While HN is discussing XNU sycalls, anyone know why the most fundamental of syscalls, execve, according to NeXT/Apple's post-UNIX wisdom needs to have an extra "char *apple[]" argument vector?

Not to imply that it is "hidden" but I am curious if any HN users know about this and understand its purpose?

Re:Mkfile(8) is severely syscall limited on OS X by msbarnett on Sunday February 12, 2017 @03:16PM (#13630460)
When in doubt, consult the source: https://github.com/opensource-apple/xnu/blob/53c5e2e62fc4182...

The upshot is that it looks like it constructs some non-env variable environment data on the program's stack after the posix environment.

The absolute path of the executable, followed by preemption free zone addresses, entropy, a configuration setting for malloc allocation strategy, and the address of the main thread's stack afaict.

Re:Mkfile(8) is severely syscall limited on OS X by seba_dos1 on Sunday February 12, 2017 @03:07PM (#13630397)