Go to file
psykose 6f18958423 fix: phony rule 2022-08-12 15:15:18 +00:00
.gitignore feat: Initial commit 2022-08-11 13:58:15 +02:00
LICENSE feat: Initial commit 2022-08-11 13:58:15 +02:00
Makefile fix: phony rule 2022-08-12 15:15:18 +00:00
README.md feat: Initial commit 2022-08-11 13:58:15 +02:00
fdcreate.1 feat: Initial commit 2022-08-11 13:58:15 +02:00
fdcreate.c feat: remove stdio 2022-08-12 02:37:57 +02:00

README.md

fdcreate

create an anonymous file, then execute a program

usage

fdcreate name prog...

description

fdcreate creates an anonymous file (memfd) with memfd_create(3) and exports the resulting file descriptor as name, then exec(3)s into prog with its arguments.

examples

fdcreate tmate
importas -ui tmate_fd tmate
foreground {
  pipeline {
    curl -L https://github.com/tmate-io/tmate/releases/download/2.4.0/tmate-2.4.0-static-linux-amd64.tar.xz
  }
  fdmove -c 1 $tmate_fd  
  tar xOJf - tmate-2.4.0-static-linux-amd64/tmate
}
/proc/self/fd/$tmate_fd