Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15457318
D18139.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D18139.diff
View Options
diff --git a/src/daemon/PhutilDaemonOverseer.php b/src/daemon/PhutilDaemonOverseer.php
--- a/src/daemon/PhutilDaemonOverseer.php
+++ b/src/daemon/PhutilDaemonOverseer.php
@@ -336,7 +336,21 @@
if ($pidfile !== $this->lastPidfile) {
$this->lastPidfile = $pidfile;
$pidfile_path = $this->piddir.'/daemon.'.getmypid();
- Filesystem::writeFile($pidfile_path, phutil_json_encode($pidfile));
+ try {
+ Filesystem::writeFile(
+ $pidfile_path,
+ phutil_json_encode($pidfile));
+ } catch (Exception $ex) {
+ // This write can fail if the disk is full. We already tested the
+ // directory for writability on startup, so just ignore this and
+ // move on rather than crashing. If the disk is full this error may
+ // not make it to a log file, but at least we tried.
+ $this->logMessage(
+ 'PIDF',
+ pht(
+ 'Unable to update PID file: %s.',
+ $ex->getMessage()));
+ }
}
}
@@ -377,6 +391,7 @@
switch ($type) {
case 'OVER':
case 'SGNL':
+ case 'PIDF':
$always_log = true;
break;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 31, 3:36 PM (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7720792
Default Alt Text
D18139.diff (1 KB)
Attached To
Mode
D18139: If the overseer can't update the PID file, just move on
Attached
Detach File
Event Timeline
Log In to Comment