in reply to Re^3: CLASSPATH problem when using backticks
in thread CLASSPATH problem when using backticks
Banning all use of the single-argument forms of exec, system, etc. is probably too draconian.
Not really. It would just force the shell to be mentioned explicitly when it's needed. For example,
system('sh', '-c', 'some_program >output 2>&1');
That would hurt portability to Windows, but launching processes in Windows is so messed up already. And not just at the shell level, at the system level. All the arguments you carefully separated are assembled into a command line, cause that's the only way the system can pass args to a program.
|
|---|