Re: OLC & saveing OLC DATA

From: Patrick Dughi (dughi@imaxx.net)
Date: 01/02/01


>  i have poked around the source and cant seem to figure out
>  how to creata a unified command that will just save all unsaved
>  OLC data and i was wondering what would happen if someone
>  was in Redit Sedit Zedit Oedit or Medit and i tryed to save the
>  file they were working on is it possable that if i save and they quit
>  out of the command at just the right time could this corrupt the
>  the /lib/world/* files that are open ?
>
>  i wanted to know this before i even start trying to code one

        Uhm.

        Oasis only opens files while writing files for saving, and then
closes them immediately. Since the mud is a single process, it doesn't
need fancy locking or the sort to guarentee unique access.  So, if
someone's 'working' on a zone/mob/etc, it's in memory.  At a specific time
(or forced, if a command) the information is then written out to a file.

        It would be a nice touch to make it more of an atomic command -
written out to a temporary file, and just a rename to make the changes,
but that's only if you're worried about crashes, I suppose.

                                                PjD

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/03/01 PST