Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Application:Geo
rtklib
daemonmode.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File daemonmode.diff of Package rtklib
--- app/rtkrcv/rtkrcv.c.orig 2015-05-18 17:27:17.663017435 +0200 +++ app/rtkrcv/rtkrcv.c 2015-05-18 17:27:58.489668249 +0200 @@ -1366,7 +1366,7 @@ int main(int argc, char **argv) { vt_t vt={0}; - int i,start=0,port=0,outstat=0,trace=0; + int i,start=0,port=0,outstat=0,trace=0,daemon=0; char *dev="",file[MAXSTR]=""; for (i=1;i<argc;i++) { @@ -1374,6 +1374,7 @@ else if (!strcmp(argv[i],"-p")&&i+1<argc) port=atoi(argv[++i]); else if (!strcmp(argv[i],"-m")&&i+1<argc) moniport=atoi(argv[++i]); else if (!strcmp(argv[i],"-d")&&i+1<argc) dev=argv[++i]; + else if (!strcmp(argv[i],"-D")) daemon=1; else if (!strcmp(argv[i],"-o")&&i+1<argc) strcpy(file,argv[++i]); else if (!strcmp(argv[i],"-r")&&i+1<argc) outstat=atoi(argv[++i]); else if (!strcmp(argv[i],"-t")&&i+1<argc) trace=atoi(argv[++i]); @@ -1418,18 +1419,21 @@ signal(SIGPIPE,SIG_IGN); while (!intflg) { + if(!daemon) { + /* open console */ + if (!vt_open(&vt,port,dev)) break; - /* open console */ - if (!vt_open(&vt,port,dev)) break; + vt_printf(&vt,"\n%s** %s ver.%s console (h:help) **%s\n",ESC_BOLD, + PRGNAME,VER_RTKLIB,ESC_RESET); - vt_printf(&vt,"\n%s** %s ver.%s console (h:help) **%s\n",ESC_BOLD, - PRGNAME,VER_RTKLIB,ESC_RESET); + /* command interpreter */ + if (login(&vt)) cmdshell(&vt); - /* command interpreter */ - if (login(&vt)) cmdshell(&vt); - - /* close console */ - vt_close(&vt); + /* close console */ + vt_close(&vt); + } else { + sleep(5); + } } /* stop rtk server */ stopsvr(&vt);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor