mirror of
https://github.com/transmission/transmission
synced 2025-01-31 11:23:40 +00:00
(trunk libT) #4127 "Torrent complete script doesn't pass on the environment" -- fixed with patch from geirha.
The fix was to putenv() the new environment variables, then call execvp() instead of execve().
This commit is contained in:
parent
374ed10f3b
commit
13514e16a7
1 changed files with 3 additions and 1 deletions
|
@ -1950,7 +1950,9 @@ torrentCallScript( const tr_torrent * tor, const char * script )
|
|||
|
||||
if( !fork( ) )
|
||||
{
|
||||
execve( script, cmd, env );
|
||||
for (i=0; env[i]; ++i)
|
||||
putenv(env[i]);
|
||||
execvp( script, cmd );
|
||||
_exit( 0 );
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue