system(gzip_cmd);
}
snprintf(cur_output_file,MAX_PATH_LEN,"%s.%d",fname,cur_epoch);
- if ((write_fd = open(cur_output_file, O_RDWR|O_CREAT|O_TRUNC)) < 0) {
+ if ((write_fd = open(cur_output_file, O_RDWR|O_CREAT|O_TRUNC,S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH)) < 0) {
my_log(LOG_ERR, "open(): %s (%s)\n", cur_output_file, strerror(errno));
exit(1);
}
setuser();
- //pthread_mutexattr_setprotocol(&md->MutexAttr,PTHREAD_PRIO_INHERIT);
-
for (;;) {
pthread_mutex_lock(&emit_mutex);
while (!flows_emit) {
timeout.tv_sec = now.tv_sec + emit_timeout;
/* Do not wait until emit_packet will filled - it may be too long */
if (pthread_cond_timedwait(&emit_cond, &emit_mutex, &timeout) && emit_count) {
- my_log(LOG_INFO,"Timeout: %d, %d",emit_count, timeout.tv_sec);
+ //my_log(LOG_INFO,"Timeout: %d, %d",emit_count, timeout.tv_sec);
pthread_mutex_unlock(&emit_mutex);
goto sendit;
}