Ángel

@angel@triptico.com



curmudgeon / cascarrabias

Websitehttps://triptico.com
tilde.clubhttps://tilde.club/~angel/
Ann Hell Musichttps://exode.me/accounts/annhell
GPG KeyB498DDC28F4584FF
0 ★ 0 ↺

Ángel »
@angel@triptico.com

If you want to create an executable program in memory and execute it without going through the filesystem, this is how you do it (Linux only):

int fd = memfd_create("foo", MFD_CLOEXEC);
// write your image to fd however you want
fexecve(fd, argv, envp);
https://unix.stackexchange.com/questions/230472/can-i-exec-an-entirely-new-process-without-an-executable-file

History