]> git.lyx.org Git - lyx.git/blobdiff - src/Server.cpp
continue spellchecking after "replace all"
[lyx.git] / src / Server.cpp
index 294943e3605a7f7228c3f0f2826cd2257ced6e47..d7a2e2514c285a26a533bfa67b39ac6bf79c6b5e 100644 (file)
@@ -183,12 +183,11 @@ int LyXComm::startPipe(string const & file, bool write)
        if (filename.exists()) {
                if (!write) {
                        // Let's see whether we have a stale pipe.
-                       errno = 0;
                        int fd = ::open(filename.toFilesystemEncoding().c_str(),
                                        O_WRONLY | O_NONBLOCK);
                        if (fd >= 0) {
                                // Another LyX instance is using it.
-                               close(fd);
+                               ::close(fd);
                        } else if (errno == ENXIO) {
                                // No process is reading from the other end.
                                stalepipe = true;