Ticket #559: storage_xml_O_SYNC.diff

File storage_xml_O_SYNC.diff, 453 bytes (added by silasdb@…, at 2010-01-30T13:26:05Z)

Add O_SYNC flag to the open(2) call in the

  • storage_xml.c

    === modified file 'storage_xml.c'
     
    404404                return STORAGE_ALREADY_EXISTS;
    405405       
    406406        strcat( path, "~" );
    407         if( ( fd = open( path, O_WRONLY | O_CREAT | O_TRUNC, 0600 ) ) < 0 )
     407        if( ( fd = open( path, O_WRONLY | O_CREAT | O_TRUNC | O_SYNC, 0600 ) ) < 0 )
    408408        {
    409409                irc_usermsg( irc, "Error while opening configuration file." );
    410410                return STORAGE_OTHER_ERROR;