+2002-07-30 John Levon <levon@movementarian.org>
+
+ * lyxserver.h:
+ * lyxserver.C: remove I/O callback too
+
2002-07-30 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* lyxfunc.C (getStatus): disable LFUN_LATEX_LOG when there is no
* add a callback for I/O read notification
*/
void set_read_callback(int fd, LyXComm * comm);
+
+ /**
+ * remove a I/O read callback
+ */
+ void remove_read_callback(int fd);
}
#endif // LYX_GUI_H
+2002-07-30 John Levon <levon@movementarian.org>
+
+ * lyx_gui.C: implement remove_read_callback()
+
2002-07-26 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* XWorkArea.C (work_area_handler): change type of
{
fl_add_io_callback(fd, FL_READ, C_read_callback, comm);
}
+
+
+void lyx_gui::remove_read_callback(int fd)
+{
+ fl_remove_io_callback(fd, FL_READ, C_read_callback);
+}
return;
if ((outfd = startPipe(outPipeName(), true)) == -1) {
- endPipe(infd, inPipeName());
+ endPipe(infd, inPipeName(), false);
return;
}
return;
}
- endPipe(infd, inPipeName());
- endPipe(outfd, outPipeName());
+ endPipe(infd, inPipeName(), false);
+ endPipe(outfd, outPipeName(), true);
ready = false;
}
}
-void LyXComm::endPipe(int & fd, string const & filename)
+void LyXComm::endPipe(int & fd, string const & filename, bool write)
{
if (fd < 0)
return;
+ if (!write) {
+ lyx_gui::remove_read_callback(fd);
+ }
+
#ifdef __EMX__
APIRET rc;
int errnum;
void LyXComm::emergencyCleanup()
{
if (!pipename.empty()) {
- endPipe(infd, inPipeName());
- endPipe(outfd, outPipeName());
+ endPipe(infd, inPipeName(), false);
+ endPipe(outfd, outPipeName(), true);
}
}
int startPipe(string const &, bool);
/// finish a pipe
- void endPipe(int &, string const &);
+ void endPipe(int &, string const &, bool);
/// This is -1 if not open
int infd;