GPSDproxy: send GPS data from gpsd to a remote server

Jean-Philippe Andriot jipey at jipey.no-ip.com
Thu Jan 15 09:50:04 CET 2009


On Thu, Jan 15, 2009 at 03:34:34AM +0200, Timo Juhani Lindfors wrote:
> Niccolo Rigacci <niccolo at rigacci.org> writes:
> > I released a little software to proxy GPS data read from gpsd to 
> > a remote server. I use it to store my live track on a Postgres 
> > database (running on my home server) via GPRS connection.
> 
> Interesting idea. I looked around the code:
> 
>     /* Fork into background */
>     if (be_daemon) {
>         pid = fork();
>         if (pid == -1) {
>             perror("Could not fork() into background");
>         } else if (pid > 0) {
>             exit(0);
>         }
>     }
> 
> shouldn't this use two fork()'s? See Stevens's "Advanced Programming
> in the Unix Environment" book or take a look at how e.g. tor makes
> itself a daemon:


man 3 daemon should do it better :)

Regards,




More information about the community mailing list