BenP
2009-03-07, 18:32
I'm trying to write a Perl script that runs a SAS program on a remote server with user-input parameters from an HTML form. If the SAS program completes quickly enough, I want the results returned as HTML in real time; otherwise I want to display a message and email the user with the results when the SAS program finishes.
I'm trying to fork off a child to make a system call for rexec to run the SAS program, and have the parent wait for either a timeout or a completed program. But it seems like the child doesn't even run the rexec line. It immediately returns -1. Apparently Net::SSH isn't installed so I can't use that instead. I can successfully FTP a SAS config file from the HTML form in the child process.
Any advice on what I might be doing wrong with rexec? It works fine if it's not called in the child. It also works if I run the same command in the command line.
I'm trying to fork off a child to make a system call for rexec to run the SAS program, and have the parent wait for either a timeout or a completed program. But it seems like the child doesn't even run the rexec line. It immediately returns -1. Apparently Net::SSH isn't installed so I can't use that instead. I can successfully FTP a SAS config file from the HTML form in the child process.
Any advice on what I might be doing wrong with rexec? It works fine if it's not called in the child. It also works if I run the same command in the command line.