diff --git a/minix/drivers/storage/ramdisk/Makefile b/minix/drivers/storage/ramdisk/Makefile index 5edb62fea..47760acf3 100644 --- a/minix/drivers/storage/ramdisk/Makefile +++ b/minix/drivers/storage/ramdisk/Makefile @@ -201,8 +201,9 @@ proto.dev.mtree: proto.dev: proto.dev.mtree etc/pwd.db etc/spwd.db etc/passwd etc/group ${TOOL_MTREE} -f ${.TARGET}.mtree -N ${.OBJDIR}/etc -C -K device | \ ${TOOL_TOPROTO} | ${TOOL_SED} -e '1,4d' | \ - ${TOOL_SED} -e '$$d' |${TOOL_SED} -e '$$d' > ${.TARGET}.tmp && \ - mv ${.TARGET}.tmp ${.TARGET} + ${TOOL_SED} -e '$$d' |${TOOL_SED} -e '$$d' > ${.TARGET}.tmp + grep console ${.TARGET}.tmp # sanity check; is there a console entry? + mv ${.TARGET}.tmp ${.TARGET} proto.gen: ${PROTO} ${PROTO_FILES} proto.dev ${PROGRAMS} ${STRIP} ${PROGRAMS} diff --git a/minix/servers/pm/forkexit.c b/minix/servers/pm/forkexit.c index a221d3c9f..218fff5e0 100644 --- a/minix/servers/pm/forkexit.c +++ b/minix/servers/pm/forkexit.c @@ -314,7 +314,8 @@ int dump_core; /* flag indicating whether to dump core */ vm_notify_sig_wrapper(rmp->mp_endpoint); if (proc_nr_e == INIT_PROC_NR) { - printf("PM: INIT died\n"); + printf("PM: INIT died with exit status %d; showing stacktrace\n", exit_status); + sys_diagctl_stacktrace(proc_nr_e); return; } if (proc_nr_e == VFS_PROC_NR) diff --git a/sbin/init/Makefile b/sbin/init/Makefile index 602b5e07a..03f4fdd96 100644 --- a/sbin/init/Makefile +++ b/sbin/init/Makefile @@ -7,6 +7,12 @@ DPADD= ${LIBUTIL} LDADD= -lutil CPPFLAGS+= -DMFS_DEV_IF_NO_CONSOLE -DSUPPORT_UTMP -DSUPPORT_UTMPX +#.if defined(__MINIX) +# BJG - by default produce line numbers in case init exits without producing +# output +DBG=-g +#.endif + .ifdef INIT_CHROOT CPPFLAGS+= -DCHROOT .elifdef SMALLPROG