We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 56329d2 commit 336dc01Copy full SHA for 336dc01
src/plugins/grass/qgsgrassshell.cpp
@@ -250,19 +250,22 @@ QgsGrassShell::~QgsGrassShell()
250
// TODO: find signal to write history before exit
251
// instead of sending 'exit'
252
253
- int ret = write( mFdMaster, "exit\015\012", 6);
254
- int status;
+ write( mFdMaster, "exit\015\012", 6);
255
+#ifndef WIN32
256
while ( 1 )
257
{
258
readStdout(0);
259
+
260
+ int status;
261
if ( waitpid ( mPid, &status, WNOHANG ) > 0 ) break;
262
263
struct timespec t, r;
264
t.tv_sec = 0;
265
t.tv_nsec = 10000000; // 0.01 s
266
nanosleep ( &t, &r );
267
}
268
+#endif
269
270
/*
271
std::cerr << "kill shell pid = " << mPid << std::endl;
0 commit comments