summaryrefslogtreecommitdiffhomepage
path: root/libs/httpclient/luasrc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/httpclient/luasrc')
-rw-r--r--libs/httpclient/luasrc/httpclient/receiver.lua9
1 files changed, 4 insertions, 5 deletions
diff --git a/libs/httpclient/luasrc/httpclient/receiver.lua b/libs/httpclient/luasrc/httpclient/receiver.lua
index ad2ac8db7b..cac96cd952 100644
--- a/libs/httpclient/luasrc/httpclient/receiver.lua
+++ b/libs/httpclient/luasrc/httpclient/receiver.lua
@@ -114,13 +114,12 @@ end
local function splice_sync(sock, pipeout, pipein, file, cb)
local os = require "os"
- local posix = require "posix"
local ssize = 65536
local smode = nixio.splice_flags("move", "more")
local stat
-- This is probably the only forking http-client ;-)
- local pid, code, msg = posix.fork()
+ local pid, code, msg = nixio.fork()
if not pid then
return pid, code, msg
elseif pid == 0 then
@@ -149,11 +148,11 @@ local function splice_sync(sock, pipeout, pipein, file, cb)
file:close()
if not stat then
- posix.kill(pid)
- posix.wait(pid)
+ nixio.kill(pid, 15)
+ nixio.wait(pid)
return stat, code, msg
else
- pid, msg, code = posix.wait(pid)
+ pid, msg, code = nixio.wait(pid)
if msg == "exited" then
if code == 0 then
return true