2018-03-27 07:09:12 +00:00
|
|
|
/*
|
2018-03-30 13:15:49 +00:00
|
|
|
| util.h from Lsyncd -- the Live (Mirror) Syncing Demon
|
2018-03-27 07:09:12 +00:00
|
|
|
|
|
2018-03-30 13:15:49 +00:00
|
|
|
| Small commonly used utils by Lsyncd.
|
2018-03-27 07:09:12 +00:00
|
|
|
|
|
|
|
|
| License: GPLv2 (see COPYING) or any later version
|
|
|
|
| Authors: Axel Kittenberger <axkibe@gmail.com>
|
|
|
|
*/
|
|
|
|
#ifndef LSYNCD_UTIL_H
|
|
|
|
#define LSYNCD_UTIL_H
|
|
|
|
|
2018-06-06 07:24:13 +00:00
|
|
|
|
2018-03-30 07:40:09 +00:00
|
|
|
// Returns the absolute path of a path.
|
|
|
|
// This is a wrapper to various C-Library differences.
|
2018-03-27 07:09:12 +00:00
|
|
|
extern char * get_realpath( char const * rpath );
|
|
|
|
|
2018-06-06 07:24:13 +00:00
|
|
|
|
2018-03-30 07:40:09 +00:00
|
|
|
// Sets the non-blocking flag on a file descriptor.
|
2018-03-27 07:09:12 +00:00
|
|
|
extern void non_block_fd( int fd );
|
|
|
|
|
2018-06-06 07:24:13 +00:00
|
|
|
|
2018-03-30 07:40:09 +00:00
|
|
|
// Sets the close-on-exit flag on a file descriptor.
|
2018-03-27 07:09:12 +00:00
|
|
|
extern void close_exec_fd( int fd );
|
|
|
|
|
2018-06-06 07:24:13 +00:00
|
|
|
|
2018-03-27 07:09:12 +00:00
|
|
|
#endif
|