]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
deployPkg: Fix duplicate log message issue
authorOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:54 +0000 (11:23 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:54 +0000 (11:23 -0700)
Use linebuffer to prevent duplicate log message for forked off processes during customization.

open-vm-tools/services/plugins/deployPkg/deployPkgLog.c

index a70762a38994f3209d57fb03a6aa376a99f0715f..943395887faa8fbdda5511110b32ad3603923d26 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2006-2016 VMware, Inc. All rights reserved.
+ * Copyright (C) 2006-2017 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -75,6 +75,9 @@ DeployPkgLog_Open()
       Str_Strcat(logPath, DIRSEPS "toolsDeployPkg.log", sizeof logPath);
       _file = fopen(logPath, "w");
       if (_file != NULL) {
+#ifndef _WIN32
+         setlinebuf(_file);
+#endif
          fprintf(_file, "## Starting deploy pkg operation\n");
       }
    }