Hi,

When submitting a PROCESS START request without the SHELL option, on Unix 
STAF will call execve and pass it "<command>".  When submitting a PROCESS 
START request with the SHELL option, on Unix STAF will call execve and 
pass it "sh -c <command>".  Maybe you can try running "sh -c ./server" to 
see if that also gives you an error.  You can view the STAF source code 
that starts Unix processes here: 
http://staf.cvs.sourceforge.net/viewvc/staf/src/staf/stafif/unix/STAFProcess.cpp?revision=1.32&view=markup

The (execve):8 error that you are getting without the SHELL option means:
#define ENOEXEC          8      /* Exec format error */
[ENOEXEC]
The new process image file has the appropriate access permission but has 
an unrecognized format.
http://www.opengroup.org/onlinepubs/000095399/functions/exec.html

David Bender
STAF/STAX Development
(512-286-5315)
IBM Austin Bldg. 903-5B002
Internet: bda...@us.ibm.com




"Srinivas N.CH." <nch.srini...@gmail.com> 
02/24/2009 09:53 PM

To
David Bender/Austin/i...@ibmus
cc

Subject
Re: [staf-users] Error while running a shell script through STAF command 
line.






Hi David,
 
Thanks for reply. I've executed scripts before with out using SHELL option 
in PROCESS START command. I donno why its showing error now. I my test 
scrips I've used PROCESS START command only. I need to change all of them 
if this doesn't work....

On Tue, Feb 24, 2009 at 8:49 PM, David Bender <bda...@us.ibm.com> wrote:

If you want to execute a shell script, then you need to use the SHELL 
option on the PROCESS START request.  Is there a reason you don't want to 
use the SHELL option? 

David Bender
STAF/STAX Development
(512-286-5315)
IBM Austin Bldg. 903-5B002
Internet: bda...@us.ibm.com



"Srinivas N.CH." <nch.srini...@gmail.com> 
02/24/2009 08:17 PM 


To
staf-users@lists.sourceforge.net 
cc

Subject
[staf-users] Error while running a shell script through STAF       
 command line.









Hi, 
  
I'm facing a problem while running a shell script from staf. The shell 
script "server" runs fine only when I execute it through "process start 
shell command ./server ". 
Same script when executed through "process start command ./server" STAF 
throws  "STAFProcess::processMonitorThread: Could not start process 
(execve):8". 
Please find the log below.. 
  
[r...@vpi43s3 cthon04]# staf local process start command ./server WORKDIR 
/root/qa/suites/nfs_tests/cthon04 returnSTDOUT returnSTDERR WAIT 
Response 
-------- 
{ 
  Return Code: 1 
  Key        : <None> 
  Files      : [ 
    { 
      Return Code: 0 
      Data       : 
20090224-19:08:11;1152985408;00000100;STAFProcess::processMonitorThread: 
Could not start process (execve):8 
    } 
    { 
      Return Code: 0 
      Data       : 
    } 
  ] 
} 
[r...@vpi43s3 cthon04]# staf local process start shell command ./server 
WORKDIR /root/qa/suites/nfs_tests/cthon04 returnSTDOUT returnSTDERR WAIT 
--(runs fine) 
Response 
-------- 
{ 
  Return Code: 1 
  Key        : <None> 
  Files      : [ 
    { 
      Return Code: 0 
      Data       : usage: server [-a|-b|-g|-s|-l|-c] [-f|-t|-n|-h] [-o 
mnt_options] [-p server_path] [-m mntpoint] [-N passes] server_name 
    } 
    { 
      Return Code: 0 
      Data       : 
    } 
  ] 
} 
[r...@vpi43s3 cthon04]# 
  
Anybody tell me whats the issue here. How can I resolve this. 
  
Regards, 
Srinivas.
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, 
CA
-OSBC tackles the biggest issue in open source: Open Sourcing the 
Enterprise
-Strategies to boost innovation and cut costs with open source 
participation
-Receive a $600 discount off the registration fee with the source code: 
SFAD
http://p.sf.net/sfu/XcvMzF8H_______________________________________________

staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to