[Xastir] Strange question....

Andrew Rich vk4tec at tech-software.net
Tue Mar 8 08:54:53 EST 2005


I have been plying with some pidof statements

I have noticed for cron running a perl script, it is not as easy as "pidof
barry.pl"

it is more like pidof "/usr/bin/pel /scripts/barry.pl"

Cheers

-----Original Message-----
From: Curt, WE7U [mailto:archer at eskimo.com]
Sent: Tuesday, 8 March 2005 03:35
To: Dan Brown
Cc: xastir
Subject: Re: [Xastir] Strange question....


On Mon, 7 Mar 2005, Dan Brown wrote:

> Well, that code should do what you need to do - save for removing it at
the
> end.  I just hadn't had enough (any) coffee, so one round of source code
> diving was all for me this morning ;-)

It's a great start, and much appreciated!

Here's what we need to start really using it:


  Check for a pre-existing PID file.
    If one found, check whether the process corresponding to the
    process ID in the file is still running.
      If so, refuse to start up, or start up with a secondary config
      directory.

  Remove only our own PID file when we exit.


This brings up another question:  Whether we might want one master
PID file and some slave PID files?  The master PID would be written
by an Xastir that is using the default config files (and typically
would have its listening port enabled so that slave Xastirs could
connect to it).  The slave PID's would be written by Xastir sessions
that are using alternative config schemes.

Am just thinking of the case where you might have two or more Xastir
sessions running with the slaves pulling data from the master, and
the master gets killed somehow.  Bringing it back up without the
two-layer scheme might have it trying to come up with a secondary
config set, where you really want the default configs.

Somehow we need to tie the PID files together with the config setup
they're using.  We could write the config directory into the file as
well, which might be a good idea here, then just specify the config
directory as an input on the command-line.  That way the PID files
could all be on an equal footing.

--
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