Shell script executed from Informatica ETL tool is spawning 2 processes for one script

Hi,

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

while [ ! -f LANDDIR/TRIGGERFILE ]
do
  sleep 60
done

I am executing this script from Informatica ETL tool command task from where we can execute UNIX commands/scripts. When i do that, i am seeing 2 processes getting started for one script execution.

When i execute the same script through unix command line, i can see only one process created.

Anybody has any idea on why 2 processes are getting created for one script execution through Informatica ETL tool ?

thanks

The bash shell usually runs while loops in a subshell (hence another process is spawned), perhaps you unix command line is ksh?

@Chubler_XL,
Whenever i am executing this script through informatica command task, issue of 2 process creation for one script execution is occurring. If i execute the script at command line, one process will get created. This is irrespective of shell thats being used.

I am seeing one more process for the script execution getting created. Please see below.

% ps -ef | grep '[c]oldcentric'
     DW 29690 13496   0 14:37:07 ?           0:00 sh -c /DATAWAREHOUSE/LOAD/Scripts/coldcentric.sh
     DW 29691 29690   0 14:37:08 ?           0:00 sh -c /DATAWAREHOUSE/LOAD/Scripts/coldcentric.sh

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

./DATAWAREHOUSE/LOAD/Scripts/coldcentric.sh

When i abort command task or workflow, i am seeing only first process among above 2 process getting killed and second process would be alive and will not get killed. It becomes orphan and kernel process id gets tagged to this process. It remains by utilizing CPU.

After aborting worklow, below still remains.

% ps -ef | grep '[c]oldcentric'
DW 29691 11490   0 14:37:08 ?           0:00 sh -c /DATAWAREHOUSE/LOAD/Scripts/coldcentric.sh

I am using a while loop in my script as shown below.

while [ ! -f LANDDIR/TRIGGERFILE ]
do
  sleep 60
done

I am executing other scripts in my other ETLs and i am not facing this issue. There is no while loop like above in those scripts. Is this creating a problem ?

Thanks,