+2002-07-31 John Levon <levon@movementarian.org>
+
+ * lyxserver.C: don't let incidental errors get
+ in the way (errno)
+
2002-07-30 John Levon <levon@movementarian.org>
* lyxfunc.C: disable character dialog in ERT inset (partial fix)
errno = 0;
int status;
// the single = is intended here.
- while ((status = read(infd, charbuf, CMDBUFLEN-1))) {
+ while ((status = read(infd, charbuf, CMDBUFLEN - 1))) {
+ int rerrno = errno;
+
if (status > 0) {
charbuf[status]= '\0'; // turn it into a c string
lsbuf += rtrim(charbuf, "\r");
//\n or not \n?
}
}
- if (errno == EAGAIN) {
+ if (rerrno == EAGAIN) {
errno = 0;
return;
}
- if (errno != 0) {
- lyxerr << "LyXComm: " << strerror(errno) << endl;
- if (!lsbuf.empty())
- {
+ if (rerrno != 0) {
+ lyxerr << "LyXComm: " << strerror(rerrno) << endl;
+ if (!lsbuf.empty()) {
lyxerr << "LyxComm: truncated command: "
<< lsbuf << endl;
lsbuf.erase();