refraction part 4
[mancala] / src / launcher / mancala-launcher.c
index 9bdf039..9c9624c 100644 (file)
@@ -17,10 +17,21 @@ char *argh[] = { "/usr/games/wrapper/wrapper",
 
 int main(int argc, char *argv[])
 {
-    fprintf(stderr, "mancala launcher...\n");
+    
+    FILE *pFile;
+    
+    pFile = fopen ("/home/rzingg/mancala.debug", "a");
+    if (pFile) {
+        fprintf (pFile, "app launched...\n");
+        fclose (pFile);
+    }
     
     if (execv ("/usr/games/wrapper/wrapper", argh) == -1) {
-        fprintf(stderr, "can not execute wrapper\n");
+        pFile = fopen ("/home/rzingg/mancala.debug", "a");
+        if (pFile) {
+            fprintf (pFile, "cannot execute wrapper...\n");
+            fclose (pFile);
+        }
     }
 
     return 0;