[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.dltk] Re: Launching Remote Files

Hi,

I have worked on this issue and tried to debug RSEExecEnvironment.exec() method from org.eclipse.dltk.rse.core plugin .consider the following code of dltk framework:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. // Sometimes environment variables aren't set, so use export.
2. if (environment != null) {
3.
4. hostShell.writeToShell(SHELL_PATH);
5.
6. // TODO: Skip environment variables what is already in shell.
7. for (int i = 0; i < environment.length; i++) {
8. hostShell.writeToShell(EXPORT_CMD
9. + toShellArguments(environment[i]));
}
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here, in our case we dont have any environment settings. However environment is checked only for null condition at line 2.In our case, the environment is an empty string array,in which case we want to bypass this processing inside the if loop. Here we observed that the SHELL_PATH which is "exec /bin/sh" ,which seems to be a issue in our case.It destroys our current session and after that any commands we fire does not work.Hence we want to bypass the if condition.


Hence is it possible to change the "if condition" by adding a check for empty string array?

Please Confirm.

Regards
Sheela