Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixed issue 49: Exit reason 'kill' is not converted to 'killed' #53

Merged
merged 1 commit into from

2 participants

@edwardw

I.e., when trapping exit, send self a {'EXIT', from, reason}
instead of propagating process termination signal.

@edwardw edwardw Fixed issue 49: Exit reason 'kill' is not converted to 'killed'
I.e., when trapping exit, send self a {'EXIT', from, reason}
instead of propagating process termination signal.
16abd1b
@krestenkrab krestenkrab merged commit e90b945 into trifork:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 18, 2011
  1. @edwardw

    Fixed issue 49: Exit reason 'kill' is not converted to 'killed'

    edwardw authored
    I.e., when trapping exit, send self a {'EXIT', from, reason}
    instead of propagating process termination signal.
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/main/java/erjang/EProc.java
View
12 src/main/java/erjang/EProc.java
@@ -243,12 +243,7 @@ protected void process_incoming_exit(EHandle from, EObject reason, boolean is_er
}
- if (reason == am_kill) {
- this.exit_reason = am_killed;
- this.pstate = STATE_EXIT_SIG;
- this.resume();
-
- } else if (trap_exit == ERT.TRUE) {
+ if (trap_exit == ERT.TRUE) {
// we're trapping exits, so we in stead send an {'EXIT', from,
// reason} to self
ETuple msg = ETuple.make(ERT.am_EXIT, from, reason);
@@ -256,6 +251,11 @@ protected void process_incoming_exit(EHandle from, EObject reason, boolean is_er
mbox.put(msg);
+ } else if (reason == am_kill) {
+ this.exit_reason = am_killed;
+ this.pstate = STATE_EXIT_SIG;
+ this.resume();
+
} else if (reason != am_normal) {
// System.err.println("kill signal: " +reason + " from "+from);
// try to kill this thread
Something went wrong with that request. Please try again.