summaryrefslogtreecommitdiff
path: root/irssi-config.in
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2018-04-08 15:52:09 -0300
committerdequis <dx@dxzone.com.ar>2018-04-08 15:52:09 -0300
commit8deb6182c692904733544568479035b31fe1007e (patch)
tree546be3a7de49648e465610f2490a66a2c92723f3 /irssi-config.in
parentb2b1ac670879ed49ebf87acc4e33212a21e8df66 (diff)
downloadirssi-8deb6182c692904733544568479035b31fe1007e.zip
Make config_write more atomic to prevent truncation when out of space
This is modeled after glib's g_file_set_contents. It doesn't use that function directly because the writing is done with GIOChannel streaming-like writes and g_file_set_contents expects the whole thing to be in-memory. Main differences with g_file_set_contents: - complete lack of win32 special casing (cygwin/WSL should work though) - no fallocate() (linux only, but we don't know the size upfront, anyway) - always calls fsync (glib skips it on btrfs or when not overwriting) Other than that, it's the same old mkstemp + fsync + rename.
Diffstat (limited to 'irssi-config.in')
0 files changed, 0 insertions, 0 deletions