note
betterworld
<blockquote><em>system("/opt/bea/domains/fsa/scripts/start.sh fsaAs02 -q 3>$tmpnam");</em></blockquote>
<p>Yes, that seems right.</p>
<p>Shell redirections:</p>
<p><c>"command > file"</c> redirects standard output into a file. Standard output is file descriptor 1.</p>
<p><c>"command < file"</c> redirects standard input from a file. Standard input is file descriptor 0.</p>
<p>Standard error is file descriptor 2, and the first free descriptor is usually 3. Therefore I used <c>"command 3> file"</c> so that the (dummy) file descriptor 3 is connected to a temporary file, which was created using File::Temp.</p>
<p>In my experience, open files are a very nice means to keep track of a running process. The command "fuser" can be used to find the processes that are connected to a file. "fuser" will kill these processes when "-k" is specified.</p>
999179
999403