Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
closefrom() in Solaris 11.4
Oracle Corporation SunOS 5.11 11.4 June 2019
solaris% cd /tmp
solaris% cat > closefrom.c
#include <stdlib.h>
int main() {
closefrom(3);
}
solaris% cc -o closefrom closefrom.c
solaris% truss -u :: ./closefrom
[...]
/1@1: -> libc:closefrom(0x3, 0x0)
/1@1: -> libc:fcntl(0x3, 0x36, 0xfe2f9d4c, 0xfe1b573d)
/1@1: -> libc:s_fcntl(0x3, 0x36, 0xfe2f9d4c, 0xfe289bce)
/1@1: -> libc:syscall(0x3e, 0x3, 0x36, 0xfe2f9d4c)
fcntl(3, F_CLOSEFROM) = 0
/1@1: <- libc:syscall() = 0
/1@1: <- libc:s_fcntl() = 0
/1@1: <- libc:fcntl() = 0
/1@1: <- libc:closefrom() = 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.