Go to the source code of this file.
Defines | |
#define | DEBUG_TRACE(x) fprintf (stderr, x) |
#define | INT_MAX_CHAR 32 |
Maximum number of characters for an integer. | |
Functions | |
int | lock_file (int fd) |
Lock a file. | |
int | unlock_file (int fd) |
Unlock a file. | |
int | my_logger (char *file_name, char *buffer, int buffsize, char *format,...) |
Write data into the log file. | |
int | append_file_with_lock (char *src, char *dst) |
Append a file to another - The destination file is locked. |
Definition in file flock.c.
|
Append a file to another - The destination file is locked.
Definition at line 253 of file flock.c. References COPY_DST_CLOSE_ERROR, COPY_DST_OPEN_ERROR, COPY_IOBUFF_SIZE, COPY_LOCK_ERROR, COPY_OK, COPY_READ_ERROR, COPY_SRC_CLOSE_ERROR, COPY_SRC_OPEN_ERROR, COPY_STAT_ERROR, COPY_UNLOCK_ERROR, COPY_WRITE_ERROR, lock_file(), and unlock_file(). |
|
Lock a file.
Definition at line 15 of file flock.c. Referenced by append_file_with_lock(), and my_logger(). |
|
Write data into the log file.
Definition at line 105 of file flock.c. References INT_MAX_CHAR, lock_file(), LOG_BUFFER_OVERFLOW, LOG_CLOSE_ERROR, LOG_LOCK_ERROR, LOG_OK, LOG_OPEN_ERROR, LOG_WRITE_ERROR, and unlock_file(). |
|
Unlock a file.
Definition at line 53 of file flock.c. Referenced by append_file_with_lock(), and my_logger(). |