Changeset 7917 for trunk/Ohana/src/opihi/pclient/job.c
- Timestamp:
- Jul 16, 2006, 10:58:49 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/pclient/job.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/pclient/job.c
r4762 r7917 7 7 8 8 if (argc < 2) { 9 fprintf (stderr, "USAGE: job (arg0) (arg1) ... (argN)\n");10 fprintf (GetOutfile(), "STATUS %d\n", -2);9 gprint (GP_ERR, "USAGE: job (arg0) (arg1) ... (argN)\n"); 10 gprint (GP_LOG, "STATUS %d\n", -2); 11 11 return (FALSE); 12 12 } 13 13 14 14 if (ChildStatus != PCLIENT_NONE) { 15 fprintf (stderr, "need to clear existing child\n");16 fprintf (GetOutfile(), "STATUS %d\n", -3);15 gprint (GP_ERR, "need to clear existing child\n"); 16 gprint (GP_LOG, "STATUS %d\n", -3); 17 17 return (FALSE); 18 18 } … … 31 31 pid = fork (); 32 32 if (!pid) { /* must be child process */ 33 /* fprintf (stderr, "starting child process %s...\n", targv[0]); */33 /* gprint (GP_ERR, "starting child process %s...\n", targv[0]); */ 34 34 35 35 /* close the other ends of the pipes */ … … 50 50 /* exec job */ 51 51 status = execvp (targv[0], targv); 52 fprintf (stderr, "error starting child process: %d\n", status);52 gprint (GP_ERR, "error starting child process: %d\n", status); 53 53 exit (1); 54 54 } … … 73 73 ChildPID = pid; 74 74 75 fprintf (GetOutfile(), "STATUS %d\n", ChildPID);75 gprint (GP_LOG, "STATUS %d\n", ChildPID); 76 76 return (TRUE); 77 77 … … 85 85 if (child_stderr_fd[1] != 0) close (child_stderr_fd[1]); 86 86 87 fprintf (GetOutfile(), "STATUS %d\n", -1);87 gprint (GP_LOG, "STATUS %d\n", -1); 88 88 return (FALSE); 89 89 }
Note:
See TracChangeset
for help on using the changeset viewer.
