Repository: actix/actix (language: rust)

Issue:
Stop system with error code
Is there a way to stop the system with an error code? I know `System::current().stop_with_code(1)` exists, but the `stop_with_code()` function is `pub(crate)` and can't be accessed outside of `actix`.

I also tried sending a `StopArbiter(1)` to the system arbiter (`System::current().arbiter().do_send(StopArbiter(1))`) but that doesn't appear to do anything.


Discussion / hints:
I think we should expose this method as public as there is currently no way to stop system with particular code
i fine with making it public

Fix patch:
diff --git a/CHANGES.md b/CHANGES.md
index 4d2eb4e37..328fbd23c 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,10 +1,11 @@
 # CHANGES
 
-## [0.7.6] (2018-11-08)
+## [0.7.6] (2018-11-xx)
 
 ### Changed
 
 - Use `trust-dns-resolver` 0.10.0.
+- Make `System::stop_with_code` public.
 
 ## [0.7.5] (2018-10-10)
 
diff --git a/src/system.rs b/src/system.rs
index 41eb5199f..e9d468bbd 100644
--- a/src/system.rs
+++ b/src/system.rs
@@ -123,7 +123,7 @@ impl System {
     }
 
     /// Stop the system with a particular exit code.
-    pub(crate) fn stop_with_code(&self, code: i32) {
+    pub fn stop_with_code(&self, code: i32) {
         self.sys.do_send(SystemExit(code));
     }
 


Test patch: