Why "Seppuku" ?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Why "Seppuku" ?

Samus Arin
This post was updated on .
I've been poking around the ACW source java files and came across Seppuku.java.

I always see a logcat entry for this during process startup, and was wondering why
it is named as such.  Is there any significance, or is it just a codename ?

(Maybe its intercepting broadcasts, and therefore severing communication in some way?)

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Why "Seppuku" ?

Jonathan Pryor-2
On Sep 27, 2013, at 11:58 AM, Samus Arin <[hidden email]> wrote:
> I always see a logcat entry for this during process startup, and was wondering why it is named as such.

mono.android.Seppuku is a broadcast receiver which calls java.lang.Runtime.exit(); you can view obj\Debug\android\src\mono\android\Seppuku.java after a build to see what it does.

"Seppuku" is (ritual) suicide, and in this case the process is killing itself, so I thought the name was (darkly, sillily) appropriate.

Now, why is it there? For many reasons -- you want to restart a Debugger session, or you're reinstalling the app via Fast Deployment -- the currently running process needs to exit. The Seppuku task is how we cause the currently running process to exit.

Also note that it's only present in Debug builds, not Release builds.

 - Jon (the guy who came up with the name)

_______________________________________________
Monodroid mailing list
[hidden email]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid