You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fs.open can receive "rs+" flag and sets O_SYNC flag for cases when I need to know in callback that data has written to the hard drive (and not waiting in kernel cache) but is there a reason why there is no "as" or "as+" flag which sets the same O_SYNC flag but just for appending file (O_APPEND) ?
@bgnx , @bnoordhuis : 'as' should have flags O_APPEND | O_CREAT | O_WRONLY | O_SYNC, and 'as+' should have flags O_APPEND | O_CREAT | O_RDWR | O_SYNC. Is this understanding correct?
Activity
[-]O_SYNC with O_APPEND flag in fs.write?[/-][+]O_SYNC with O_APPEND flag in fs.open?[/+]bnoordhuis commentedon Feb 15, 2018
Probably an oversight. Pull requests welcome, the logic is in lib/internal/fs.js
SirR4T commentedon Feb 15, 2018
Will take a shot at this.
SirR4T commentedon Feb 15, 2018
@bgnx , @bnoordhuis :
'as'should have flagsO_APPEND | O_CREAT | O_WRONLY | O_SYNC, and'as+'should have flagsO_APPEND | O_CREAT | O_RDWR | O_SYNC. Is this understanding correct?ryzokuken commentedon Mar 4, 2018
Please close this as appropriate commits have been merged.