In article <[EMAIL PROTECTED]>,
Grant Edwards  <[EMAIL PROTECTED]> wrote:
                        .
                        .
                        .
>You can also use a network port instead of a file.  Binding a
>socket to a port is an exclusive and atomic operation.  An
>advantage to the network port scheme is that the "lock"
>automatically goes away if the program dies.  A disadvantiage is
>that it can't contain information (date/time/PID) like a file
>can.
                        .
                        .
                        .
While you write elsewhere in this thread, Grant, that 
pid-in-a-file is the "usual" way, I much prefer this
technique of opening a simple TCP/IP server.  While I
recognize the disadvantage you describe, I choose to
regard it as an opportunity--since I have launched the
server anyway, I simply have it report to me (that is,
any connecting client) all the information I might want
want.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to