<p class="p5"><span class="s5">If </span><span class="s6">wait</span><span class="s5"> is </span><span class="s6">T</span><span class="s5"> (the default), </span><span class="s6">system()</span><span class="s5"> will wait for the command to finish, and return the output generated as a </span><span class="s6">string</span><span class="s5"> vector, as described above.<span class="Apple-converted-space"> </span>If </span><span class="s6">wait</span><span class="s5"> is </span><span class="s6">F</span><span class="s5">, </span><span class="s6">system()</span><span class="s5"> will instead append </span><span class="s6">" &"</span><span class="s5"> to the end of the command line to request that it be run in the background, and it will not collect and return the output from the command; instead it will return </span><span class="s6">string(0)</span><span class="s5"> immediately.<span class="Apple-converted-space"> </span>If the output from the command is needed, it could be redirected to a file, and that file could be checked periodically in Eidos for some indication that the command had completed; if output is not redirected to a file, it may appear in SLiM’s output stream.<span class="Apple-converted-space"> </span>If the final command line executed by </span><span class="s6">system()</span><span class="s5"> ends in </span><span class="s6">" &"</span><span class="s5">, the behavior of </span><span class="s6">system()</span><span class="s5"> should be just as if </span><span class="s6">wait=T</span><span class="s5"> had been supplied, but it is recommended to use </span><span class="s6">wait=T</span><span class="s5"> instead to ensure that the command line is correctly assembled.</span></p>
0 commit comments