Reputation: 457
I am invoking a aix shell script from java with Runtime.exec method. The shell script takes a file name as input. Based on the file name the operation inside the script is written.The output of the shell depends on the input parameter.
If multiple java threads are invoking the shell script parallely at the same time ,will it create a problem? (Each java thread may call the script with different file name.) Do I have to write a separate shell script for each parallel execution ?
Upvotes: 0
Views: 384
Reputation: 43728
As long as the shell script itself can run in parallel without disturbing the other invocations, this will not create a problem.
For each invocation of the script a separate process (on aix level) is spawned.
Upvotes: 3