Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15387815
D11456.id27554.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
776 B
Referenced Files
None
Subscribers
None
D11456.id27554.diff
View Options
diff --git a/support/aphlict/server/aphlict_server.js b/support/aphlict/server/aphlict_server.js
--- a/support/aphlict/server/aphlict_server.js
+++ b/support/aphlict/server/aphlict_server.js
@@ -43,6 +43,12 @@
var config = parse_command_line_arguments(process.argv);
+function set_exit_code(code) {
+ process.on('exit', function() {
+ process.exit(code);
+ });
+}
+
process.on('uncaughtException', function(err) {
var context = null;
if (err.code == 'EACCES' && err.path == config.log) {
@@ -61,6 +67,7 @@
message.push(err.stack);
debug.log(message.join('\n\n'));
+ set_exit_code(1);
});
try {
@@ -98,7 +105,7 @@
// servers.
if (config.test) {
debug.log('Configuration test OK.');
- process.exit(0);
+ set_exit_code(0);
}
var server;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 16, 2:57 AM (6 d, 13 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7705356
Default Alt Text
D11456.id27554.diff (776 B)
Attached To
Mode
D11456: Fix Aphlict exit status
Attached
Detach File
Event Timeline
Log In to Comment