v1.4.t7
the fifo file for stat output doesn't work. switched back regular file for stats.
This commit is contained in:
parent
1e72107ff0
commit
42814ab8ca
|
@ -262,8 +262,6 @@ bool rdConf(shared_t *share)
|
|||
remove_all(share->buffDir.c_str());
|
||||
|
||||
share->init = false;
|
||||
|
||||
new thread(statFifo, share);
|
||||
}
|
||||
|
||||
new thread(enforceMaxDays, share);
|
||||
|
@ -336,24 +334,13 @@ string parseForParam(const string &arg, int argc, char** argv, bool argOnly)
|
|||
return string();
|
||||
}
|
||||
|
||||
void statFifo(shared_t *share)
|
||||
void statOut(shared_t *share)
|
||||
{
|
||||
createDirTree(cleanDir(share->buffDir));
|
||||
|
||||
auto path = string(cleanDir(share->buffDir) + "/stat");
|
||||
auto newLine = string("\n");
|
||||
|
||||
if (!fileExists(path))
|
||||
{
|
||||
mkfifo(path.c_str(), 0666);
|
||||
}
|
||||
|
||||
while (true)
|
||||
{
|
||||
auto fd = open(path.c_str(), O_WRONLY);
|
||||
|
||||
write(fd, newLine.c_str(), newLine.size() + 1);
|
||||
write(fd, share->stat.c_str(), share->stat.size() + 1);
|
||||
close(fd);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ using namespace std;
|
|||
using namespace std::filesystem;
|
||||
|
||||
#define BUF_SZ 10
|
||||
#define APP_VER "1.4.t6"
|
||||
#define APP_VER "1.4.t7"
|
||||
|
||||
struct shared_t
|
||||
{
|
||||
|
@ -79,7 +79,7 @@ void replaceAll(string &str, const string &from, const string &to);
|
|||
void enforceMaxDays(shared_t *share);
|
||||
void rdLine(const string ¶m, const string &line, string *value);
|
||||
void rdLine(const string ¶m, const string &line, int *value);
|
||||
void statFifo(shared_t *share);
|
||||
void statOut(shared_t *share);
|
||||
bool rdConf(shared_t *share);
|
||||
bool capPair(Mat &prev, Mat &next, VideoCapture &capture, shared_t *share);
|
||||
Mat toGray(const Mat &src);
|
||||
|
|
|
@ -47,6 +47,8 @@ void detectLoop(shared_t *share)
|
|||
{
|
||||
remove(fullPath.c_str());
|
||||
}
|
||||
|
||||
statOut(share);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user