-void ioloop(void);
-FILE *mtstdopen(int fd, int issock, int timeout, char *mode);
+int ioloop(void);
+void exitioloop(int status);
+FILE *mtstdopen(int fd, int issock, int timeout, char *mode, struct stdiofd **infop);
+struct bufio *mtbioopen(int fd, int issock, int timeout, char *mode, struct stdiofd **infop);
+void mtiopipe(FILE **read, FILE **write);