- ie9_print_status_bar(str, len);
-}
-
-/*
- * If we are about to die we must call i9e_close() to reset the terminal.
- * However, i9e_close() must be called in *this* context, i.e. from
- * play_task.post_select() rather than from i9e_post_select(), because
- * otherwise i9e would access freed memory upon return. So the play task must
- * stay alive until the i9e task terminates.
- *
- * We achieve this by sending a fake SIGTERM signal via i9e_signal_dispatch()
- * and reschedule. In the next iteration, i9e->post_select returns an error and
- * terminates. Subsequent calls to i9e_get_error() then return negative and we
- * are allowed to call i9e_close() and terminate as well.
- */
-static int session_post_select(__a_unused struct sched *s)
-{
- int ret;
-
- if (pt->background)
- detach_stdout();
- else
- attach_stdout(__FUNCTION__);
- ret = i9e_get_error();
- if (ret < 0) {
- kill_stream();
- i9e_close();
- para_log = stderr_log;
- free(ici.history_file);
- return ret;
- }
- if (get_playback_state() == 'X')
- i9e_signal_dispatch(SIGTERM);
- return 0;