<pre style='margin:0'>
Zero King (l2dy) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/4ae09d389cfc046d3fa598f1bdb2da60380e16b2">https://github.com/macports/macports-base/commit/4ae09d389cfc046d3fa598f1bdb2da60380e16b2</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 4ae09d38 daemondo: tabs to spaces
</span>4ae09d38 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 4ae09d389cfc046d3fa598f1bdb2da60380e16b2
</span>Author: Zero King <l2dy@macports.org>
AuthorDate: Mon Feb 14 16:24:08 2022 +0000
<span style='display:block; white-space:pre;color:#404040;'> daemondo: tabs to spaces
</span>---
src/programs/daemondo/main.c | 44 ++++++++++++++++++++++----------------------
1 file changed, 22 insertions(+), 22 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/programs/daemondo/main.c b/src/programs/daemondo/main.c
</span><span style='display:block; white-space:pre;color:#808080;'>index 1ce29677..9a5f7aff 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/programs/daemondo/main.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/programs/daemondo/main.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -111,7 +111,7 @@ io_connect_t pwrRootPort = 0;
</span> int restartOnWakeup = 0; // TRUE to restart daemon on wake from sleep
CFRunLoopTimerRef restartTimer = NULL; // Timer for scheduled restart
CFTimeInterval restartHysteresis = 5.0; // Default hysteresis is 5 seconds
<span style='display:block; white-space:pre;background:#ffe0e0;'>-int restartWait = 3; // Default wait during restart is 3 seconds
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+int restartWait = 3; // Default wait during restart is 3 seconds
</span>
__printflike(1, 2)
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -296,15 +296,15 @@ DestroyPidFile(void)
</span> break;
case kPidStyleExec: // We wrote the file, and we'll remove it
case kPidStyleFileClean: // The process wrote the file, but we'll remove it
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if (verbosity >= 5)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- LogMessage("Attempting to delete pidfile %s\n", pidFile);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (verbosity >= 5)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ LogMessage("Attempting to delete pidfile %s\n", pidFile);
</span> if (unlink(pidFile) && verbosity >= 3)
<span style='display:block; white-space:pre;background:#ffe0e0;'>- LogMessage("Failed attempt to delete pidfile %s (%d)\n", pidFile, errno);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ LogMessage("Failed attempt to delete pidfile %s (%d)\n", pidFile, errno);
</span> break;
}
} else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if (verbosity >= 5)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- LogMessage("No pidfile to delete: none specified\n");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (verbosity >= 5)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ LogMessage("No pidfile to delete: none specified\n");
</span> }
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -352,21 +352,21 @@ DeletePreexistingPidFile(void)
</span>
// Log information about the discovered pid file
if (verbosity >= 3 && pid != -1) {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- LogMessage("Discovered preexisting pidfile %s containing pid %d which is a %s process\n", pidFile, pid,
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- (valid) ? "valid" : "invalid");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ LogMessage("Discovered preexisting pidfile %s containing pid %d which is a %s process\n", pidFile, pid,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (valid) ? "valid" : "invalid");
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> // Try to delete the pidfile if it's present
if (pid != -1) {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if (unlink(pidFile)) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (verbosity >= 3)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- LogMessage("Error %d while trying to cleanup preexisting pidfile %s\n", errno, pidFile);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if (verbosity >= 3)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- LogMessage("Deleted preexisting pidfile %s\n", pidFile);
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (unlink(pidFile)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (verbosity >= 3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ LogMessage("Error %d while trying to cleanup preexisting pidfile %s\n", errno, pidFile);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (verbosity >= 3)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ LogMessage("Deleted preexisting pidfile %s\n", pidFile);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> return pid;
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -548,8 +548,8 @@ Start(void)
</span>
if (verbosity >= 1)
LogMessage("Starting process\n");
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if (pidFile != NULL)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- DeletePreexistingPidFile();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (pidFile != NULL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ DeletePreexistingPidFile();
</span> if (verbosity >= 2)
LogMessage("Running start-cmd %s\n", CatArray(startArgs, buf, sizeof(buf)));
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -686,8 +686,8 @@ Restart(void)
</span> }
else
{
<span style='display:block; white-space:pre;background:#ffe0e0;'>- // Bug: we should recapture the target process id from the pidfile in this case
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Bug: we should recapture the target process id from the pidfile in this case
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> // Execute the restart-cmd and trust it to do the job
if (verbosity >= 1)
LogMessage("Restarting process\n");
</pre><pre style='margin:0'>
</pre>