[torqueusers] [PATCH] fix zombie pbs_iff processes
jacksond at supercluster.org
Tue Nov 2 10:43:49 MST 2004
Thanks for the patch. It is rolled into the pre-patch5 snapshot. The
code is getting a lot better with all of these contributions! Please
keep them coming.
On Tue, 2004-11-02 at 00:52, Garrick Staples wrote:
> On Tue, Oct 26, 2004 at 12:05:10PM -0700, Garrick Staples alleged:
> > Also, I've long suspected a bug in the client libs that fail to reap failed
> > pbs_iff processes. This is evident in longer running clients like 'qsub -I'
> > and pbstop. If one pbs_iff times out, it stays around as a zombie.
> I think I found this. It wasn't calling pclose() when it didn't read the
> correct value. Also removed some unnecessary casts.
> diff -ruN torque-1.1.0p4_orig/src/lib/Libifl/pbsD_connect.c torque-1.1.0p4/src/lib/Libifl/pbsD_connect.c
> --- torque-1.1.0p4_orig/src/lib/Libifl/pbsD_connect.c 2004-10-28 15:50:48.000000000 -0700
> +++ torque-1.1.0p4/src/lib/Libifl/pbsD_connect.c 2004-11-01 23:21:35.000000000 -0800
> @@ -243,15 +243,16 @@
> (void)sprintf(cmd, "%s %s %u %d", IFF_PATH, server_name, server_port,
> - piff = (FILE *)popen(cmd, "r");
> + piff = popen(cmd, "r");
> - if (piff == (FILE *)0)
> + if (piff == NULL)
> i = read(fileno(piff),&cred_type,sizeof(int));
> if ((i != sizeof (int)) || (cred_type != PBS_credentialtype_none))
> + j = pclose(piff);
More information about the torqueusers