summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/file_list.c5
-rw-r--r--src/file_list.h3
-rw-r--r--src/writer.c5
3 files changed, 9 insertions, 4 deletions
diff --git a/src/file_list.c b/src/file_list.c
index c2027a0..ea176ab 100644
--- a/src/file_list.c
+++ b/src/file_list.c
@@ -139,6 +139,11 @@ int file_list_call_post_process(file_list_t* list, int fd)
return 0;
}
+int file_list_waitpid(file_list_t* list)
+{
+ return 0;
+}
+
int open_file(file_t* file)
{
if(!file || file->fd_ > 0) // file already open!
diff --git a/src/file_list.h b/src/file_list.h
index 4415f12..5dd30d1 100644
--- a/src/file_list.h
+++ b/src/file_list.h
@@ -51,8 +51,9 @@ typedef struct file_list_struct file_list_t;
int file_list_init(file_list_t* list);
void file_list_clear(file_list_t* list);
file_t* file_list_add(file_list_t* list, struct tm* time, const char* type, const char* format, const char* dir, mode_t mode);
-int file_list_call_post_process(file_list_t* list, int fd);
int file_list_remove(file_list_t* list, int fd);
+int file_list_call_post_process(file_list_t* list, int fd);
+int file_list_waitpid(file_list_t* list);
int open_file(file_t* file);
#endif
diff --git a/src/writer.c b/src/writer.c
index f5ce2d9..6fb723d 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -169,8 +169,6 @@ static int check_boundaries(writer_t* writer)
writer->next_ = file_list_add(&(writer->files_), &bd_time, "next", writer->name_format_, writer->output_dir_, writer->mode_);
if(writer->next_ == NULL) return -2;
-
- // TODO: waitpid for post processing scripts and remove file after it has finished
}
return 0;
@@ -192,7 +190,8 @@ static gpointer writer_thread_func(gpointer data)
int ret = check_boundaries(writer);
if(ret) break;
- // TODO: children handling (waitpid)
+ ret = file_list_waitpid(&(writer->files_));
+ if(ret) break;
}
log_printf(NOTICE, "writer thread stopped");