Script on Solaris spawning 2 processes for one shell script execution

Hi,

I am having a shell script on Solaris 10 which has a while loop as shown below.

#!/usr/bin/ksh
#
while [ ! -f LANDDIR/TRIGGERFILE ]
do
  sleep 60
done

Name of the shell script is coldcentric.sh. I executed script /DATAWAREHOUSE/LOAD/Scripts/coldcentric.sh from a command task in Informatica worklow as shown below.

ksh -c /DATAWAREHOUSE/LOAD/Scripts/coldcentric.sh

After this, I see 2 processes created for this shell script execution on Solaris which is not expected. For one script execution, i would expect one process to be created.

% ps -ef | grep '[c]oldcentric'
     DW  3146  3145   0 12:24:56 ?           0:00 /usr/bin/ksh -c /DATAWAREHOUSE/LOAD/Scripts/coldcentric.sh
     DW  3145 13496   0 12:24:56 ?           0:00 sh -c ksh -c /DATAWAREHOUSE/LOAD/Scripts/coldcentric.sh

[/CODE]

I would appreciate if anybody helps me finding out the root cause for this.

Thanks

I have little knowledge of Informatica but from the looks of the process table looks like you should use this in Informatica workflow:

/DATAWAREHOUSE/LOAD/Scripts/coldcentric.sh

instead of:

ksh -c /DATAWAREHOUSE/LOAD/Scripts/coldcentric.sh

It's as if Informatica was appending "sh -c" to whatever command you execute.

Besides, the shell script should already contain a valid shebang so there's no need to duplicate it in the command line.

I did modify as per your suggestion. I removed first line shebang and modified script execution through command task as below

/DATAWAREHOUSE/LOAD/Scripts/coldcentric.sh

But still i see 2 processes getting created as below.

 % ps -ef | grep '[c]oldcentric'
     DW  3623  3622   0 09:25:37 ?           0:00 sh -c /DATAWAREHOUSE/LOAD/Scripts/coldcentric.sh
     DW  3622 26562   0 09:25:37 ?           0:00 sh -c /DATAWAREHOUSE/LOAD/Scripts/coldcentric.sh

When i run the same script using ksh -c /DATAWAREHOUSE/LOAD/Scripts/coldcentric.sh, then i see only one process getting created.

As mentioned by you, informatica by default uses sh -c to execute scripts.

That's strange. Is the while loop the only content of the script?