Is that Windows-specific behaviour, related to how it can actively prevent
any other process from accessing the file, and can also delete on close? I
don't think *nix has that same behaviour. Also does that windows behaviour
work the same on NFS?
You can do file locking on *nix, but I don't think it can cover deleting
the physical file on an application crash (only releasing the lock), if
that makes any different. Probably not, since the next application would
just acquire the lock and update the file anyways. But also, from what I
have read, file locking flock/fcntl isn't recommended over network mounts.
I think it can depend on what type of mount and how it was mounted.



On Tue, Aug 5, 2014 at 1:43 AM, Marcus Ottosson <[email protected]>
wrote:

> > --- meaning, when to know to remove the lock file?
>
> That's a good question. Softimage does this transparently, but I'm not
> sure how. If I had to take a guess, I'd say that the Softimage process has
> an active file-handle on the LOCK file, and as soon as the process dies so
> does the handle, leaving it to the next process, either by the same user or
> not, to clean up the, now invalid, lock.
>
> There's some fascinating information on the topic in the Wiki
> http://en.wikipedia.org/wiki/File_locking
>
>
> On 4 August 2014 12:00, Chris Gardner <[email protected]> wrote:
>
>> Hey Fredrik,
>>
>> I am also watching events on newScene and mayaExit. Maya crashing is
>> the tricky one.
>>
>> However, i'm not stopping the user from doing anything if there's a
>> lock on the scene. It's for information purposes only. It's not my job
>> to prevent people from doing things if it won't kill 'em :)
>>
>> cheers,
>> chrisg
>>
>>
>> On 4 August 2014 20:53, Fredrik Averpil <[email protected]>
>> wrote:
>> > Forgive me for perhaps missing a step here... but how do you detect the
>> fact
>> > that you close the scene, maya exists or maya crashes?
>> > --- meaning, when to know to remove the lock file?
>> >
>> >
>> > Fredrik
>> >
>> >
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/python_inside_maya/CAPoKtNdxPaHsoE%3DSewQvS0TeujyY7GNWcuUo3GZybUqCXwDfeA%40mail.gmail.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> *Marcus Ottosson*
> [email protected]
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOC%2Bkoat6vDYW39FuXaMvk5X%3DmZSUJD90wq3yRdhJcJ2%3DA%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOC%2Bkoat6vDYW39FuXaMvk5X%3DmZSUJD90wq3yRdhJcJ2%3DA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA32p3g8MPpcsAZ7oqe3%3Dagn-ChybV%2B7YneG6f8zES52PA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to