redirect_standard_io_to_device (state->console);
else
redirect_standard_io_to_device ("tty1");
-
-
+
for (node = ply_list_get_first_node (state->windows); node;
node = ply_list_get_next_node (state->windows, node))
{
int exit_code;
bool should_help = false;
bool no_daemon = false;
+ bool debug = false;
ply_daemon_handle_t *daemon_handle;
char *mode_string = NULL;
"help", "This help message", PLY_COMMAND_OPTION_TYPE_FLAG,
"attach-to-session", "pty_master_fd", PLY_COMMAND_OPTION_TYPE_INTEGER,
"no-daemon", "Do not daemonize", PLY_COMMAND_OPTION_TYPE_FLAG,
+ "debug", "Output debugging information", PLY_COMMAND_OPTION_TYPE_FLAG,
"mode", "Mode is one of: boot, shutdown", PLY_COMMAND_OPTION_TYPE_STRING,
NULL);
"help", &should_help,
"mode", &mode_string,
"no-daemon", &no_daemon,
+ "debug", &debug,
"attach-to-session", &state.ptmx,
NULL);
if (should_help)
return 0;
}
+ if (debug && !ply_is_tracing ())
+ ply_toggle_tracing ();
+
if (mode_string != NULL)
{
if (strcmp (mode_string, "shutdown") == 0)