From 40c66f8df97fe0f60d2e96f56886489ba2c92426 Mon Sep 17 00:00:00 2001 From: Thunderbrook <52529258+Thunderbrook@users.noreply.github.com> Date: Tue, 17 Sep 2019 17:48:00 +0800 Subject: [PATCH] rm return in vfork (#19734) * rm return in vfork * rm return in vfork test=develop --- paddle/fluid/framework/downpour_worker.cc | 1 - paddle/fluid/framework/io/shell.cc | 8 ++------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/paddle/fluid/framework/downpour_worker.cc b/paddle/fluid/framework/downpour_worker.cc index 0a54ef4be51..e7dbf3b1131 100644 --- a/paddle/fluid/framework/downpour_worker.cc +++ b/paddle/fluid/framework/downpour_worker.cc @@ -685,7 +685,6 @@ void DownpourWorker::TrainFiles() { *thread_scope_, tid, dense_grad_names_[tid], &push_sparse_status_, scale_datanorm_, cur_batch); } - VLOG(3) << "push dense gradient done."; // the following code should be more precise and clean diff --git a/paddle/fluid/framework/io/shell.cc b/paddle/fluid/framework/io/shell.cc index d63fee7f6e8..ce0c3a767da 100644 --- a/paddle/fluid/framework/io/shell.cc +++ b/paddle/fluid/framework/io/shell.cc @@ -119,16 +119,12 @@ static int shell_popen_fork_internal(const char* real_cmd, bool do_read, close(parent_end); if (child_end != child_std_end) { - if (dup2(child_end, child_std_end) != child_std_end) { - return -1; - } + PCHECK(dup2(child_end, child_std_end) == child_std_end); close(child_end); } close_open_fds_internal(); - if (execl("/bin/bash", "bash", "-c", real_cmd, NULL) < 0) { - return -1; - } + PCHECK(execl("/bin/bash", "bash", "-c", real_cmd, NULL) >= 0); exit(127); #endif } -- GitLab