You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					23 lines
				
				403 B
			
		
		
			
		
	
	
					23 lines
				
				403 B
			| 
								 
											4 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 | 
							
								#include <sys/resource.h>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#include "selfdrive/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;
							 | 
						||
| 
								 | 
							
								}
							 |