File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -250,6 +250,15 @@ void command_line_fork()
250250 exit (0 );
251251 return ;
252252 }
253+ else if ( strncmp (buf," restart" , strlen (" restart" ) ) == 0 )
254+ {
255+ printf (" \x1b [31mExit command received\x1b [0m\n " );
256+ // kill(pid, SIGTERM);
257+ close (fd);
258+ remove (NAMEDPIPE_NAME);
259+ exit (-1 );
260+ return ;
261+ }
253262 else if ( strncmp (buf," version" , strlen (" version" ) ) == 0 )
254263 {
255264 printf (" \x1b [31mCPPcomet v.1.38\x1b [0m\n " );
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ bool usage_statistics::send(std::string data)
4848{
4949 char cli[600 ];
5050 std::string cmd;
51- cmd.append (" curl -d \" " ).append (data).append (" \" --connect-timeout 1 --max-time 1 -H \" Content-Type: text/plain\" -X POST http://statistics.comet-server.ru/api/statistics" );
51+ cmd.append (" curl -d \" " ).append (data).append (" \" --connect-timeout 1 --max-time 1 -H \" Content-Type: text/plain\" -X POST http://statistics.comet-server.ru/api/statistics > /dev/null 2>&1 " );
5252 if (exec (cmd.data (), cli, 600 ))
5353 {
5454 return true ;
You can’t perform that action at this time.
0 commit comments