Skip to content

Commit

Permalink
Fix for issue SpartanJ/ecode#366.
Browse files Browse the repository at this point in the history
  • Loading branch information
SpartanJ committed Dec 12, 2024
1 parent 43a6f34 commit 6c55225
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/modules/eterm/src/eterm/system/process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,8 @@ Process::createWithPseudoTerminal( const std::string& program, const std::vector
exit( 1 );
}

// Make sure all non stdio file descriptors are closed before exec
int fdlimit = (int)sysconf( _SC_OPEN_MAX );
for ( int i = 3; i < fdlimit; i++ )
close( i );
if ( (int)pseudoTerminal.mSlave > 2 )
close( (int)pseudoTerminal.mSlave );

#ifdef __OpenBSD__
if ( pledge( "stdio getpw proc exec", NULL ) == -1 ) {
Expand Down

0 comments on commit 6c55225

Please sign in to comment.