(file) Return to Parent.c CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Executor

Diff for /pegasus/src/Executor/Parent.c between version 1.13 and 1.14

version 1.13, 2008/06/18 18:11:59 version 1.14, 2008/06/25 10:32:49
Line 191 
Line 191 
             case 'w':             case 'w':
                 fd = open(                 fd = open(
                     request.path,                     request.path,
                     O_WRONLY | O_CREAT | O_TRUNC,                      O_WRONLY | O_TRUNC,
                     permissions);                     permissions);
                 break;                 break;
  
Line 199 
Line 199 
             {             {
                 fd = open(                 fd = open(
                     request.path,                     request.path,
                     O_WRONLY | O_CREAT | O_APPEND,                      O_WRONLY | O_APPEND,
                     permissions);                     permissions);
                 break;                 break;
             }             }
         }         }
           /* If the open call fails with ENOENT errno,then create the file.
           If the umask is set to a non default value,then the file will not
           get created with permissions specified in the open system call.
           So set the permissions for the file explicitly using fchmod.
           */
         if (fd == -1)         if (fd == -1)
           {
               if (errno == ENOENT && (request.mode == 'w' || request.mode == 'a'))
               {
                   fd = open(request.path,O_CREAT | O_WRONLY,permissions);
                   if (fchmod(fd,permissions) != 0)
                   {
                       response.status = -1;
                       close(fd);
                   }
               }
               else
               {
             response.status = -1;             response.status = -1;
     }     }
           }
       }
     while (0);     while (0);
  
     /* Log failure. */     /* Log failure. */


Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2