+
+/* Interrupt a running command line process */
+void
+cmdline_quit(struct cmdline *cl)
+{
+ rdline_quit(&cl->rdl);
+}
+
+/* Start command line on configured file descriptor. This function
+ * loops until the user explicitelly call cmdline_quit(), or if the
+ * input fd reaches EOF. */
+void
+cmdline_interact(struct cmdline *cl)
+{
+ char c;
+
+ c = -1;
+ while (1) {
+ if (read(cl->s_in, &c, 1) < 0)
+ break;
+ if (cmdline_in(cl, &c, 1) < 0)
+ break;
+ }
+}