+/* Open the new terminal device */
+static void open_new_terminal(const char * const device, const int fail) {
+ struct stat sb;
+
+ if ((device_open(device, O_RDWR)) < 0) {
+ if (stat(device, &sb) != 0) {
+ message(LOG | CONSOLE, "device '%s' does not exist.", device);
+ } else {
+ message(LOG | CONSOLE, "Bummer, can't open %s", device);
+ }
+ if (fail)
+ _exit(1);
+ /* else */
+#if !ENABLE_DEBUG_INIT
+ shutdown_signal(SIGUSR1);
+#else
+ _exit(2);
+#endif
+ }
+}
+