How do I force a single instance of a python app?
Donn Cave
donn at u.washington.edu
Thu Oct 26 11:41:39 EDT 2000
More information about the Python-list mailing list
Thu Oct 26 11:41:39 EDT 2000
- Previous message (by thread): How do I force a single instance of a python app?
- Next message (by thread): File locking (Re: How do I force a single instance of a python app?)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Quoth Dale Strickland-Clark <dale at out-think.NOSPAMco.uk>: | "Joshua Muskovitz" <josh at open.com> wrote: |>"Dale Strickland-Clark" <dale at out-think.NOSPAMco.uk> wrote in message |>news:urodvssp7e7cmbv1ljlqnqgej9rjhfqbli at 4ax.com... |>> Open a flag file exclusively for writing. If successful you are alone, |>> if not, another instance already has the file. |>> |>> The OS should close the file and free the exclusive lock if the app |>> crashes. |> |> This would be great, but on my Win2k box, I can open up the same file for |> write in two separate Python instances at the same time. :-( |> |> The second instance of open("foo","w") does not fail. | | This is pretty naf, isn't it. I get the same. | | I can even open for append from two different instances of the same | program and get interleaved output. | | Does this occur with other languages/libraries? I haven't tested it | but I can't help wondering if Python is using inappropriate options | when opening output files. Normal, correct results for C library stdio, which is the basis for the Python file object. Donn Cave, donn at u.washington.edu
- Previous message (by thread): How do I force a single instance of a python app?
- Next message (by thread): File locking (Re: How do I force a single instance of a python app?)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list