- if (isp_pid == -1) {
- error_ =
- "\n\n"
- "The spellcheck-process has died for some reason.\n"
- "*One* possible reason could be that you do not have\n"
- "a dictionary file for the language of this document\n"
- "installed.\n"
- "Check your spellchecker or set another dictionary\n"
- "in the Spellchecker Options menu.\n\n";
- } else {
- error_ = 0;
+ fd_set infds;
+ struct timeval tv;
+ int retval = 0;
+ FD_ZERO(&infds);
+ FD_SET(pipeout[0], &infds);
+ FD_SET(pipeerr[0], &infds);
+ tv.tv_sec = 2;
+ tv.tv_usec = 0;
+
+ retval = ::select(SELECT_TYPE_ARG1 (max(pipeout[0], pipeerr[0]) + 1),
+ SELECT_TYPE_ARG234 (&infds),
+ 0,
+ 0,
+ SELECT_TYPE_ARG5 (&tv));
+
+ // error
+ if (retval <= 0)
+ return true;
+
+ if (FD_ISSET(pipeerr[0], &infds)) {
+ fgets(buf, BUFSIZ, inerr);
+ err_read = true;
+ return false;