--- a/Admin/exec_process/exec_process.c Fri Nov 30 10:42:54 2012 +0100
+++ b/Admin/exec_process/exec_process.c Fri Nov 30 15:05:51 2012 +0100
@@ -28,15 +28,6 @@
char *script = argv[2];
- /* report pid */
-
- FILE *pid_file;
- pid_file = fopen(pid_name, "w");
- if (pid_file == NULL) fail("Cannot open pid file");
- fprintf(pid_file, "%d", getpid());
- fclose(pid_file);
-
-
/* setsid */
if (setsid() == -1) {
@@ -47,6 +38,15 @@
}
+ /* report pid */
+
+ FILE *pid_file;
+ pid_file = fopen(pid_name, "w");
+ if (pid_file == NULL) fail("Cannot open pid file");
+ fprintf(pid_file, "%d", getpid());
+ fclose(pid_file);
+
+
/* exec */
char *cmd_line[4];