aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2011-12-08 15:29:30 +0100
committerLukas Larsson <[email protected]>2011-12-08 15:29:30 +0100
commit3323324c28d9102099b03e266f5c36aee0183f2c (patch)
tree63c38335cbae595beb4cf9ce91fe293d9537bf4d /lib/kernel/src
parent9bc76f48bfbd9773d77d75b1a94cf1097cca9fb6 (diff)
parente406d3f5471913a971254a8420b7a8a429de3bf5 (diff)
downloadotp-3323324c28d9102099b03e266f5c36aee0183f2c.tar.gz
otp-3323324c28d9102099b03e266f5c36aee0183f2c.tar.bz2
otp-3323324c28d9102099b03e266f5c36aee0183f2c.zip
Merge branch 'ta/sendfile/OTP-9240'
* ta/sendfile/OTP-9240: Do not use async threads on DARWIN Fix cleanup when sendfile process crashes Return {error,closed} from sendfile if closed Do not use SFV_NOWAIT as it does not exist on all solaris Clarify some code comments Make solaris use sendfilev
Diffstat (limited to 'lib/kernel/src')
-rw-r--r--lib/kernel/src/file.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/kernel/src/file.erl b/lib/kernel/src/file.erl
index 6dc2a26816..4028dd4f0b 100644
--- a/lib/kernel/src/file.erl
+++ b/lib/kernel/src/file.erl
@@ -1163,7 +1163,8 @@ change_time(Name, {{AY, AM, AD}, {AH, AMin, ASec}}=Atime,
-define(MAX_CHUNK_SIZE, (1 bsl 20)*20). %% 20 MB, has to fit in primary memory
-spec sendfile(RawFile, Socket, Offset, Bytes, Opts) ->
- {'ok', non_neg_integer()} | {'error', inet:posix() | badarg | not_owner} when
+ {'ok', non_neg_integer()} | {'error', inet:posix() |
+ closed | badarg | not_owner} when
RawFile :: file:fd(),
Socket :: inet:socket(),
Offset :: non_neg_integer(),
@@ -1188,7 +1189,8 @@ sendfile(File, Sock, Offset, Bytes, Opts) ->
%% sendfile/2
-spec sendfile(Filename, Socket) ->
- {'ok', non_neg_integer()} | {'error', inet:posix() | badarg | not_owner}
+ {'ok', non_neg_integer()} | {'error', inet:posix() |
+ closed | badarg | not_owner}
when Filename :: file:name(),
Socket :: inet:socket().
sendfile(Filename, Sock) ->