[Xastir] Strange question....
Andrew Rich
vk4tec at tech-software.net
Tue Mar 8 08:51:40 EST 2005
http://www.tech-software.net/code.htm
-----Original Message-----
From: Curt, WE7U [mailto:archer at eskimo.com]
Sent: Tuesday, 8 March 2005 03:14
To: Dan Brown
Cc: xastir
Subject: Re: [Xastir] Strange question....
On Mon, 7 Mar 2005, Dan Brown wrote:
> + /* Save our PID */
> +
> + FILE * MYPID ;
> +
> + MYPID = fopen(get_user_base_dir("xastir.pid"),"w");
> + fprintf(MYPID, "%d",getpid());
> + fclose (MYPID);
> +
> (prolly need to add some code to remove the .pid file, at some point, too,
> maybe after coffee...)
A PID file briefly crossed my mind while I was answering the
question (as in it sure would have been easier if we had one!).
Having a PID file would be useful during debugging too, when it
hangs but doesn't die.
For that matter, if we have a PID file we can detect when we have
another Xastir running and switch our config files to an alternate
set, or refuse to bring up the second copy, etc.
--
Curt, WE7U. APRS Client Comparisons: http://www.eskimo.com/~archer
"Lotto: A tax on people who are bad at math." -- unknown
"Windows: Microsoft's tax on computer illiterates." -- WE7U
"The world DOES revolve around me: I picked the coordinate system!"
_______________________________________________
Xastir mailing list
Xastir at xastir.org
https://lists.xastir.org/mailman/listinfo/xastir
More information about the Xastir
mailing list