Index: /trunk/zoo-kernel/service_internal.c
===================================================================
--- /trunk/zoo-kernel/service_internal.c	(revision 254)
+++ /trunk/zoo-kernel/service_internal.c	(revision 255)
@@ -173,4 +173,5 @@
 }
 #else
+
 void unhandleStatus(maps *conf){
   int shmid,i;
@@ -209,5 +210,5 @@
     if ((shmid = shmget(key, SHMSZ, IPC_CREAT | 0666)) < 0) {
 #ifdef DEBUG
-      fprintf(stderr,"shmget failed to update value\n");
+      fprintf(stderr,"shmget failed to create new Shared memory segment\n");
 #endif
     }else{
@@ -220,6 +221,8 @@
 	tmpMap=getMapFromMaps(conf,"lenv","status");
 	s1=shm;
-	for(s=tmpMap->value;s!=NULL;s++)
+	for(s=tmpMap->value;*s!=NULL && *s!=0;s++){
 	  *s1++=*s;
+	}
+	*s1=NULL;
 	shmdt((void *)shm);
       }
Index: /trunk/zoo-services/utils/status/Makefile
===================================================================
--- /trunk/zoo-services/utils/status/Makefile	(revision 254)
+++ /trunk/zoo-services/utils/status/Makefile	(revision 255)
@@ -1,3 +1,3 @@
-CFLAGS=-I../../../zoo-kernel/ -I./ `xslt-config --cflags` `xml2-config --cflags` -DLINUX_FREE_ISSUE #-DDEBUG
+CFLAGS=-I../../../thirds/cgic206/ -I../../../zoo-kernel/ -I./ `xslt-config --cflags` `xml2-config --cflags` -lintl -lfcgi -lcrypto -DLINUX_FREE_ISSUE #-DDEBUG
 # if JS_ENABLED flag is set to true in your ZOO-Kernel Makefile then you'll have
 # uncomment the following line
Index: /trunk/zoo-services/utils/status/service.c
===================================================================
--- /trunk/zoo-services/utils/status/service.c	(revision 254)
+++ /trunk/zoo-services/utils/status/service.c	(revision 255)
@@ -72,9 +72,13 @@
       char tmp[128];
       sprintf(tmp,"_%s.xml",tmpMap->value);
-      while ((dp = readdir(dirp)) != NULL)
+      while ((dp = readdir(dirp)) != NULL){
+#ifdef DEBUG
+	fprintf(stderr,"File : %s searched : %s\n",dp->d_name,tmp);
+#endif
 	if(strstr(dp->d_name,tmp)!=0){
 	  sprintf(fileName,"%s/%s",tmpTmap->value,dp->d_name);
 	  hasFile=1;
 	}
+      }
     }else{
       char tmp[1024];
Index: /trunk/zoo-services/utils/status/test.sh
===================================================================
--- /trunk/zoo-services/utils/status/test.sh	(revision 255)
+++ /trunk/zoo-services/utils/status/test.sh	(revision 255)
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+rm -f log log1
+
+./zoo_loader.cgi "request=Execute&service=WPS&version=1.0.0&Identifier=longProcess&DataInputs=&storeExecuteResponse=true&status=true" > log
+
+if [ -z "$(grep "ows:ExceptionReport" log)" ]; then
+    while [ -z "$(grep "wps:ProcessSucceeded" log1)" ]; 
+    do 
+	./zoo_loader.cgi $(grep statusLocation= ./log | cut -d'?' -f2 | cut -d'"' -f1 | sed "s:amp;::g") > log1 ;
+	cat log1 ; 
+    done
+    cat log1
+else
+    echo "Service failed, please make sure that your main.cfg file contains"
+    echo "in the [main] section valid values for both tmpPath and dataPath."
+    echo 
+    cat log
+fi
