GDBserver
Functions
filestuff.h File Reference

Go to the source code of this file.

Functions

void notice_open_fds (void)
 
void mark_fd_no_cloexec (int fd)
 
void unmark_fd_no_cloexec (int fd)
 
void close_most_fds (void)
 
int gdb_open_cloexec (const char *filename, int flags, unsigned long mode)
 
FILE * gdb_fopen_cloexec (const char *filename, const char *opentype)
 
int gdb_socketpair_cloexec (int domain, int style, int protocol, int filedes[2])
 
int gdb_socket_cloexec (int domain, int style, int protocol)
 
int gdb_pipe_cloexec (int filedes[2])
 
struct cleanupmake_cleanup_close (int fd)
 

Function Documentation

void close_most_fds ( void  )

Definition at line 224 of file filestuff.c.

References do_close(), and fdwalk().

Referenced by linux_create_inferior(), lynx_create_inferior(), and spu_create_inferior().

FILE* gdb_fopen_cloexec ( const char *  filename,
const char *  opentype 
)
int gdb_open_cloexec ( const char *  filename,
int  flags,
unsigned long  mode 
)

Definition at line 291 of file filestuff.c.

References maybe_mark_cloexec(), and O_CLOEXEC.

Referenced by linux_mntns_access_fs(), linux_mntns_open_cloexec(), and mnsh_handle_open().

int gdb_pipe_cloexec ( int  filedes[2])

Definition at line 381 of file filestuff.c.

References _, gdb_assert_not_reached, mark_cloexec(), maybe_mark_cloexec(), and O_CLOEXEC.

int gdb_socket_cloexec ( int  domain,
int  style,
int  protocol 
)

Referenced by gdb_connect_sync_socket().

int gdb_socketpair_cloexec ( int  domain,
int  style,
int  protocol,
int  filedes[2] 
)

Referenced by linux_mntns_get_helper().

struct cleanup* make_cleanup_close ( int  fd)

Definition at line 421 of file filestuff.c.

References do_close_cleanup(), make_cleanup_dtor(), xfree(), and xmalloc().

Referenced by linux_mntns_access_fs().

void mark_fd_no_cloexec ( int  fd)

Definition at line 176 of file filestuff.c.

void notice_open_fds ( void  )

Definition at line 168 of file filestuff.c.

References fdwalk().

Referenced by captured_main().

void unmark_fd_no_cloexec ( int  fd)

Definition at line 184 of file filestuff.c.

References _, gdb_assert_not_reached, open_fds, VEC_iterate, and VEC_unordered_remove.