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
System calls mixed up in error code paths are causing two issues whichseveral code paths have not correctly handled:1) For write() calls, sometimes the system may return less bytes thanwhat has been written without errno being set. Some paths were carefulenough to consider that case, and assumed that errno should be set toENOSPC, other calls missed that.2) errno generated by a system call is overwritten by other system callswhich may succeed once an error code path is taken, causing what isreported to the user to be incorrect.This patch uses the brute-force approach of correcting all those codepaths. Some refactoring could happen in the future, but this is let asfuture work, which is not targeted for back-branches anyway.Author: Michael PaquierReviewed-by: Ashutosh SharmaDiscussion:https://postgr.es/m/20180622061535.GD5215@paquier.xyz