syscall.sh / s390x / dup3

dup3

duplicate a file descriptor

sys_dup3(unsigned int oldfd, unsigned int newfd, int flags)
number326 (0x146)
abicommon
entry pointsys_dup3
sinceLinux 4.16
man pagedup3(2)
sourceelixir.bootlin.com

Registers

registervalue
r1326, the syscall number
r2unsigned int oldfd
r3unsigned int newfd
r4int flags
r2the return value

Then run svc 0 to enter the kernel.

Same syscall on other architectures

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