← Back to context

Comment by jart

5 years ago

I did the research and what we've accomplished here, while imperfect, is the best of all worlds solution. I like to think of it as an installer that takes a few microseconds, because it only needs to change 64 bytes. I've been considering adding a CLI flag where you can say ./foo.com --restore and it'll put the original 64 byte header back in place. Perhaps one day we can change the Linux, BSD, and XNU kernels so they can recognize the APE executable format. But until that happens we've got a great shell script hack that's now required by POSIX which is exceedingly fast and works on pretty much all systems stretching back decades.

Why didn't you copy to a tmpfs and overwrite that version instead?

Seems more likely to have installed programs on read-only media and a little tmpfs, instead of a writable binary and no tmpfs.

Do you have any information on some of the other strategies you researched?