From: Thomas Luedeke Date: 2008-08-14T05:13:37+09:00 Subject: Re: Potentially issues with "system" command (Nuby) Thomas Luedeke wrote: > Thomas Luedeke wrote: >> This question is a little complicated, so I'll try to describe the >> underlying issue in detail. >> >> I'm using a Ruby script as a "glue" to link several engineering codes >> together. To run each individual code, we utilize a production >> submission system (call it 'PROD'). So I'm using Ruby to create input >> files, submit the underlying engineering code run by invoking PROD with >> the input file I've created. I then post-process the output of the >> engineering code, and link it up to the next code by creating new input >> files. >> >> To invoke PROD, I'm using a system command of the type 'system( "PROD >> options" )', where everything inside the single quotes is the command I >> issue, and the options are PROD options. >> >> This works pretty well until in one of the executions of an underlying >> engineering code, the code prematurely terminates in the middle of a >> run. If I take the identical input file and run it directly (using >> *exactly* the same command as the system call above), it runs perfectly. >> >> Are there some effects of "system" that I'm not aware of, being that I'm >> a Nuby? One thought I had is that numerous system calls chew up memory >> until I simply cannot run anything more. >> >> Any speculations that anybody might have?? >> >> Respectfully, TPL > > > Just as clarification, I'm not doing anything process-wise (nothing like > fork). I just make the system call, wait until it is done, move to the > area where the output files are, then start the linkage with the next > code. Sorry, one last clarification. If I write a three line code running the same input file, using the same system command, it runs to completion. So something with regards to the lengthy script is interfering with the process. Is this indicative of a memory issue? -- Posted via http://www.ruby-forum.com/.