You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2018/10/24 14:50:29 UTC

[2/3] storm git commit: STORM-3272 log stat failure

STORM-3272 log stat failure


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/3fe00213
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/3fe00213
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/3fe00213

Branch: refs/heads/master
Commit: 3fe0021379c1b491bc45bd5cc8efbc91cedd8536
Parents: 1313447
Author: Aaron Gresch <ag...@yahoo-inc.com>
Authored: Tue Oct 23 09:59:35 2018 -0500
Committer: Aaron Gresch <ag...@yahoo-inc.com>
Committed: Tue Oct 23 09:59:35 2018 -0500

----------------------------------------------------------------------
 storm-core/src/native/worker-launcher/impl/worker-launcher.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/3fe00213/storm-core/src/native/worker-launcher/impl/worker-launcher.c
----------------------------------------------------------------------
diff --git a/storm-core/src/native/worker-launcher/impl/worker-launcher.c b/storm-core/src/native/worker-launcher/impl/worker-launcher.c
index d085315..5155ed8 100644
--- a/storm-core/src/native/worker-launcher/impl/worker-launcher.c
+++ b/storm-core/src/native/worker-launcher/impl/worker-launcher.c
@@ -597,8 +597,12 @@ int recursive_delete(const char *path, int supervisor_owns_dir) {
 
   if(access(path, F_OK) != 0) {
     if(errno == ENOENT) {
+       if(lstat(path, &file_stat) != 0) {
+         fprintf(LOGFILE, "Failed to stat %s: %s", path, strerror(errno));
+         return 0;
+       }
        // we need to handle symlinks that target missing files.
-       if((lstat(path, &file_stat) != 0) || ((file_stat.st_mode & S_IFMT) != S_IFLNK)) {
+       if((file_stat.st_mode & S_IFMT) != S_IFLNK) {
          return 0;
        }
      }