syscall.sh / x64 / dup3

dup3

duplicate a file descriptor

sys_dup3(unsigned int oldfd, unsigned int newfd, int flags)
number292 (0x124)
abicommon
entry pointsys_dup3
sinceLinux 3.3
man pagedup3(2)
sourceelixir.bootlin.com

Registers

registervalue
rax292, the syscall number
rdiunsigned int oldfd
rsiunsigned int newfd
rdxint flags
raxthe return value

Then run syscall to enter the kernel.

Same syscall on other architectures

Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/dup3