diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2013-01-09 12:47:23 -0300 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2013-01-09 12:47:23 -0300 |
commit | cbba835b154ba31e7a07ba1b15a06b8953eb7e72 (patch) | |
tree | 8ea8ad0b67ba6a2f8a789f9e61ea4f80d0c20d35 /dpi/downloads.cc | |
parent | d236210c1608952b7910123fbede108317a80444 (diff) |
Refactored FD close calls into a single new dClose() dlib function [p37sitdu]
Diffstat (limited to 'dpi/downloads.cc')
-rw-r--r-- | dpi/downloads.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/dpi/downloads.cc b/dpi/downloads.cc index 6f36afe9..70acaa8a 100644 --- a/dpi/downloads.cc +++ b/dpi/downloads.cc @@ -441,7 +441,7 @@ DLItem::~DLItem() void DLItem::abort_dl() { if (!log_done()) { - close(LogPipe[0]); + dClose(LogPipe[0]); Fl::remove_fd(LogPipe[0]); log_done(1); // Stop wget @@ -459,9 +459,9 @@ void DLItem::prButton_cb() void DLItem::child_init() { - close(0); // stdin - close(1); // stdout - close(LogPipe[0]); + dClose(0); // stdin + dClose(1); // stdout + dClose(LogPipe[0]); dup2(LogPipe[1], 2); // stderr // set the locale to C for log parsing setenv("LC_ALL", "C", 1); @@ -618,7 +618,7 @@ static void read_log_cb(int fd_in, void *data) perror("read, "); break; } else if (st == 0) { - close(fd_in); + dClose(fd_in); Fl::remove_fd(fd_in, 1); dl_item->log_done(1); break; @@ -630,7 +630,7 @@ static void read_log_cb(int fd_in, void *data) void DLItem::father_init() { - close(LogPipe[1]); + dClose(LogPipe[1]); Fl::add_fd(LogPipe[0], 1, read_log_cb, this); // Read // Start the timer after the child is running. |