[Swift-devel] Problem calling atomic procedure with multiple args via Falkon

Michael Wilde wilde at mcs.anl.gov
Mon Apr 7 12:18:26 CDT 2008



On 4/7/08 1:18 AM, Ben Clifford wrote:
> On Sun, 6 Apr 2008, Michael Wilde wrote:
> 
>> involves wrapper.sh using system(). The IFS char "|" is causing the cmd 
>> to end there.
> 
> [...]
> 
>> Can anyone spot where the problem is?
> 
> Using system to invoke the command is perhaps a bad thing to do - the 
> other layers in the stack (including in Falkon in the Java worker) keep 
> the arguments in array-like data structures to help avoid need for 
> quoting.

That makes sense. Can you start some documentation fragments in the 
users guide on how quoting and tokenization works for atomic procedures 
from the swift declaration down to the actual invocation?

something like:

- each token in the app {} declaration becomes one arg to execve()
- strings must be enclosed in quotes
- quotes and other special chars within the strings can be represented as...
- quotes are expected to pass through the provider interfaces(GRAMs, 
PBS, Falkon etc) without further processing or alteration...???
-etc

> The C worker isn't portable enough to build on my laptop so I can't easily 
> play there, but you might try yourself replacing the system call with 
> execve or something like that.

That sounds reasonable - we can do that.

I was able to work around the problem for the moment by changing | to 
"," just before the system() call, but I agree that execve() is the 
right way to do things.

- Mike




More information about the Swift-devel mailing list