Skip to content
Permalink
Browse files
Better Mac fix for GRASS shell. Use global namespace qualifier so tha…
…t system close rather then QWidget::close is linked to. The previous fix left an orphan pty on exit.

git-svn-id: http://svn.osgeo.org/qgis/trunk@9159 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
telwertowski committed Aug 24, 2008
1 parent b981f3a commit 5f428f24b039a48c9c4319711973232718432e63
Showing with 3 additions and 6 deletions.
  1. +3 −6 src/plugins/grass/qgsgrassshell.cpp
@@ -159,7 +159,7 @@ QgsGrassShell::QgsGrassShell( QgsGrassTools *tools,
QgsDebugMsg( QString( "master ttyname = %1" ).arg( ttyname( mFdMaster ) ) );
QgsDebugMsg( QString( "slave ttyname = %1" ).arg( ttyname( fdSlave ) ) );

//close ( fdSlave ); // -> crash
//::close( fdSlave ); // -> crash

// Fork slave and open shell
int pid = fork();
@@ -176,12 +176,9 @@ QgsGrassShell::QgsGrassShell( QgsGrassTools *tools,
QgsDebugMsg( "child ->" );

// TODO close all opened file descriptors - close(0)???
#ifndef Q_OS_DARWIN
// Makes child process unusable on Mac
close( mFdMaster );
#endif
::close( mFdMaster );

//close ( fdSlave ); // -> freeze
//::close( fdSlave ); // -> freeze

setsid();
seteuid( 0 );

0 comments on commit 5f428f2

Please sign in to comment.