Github user JPercivall commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi/pull/59#discussion_r90129643
  
    --- Diff: 
minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/RunMiNiFi.java 
---
    @@ -367,11 +399,40 @@ private synchronized void saveProperties(final 
Properties nifiProps, final Logge
             }
     
             try (final FileOutputStream fos = new 
FileOutputStream(statusFile)) {
    -            nifiProps.store(fos, null);
    +            minifiProps.store(fos, null);
                 fos.getFD().sync();
             }
     
    -        logger.debug("Saved Properties {} to {}", new Object[]{nifiProps, 
statusFile});
    +        logger.debug("Saved Properties {} to {}", new 
Object[]{minifiProps, statusFile});
    +    }
    +
    +    private synchronized void writePidFile(final String pid, final Logger 
logger) throws IOException {
    +        final File pidFile = getPidFile(logger);
    +        if (pidFile.exists() && !pidFile.delete()) {
    --- End diff --
    
    I really don't think there is anything we can do about it since each 
invocation of minifi.sh is a separate processes. The lock file has the same 
potential race condition[1].
    
    [1] 
https://github.com/apache/nifi-minifi/blob/master/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/RunMiNiFi.java#L751


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to