diff --git a/paddle/fluid/train/custom_trainer/feed/dataset/data_reader.cc b/paddle/fluid/train/custom_trainer/feed/dataset/data_reader.cc index 48b9e1fe18ea68c652847c7608b306ca8ceec6c4..92e5f82ff184acb0448c9345ebe3facaed0991b0 100644 --- a/paddle/fluid/train/custom_trainer/feed/dataset/data_reader.cc +++ b/paddle/fluid/train/custom_trainer/feed/dataset/data_reader.cc @@ -171,6 +171,7 @@ public: if (line_len <= 0) { continue; } + DataItem data_item; if (_parser->parse(buffer, line_len, data_item) == 0) { VLOG(5) << "parse data: " << data_item.id << " " << data_item.data << ", filename: " << filepath << ", thread_num: " << thread_num << ", max_threads: " << max_threads; if (writer == nullptr) { diff --git a/paddle/fluid/train/custom_trainer/feed/io/shell.cc b/paddle/fluid/train/custom_trainer/feed/io/shell.cc index a96da2c6e0e92522c218ff1dad25fe561ad3ca19..d6fae5d0ab1d0df8c84e04b90a2ddf85e6c3a57b 100644 --- a/paddle/fluid/train/custom_trainer/feed/io/shell.cc +++ b/paddle/fluid/train/custom_trainer/feed/io/shell.cc @@ -165,14 +165,14 @@ static int shell_popen_fork_internal( if (child_end != child_std_end) { if (dup2(child_end, child_std_end) != child_std_end) { - return -1; + exit(127); } close(child_end); } close_open_fds_internal(); if (execl("/bin/bash", "bash", "-c", real_cmd, NULL) < 0) { - return -1; + exit(127); } exit(127); #endif