On Sun, Oct 10, 1999 at 05:24:10PM +0200, Marco Lamberto <[EMAIL PROTECTED]> wrote:
> On Sat, 09 Oct 1999, Adrian Likins wrote:
> >     If I recall correctly, this has been suggested a few times
> >and made it into released versions of gimp at least once, only to be removed
> >later for reasons I do not recall. Seems like some sort of portability issues
> >perhaps, but its been a long time. The easiest way to remember why it got
> >removed is probabaly to put it back in though and see who yells ;->
> Also because I don't think that this will work well when gimp is running on
> HP-UX and NFS (but I'm not completly sure of that).

Possible problems:

a) unlink might not succeed on non-unix-systems. cure: ignore the error from
   unlink and try to unlink it again after closing the file
b) if the swap file is on nfs (extremely bad idea anyway) it might
   go away (physically) on the server when gimp does not access it for
   extended periods (>10 minutes).

However, any other solution (doing it in the signal handler) is extremely
annyoing (leaves too many swap files around).

In any case, why not use tmpfile or a similar function to create it? that
function will do exactly what is required and will work on all systems (as
good as it can).

-- 
      -----==-                                             |
      ----==-- _                                           |
      ---==---(_)__  __ ____  __       Marc Lehmann      +--
      --==---/ / _ \/ // /\ \/ /       [EMAIL PROTECTED]      |e|
      -=====/_/_//_/\_,_/ /_/\_\       XX11-RIPE         --+
    The choice of a GNU generation                       |
                                                         |

Reply via email to