[torquedev] patch: qsub.c - fclose() should be pclose() for filter_pipe

Toni L. Harbaugh-Blackford [Contr] harbaugh at ncifcrf.gov
Tue Feb 27 08:35:07 MST 2007

In qsub.c, the submit filter pipe is opened with popen() but closed
with fclose().  While this still appears to work on linux, it does
not work on IRIX because the exit value of the pipe is not returned.
The fix is to close the pipe with pclose(), which still works on linux:

--- torque-2.2.0-snap.200611291634/src/cmds/qsub.c_orig	Wed Nov 29 18:34:48 2006
+++ torque-2.2.0-snap.200611291634/src/cmds/qsub.c	Tue Feb 27 10:27:02 2007
@@ -502,7 +502,7 @@

-    rc = fclose(filter_pipe);
+    rc = pclose(filter_pipe);


Toni Harbaugh-Blackford                   harbaugh at abcc.ncifcrf.gov
System Administrator
Advanced Biomedical Computing Center (ABCC)
National Cancer Institute
Contractor - SAIC/Frederick

More information about the torquedev mailing list