+ read_line (command, sizeof command);
+
+ /* Execute command. */
+ if (!strcmp (command, "exit"))
+ break;
+ else if (command[0] == '\0')
+ {
+ /* Empty command. */
+ }
+ else
+ {
+ pid_t pid = exec (command);
+ if (pid != PID_ERROR)
+ printf ("\"%s\": exit code %d\n", command, wait (pid));
+ else
+ printf ("exec failed\n");
+ }
+ }
+
+ printf ("Shell exiting.");
+ return 0;
+}