+static gboolean
+tell_about_jack_death (void* /* ignored */)
+{
+ if (AudioEngine::instance()->processed_frames() == 0) {
+ /* died during startup */
+ MessageDialog msg (_("JACK exited"), false);
+ msg.set_position (Gtk::WIN_POS_CENTER);
+ msg.set_secondary_text (string_compose (_(
+"JACK exited unexpectedly, and without notifying %1.\n\
+\n\
+This could be due to misconfiguration or to an error inside JACK.\n\
+\n\
+Click OK to exit %1."), PROGRAM_NAME));
+
+ msg.run ();
+ _exit (0);
+
+ } else {
+
+ /* engine has already run, so this is a mid-session JACK death */
+
+ MessageDialog* msg = manage (new MessageDialog (_("JACK exited"), false));
+ msg->set_secondary_text (string_compose (_(
+"JACK exited unexpectedly, and without notifying %1.\n\
+\n\
+This is probably due to an error inside JACK. You should restart JACK\n\
+and reconnect %1 to it, or exit %1 now. You cannot save your\n\
+session at this time, because we would lose your connection information.\n"), PROGRAM_NAME));
+ msg->present ();
+ }
+ return false; /* do not call again */
+}
+