EXEC - PERL

paulman
Posts: 40
Joined: Tue Dec 19, 2000 4:08 pm

EXEC - PERL

Post by paulman »

I'm trying to use the exec command in a Vortex script to call a PERL script while passing in a few parameters:

<$var1="202">
<$var2="12840~761">
<EXEC /bin/perl /usr/local/ps/search/getFoundData.pl $var1 $var2 >
</EXEC>

This is returns:

<!-- 118 /search/searchnow_simple:89: <EXEC> command /bin/perl returned exit code 2 -->

I thought that it might be having a problem with the variables so I tried running it with values placed in the exec:

<EXEC /bin/perl /usr/local/ps/search/getFoundData.pl 202 12840~761><EXEC>

This gets the same error message. I can run this from the command line without any problems. Do you have any idea why this doesn't work?
User avatar
John
Site Admin
Posts: 2623
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH

EXEC - PERL

Post by John »

You would need to look at the perl script to see why it might return exit code 2. It may be working fine, but just setting an exit code.
John Turnbull
Thunderstone Software
paulman
Posts: 40
Joined: Tue Dec 19, 2000 4:08 pm

EXEC - PERL

Post by paulman »

I originally installed Texis under the user 'nobody'. I assume that Texis will use that user when running the scripts? Is there a way to change users in the script or to run the EXEC as another user? The script won't run correctly as this user.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

EXEC - PERL

Post by mark »

Only root can run processes as another user. You would have to make texis, and it's databases, owned and setuid to some other user for exec to run as that user.