-
- if (rc != NO_ERROR) {
- errnum = TranslateOS2Error(rc);
- lyxerr <<"LyXComm: Could not create pipe " << filename
- << strerror(errnum) << endl;
- return -1;
- };
- // Listen to it.
- rc = DosConnectNPipe(os2fd);
- if (rc != NO_ERROR && rc != ERROR_PIPE_NOT_CONNECTED) {
- errnum = TranslateOS2Error(rc);
- lyxerr <<"LyXComm: Could not create pipe " << filename
- << strerror(errnum) << endl;
- return -1;
- };
- // Imported handles can be used both with OS/2 APIs and emx
- // library functions.
- fd = _imphandle(os2fd);
-#else
- if (::access(filename.c_str(), F_OK) == 0) {
- lyxerr << "LyXComm: Pipe " << filename << " already exists.\n"
- << "If no other LyX program is active, please delete"
- " the pipe by hand and try again." << endl;
- pipename.erase();
- return -1;
- }
-
- if (::mkfifo(filename.c_str(), 0600) < 0) {