Files
dragonpilot/selfdrive/proclogd/main.cc
Adeeb Shihadeh cb8885cffb Merge common/ and selfdrive/common (#24556)
* Merge common/ and selfdrive/common

* fix that

* fix version

* fix unit tests
2022-05-18 14:11:57 -07:00

23 lines
393 B
C++

#include <sys/resource.h>
#include "common/util.h"
#include "selfdrive/proclogd/proclog.h"
ExitHandler do_exit;
int main(int argc, char **argv) {
setpriority(PRIO_PROCESS, 0, -15);
PubMaster publisher({"procLog"});
while (!do_exit) {
MessageBuilder msg;
buildProcLogMessage(msg);
publisher.send("procLog", msg);
util::sleep_for(2000); // 2 secs
}
return 0;
}