static struct screenhack_job *jobs = 0;
-#ifdef DEBUG
-static void
+/* for debugging -- nothing calls this, but it's useful to invoke from gdb. */
+void
show_job_list (void)
{
struct screenhack_job *job;
job->name);
fprintf (stderr, "\n");
}
-#endif
static void clean_job_list (void);
{
saver_info *si = global_si_kludge; /* I hate C so much... */
-#ifdef DEBUG
if (si->prefs.debug_p)
fprintf(stderr, "%s: got SIGCHLD%s\n", progname,
(block_sigchld_handler ? " (blocked)" : ""));
-#endif /* DEBUG */
if (block_sigchld_handler < 0)
abort();
errno = 0;
kid = waitpid (-1, &wait_status, WNOHANG|WUNTRACED);
-#ifdef DEBUG
+
if (si->prefs.debug_p)
- if (kid < 0 && errno)
- fprintf (stderr, "%s: waitpid(-1) ==> %ld (%d)\n", progname,
- (long) kid, errno);
- else
- fprintf (stderr, "%s: waitpid(-1) ==> %ld\n", progname, (long) kid);
-#endif /* DEBUG */
+ {
+ if (kid < 0 && errno)
+ fprintf (stderr, "%s: waitpid(-1) ==> %ld (%d)\n", progname,
+ (long) kid, errno);
+ else
+ fprintf (stderr, "%s: waitpid(-1) ==> %ld\n", progname,
+ (long) kid);
+ }
/* 0 means no more children to reap.
-1 means error -- except "interrupted system call" isn't a "real"
{
int i;
for (i = 0; saved_argv [i]; i++);
- /* add the -demo switch; save_argv() left room for this. */
- saved_argv [i] = "-demo";
+ /* add the -initial-demo-mode switch; save_argv() left room for this. */
+ saved_argv [i] = "-initial-demo-mode";
saved_argv [i+1] = 0;
restart_process (si); /* shouldn't return */
saved_argv [i] = 0;