Skip to content

Commit

Permalink
Better Mac fix for GRASS shell. Use global namespace qualifier so tha…
Browse files Browse the repository at this point in the history
…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 5f428f2
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/plugins/grass/qgsgrassshell.cpp
Expand Up @@ -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();
Expand All @@ -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 );
Expand Down

0 comments on commit 5f428f2

Please sign in to comment.