Changeset 926:a7126fa6773d for attach.c

Show
Ignore:
Timestamp:
1999-02-28 00:05:54 (10 years ago)
Author:
Thomas Roessler <roessler@…>
Branch:
HEAD
Message:

Fix a $TMPDIR race condition.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • attach.c

    r857 r926  
    713713      memset (&s, 0, sizeof (s)); 
    714714      if (flags == M_SAVE_APPEND) 
    715         s.fpout = safe_fopen (path, "a"); 
     715        s.fpout = fopen (path, "a"); 
     716      else if (flags == M_SAVE_OVERWRITE) 
     717        s.fpout = fopen (path, "w"); 
    716718      else 
    717         s.fpout = fopen (path, "w"); 
     719        s.fpout = safe_fopen (path, "w"); 
    718720      if (s.fpout == NULL) 
    719721      { 
     
    777779 
    778780  if (flags == M_SAVE_APPEND) 
    779     s.fpout = safe_fopen (path, "a"); 
     781    s.fpout = fopen (path, "a"); 
     782  else if (flags == M_SAVE_OVERWRITE) 
     783    s.fpout = fopen (path, "w"); 
    780784  else 
    781     s.fpout = fopen (path, "w"); 
     785    s.fpout = safe_fopen (path, "w"); 
     786 
    782787  if (s.fpout == NULL) 
    783788  {