scclib
Stable Cloud Computing C++ Library
Functions

Signal-safe C library wrapper. More...

#include <cstdio>
#include <sys/types.h>
Include dependency graph for safe_clib.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int scc::util::safe_close (int fd)
 Signal safe close.
 
int scc::util::safe_close_throw (int fd)
 Signal safe close, throws system_error on error.
 
ssize_t scc::util::safe_read (int fd, void *buf, size_t count)
 Signal safe read.
 
ssize_t scc::util::safe_read_throw (int fd, void *buf, size_t count)
 Signal safe read, throws system_error on error.
 
ssize_t scc::util::safe_write (int fd, const void *buf, size_t count)
 Signal safe write.
 
ssize_t scc::util::safe_write_throw (int fd, const void *buf, size_t count)
 Signal safe write, throws system_error on error.
 
int scc::util::safe_dup (int oldfd)
 Signal safe dup.
 
int scc::util::safe_dup_throw (int oldfd)
 Signal safe dup, throws system_error on error.
 
int scc::util::safe_dup2 (int oldfd, int newfd)
 Signal safe dup2.
 
int scc::util::safe_dup2_throw (int oldfd, int newfd)
 Signal safe dup2, throws system_error on error.
 
int scc::util::safe_open (const char *pathname, int flags)
 Signal safe open.
 
int scc::util::safe_open (const char *pathname, int flags, mode_t mode)
 Signal safe open.
 
int scc::util::safe_open_throw (const char *pathname, int flags)
 Signal safe open, throws system_error on error.
 
int scc::util::safe_open_throw (const char *pathname, int flags, mode_t mode)
 Signal safe open, throws system_error on error.
 
FILE * scc::util::safe_fopen (const char *pathname, const char *mode)
 Signal safe fopen.
 
FILE * scc::util::safe_fopen_throw (const char *pathname, const char *mode)
 Signal safe fopen, throws system_error on error.
 
int scc::util::safe_fclose (FILE *stream)
 Signal safe fclose.
 
int scc::util::safe_fclose_throw (FILE *stream)
 Signal safe fclose, throws system_error on error.
 
int scc::util::safe_fscanf (FILE *stream, const char *format,...)
 Signal safe fscanf.
 
int scc::util::safe_fscanf_throw (FILE *stream, const char *format,...)
 Signal safe fscanf, throw on error.
 
ssize_t scc::util::safe_getline (char **lineptr, size_t *n, FILE *stream)
 Signal safe getline.
 
ssize_t scc::util::safe_getline_throw (char **lineptr, size_t *n, FILE *stream)
 Signal safe getline, throw on error.
 
int scc::util::safe_truncate (const char *path, off_t length)
 Signal safe truncate.
 
int scc::util::safe_truncate_throw (const char *path, off_t length)
 Signal safe truncate, throw on error.
 
int scc::util::safe_ftruncate (int fd, off_t length)
 Signal safe ftruncate.
 
int scc::util::safe_ftruncate_throw (int fd, off_t length)
 Signal safe ftruncate, throw on error.
 
int scc::util::safe_wait (int *wstatus)
 Signal safe wait.
 
int scc::util::safe_waitpid (pid_t pid, int *wstatus, int options)
 Signal safe waitpid.
 
int scc::util::safe_wait_throw (int *wstatus)
 Signal safe wait, throws system_error on error.
 
int scc::util::safe_waitpid_throw (pid_t pid, int *wstatus, int options)
 Signal safe waitpid, throws system_error on error.
 

Detailed Description

Signal-safe C library wrapper.

Definition in file safe_clib.h.