Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Apr 2014 11:54:45 -0500
From:      Guy Helmer <guy.helmer@gmail.com>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r264617 - head/libexec/atrun
Message-ID:  <BA33FEAF-59FC-4B88-9B0B-3B4467443B67@gmail.com>
In-Reply-To: <201404171600.s3HG0Rvf019250@svn.freebsd.org>
References:  <201404171600.s3HG0Rvf019250@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_C3830BCC-5507-4B1A-8426-561FC9D0897F
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

On Apr 17, 2014, at 11:00 AM, Guy Helmer <ghelmer@FreeBSD.org> wrote:

> Author: ghelmer
> Date: Thu Apr 17 16:00:26 2014
> New Revision: 264617
> URL: http://svnweb.freebsd.org/changeset/base/264617
>=20
> Log:
>  Fix releasing the lock in the parent atrun process after the queue
>  directory has been processed. Otherwise, a long-running child process
>  caused other atrun invocations to stall unnecessarily.
>=20

I neglected to note that this was submitted by J.R. Oldroyd  jr at =
opal.com

> Modified:
>  head/libexec/atrun/atrun.c
>=20
> Modified: head/libexec/atrun/atrun.c
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
> --- head/libexec/atrun/atrun.c	Thu Apr 17 15:44:21 2014	=
(r264616)
> +++ head/libexec/atrun/atrun.c	Thu Apr 17 16:00:26 2014	=
(r264617)
> @@ -567,6 +567,12 @@ main(int argc, char *argv[])
>     if (run_batch && (gloadavg() < load_avg))
> 	run_file(batch_name, batch_uid, batch_gid);
>=20
> +    if (flock(dirfd(spool), LOCK_UN) =3D=3D -1)
> +	perr("cannot unlock %s", ATJOB_DIR);
> +
> +    if (closedir(spool) =3D=3D -1)
> +	perr("cannot closedir %s", ATJOB_DIR);
> +
>     closelog();
>     exit(EXIT_SUCCESS);
> }
>=20


--Apple-Mail=_C3830BCC-5507-4B1A-8426-561FC9D0897F
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQEcBAEBCgAGBQJTUAdVAAoJEJmJzK+PHOvEZVEH/3cVBr03KnwzSOHH3S/5M77R
PAlMx2eDxaBJqzcN0cAxrPtOmFnWTIUL3H29sNDCkGSVwM/B0ITrOxQfmxCqCbI7
MuCNIjDz04HnmauBcZierjs/N8KG7pn7x/pjQ0DKFMi6bpvWVY16mE1/ZQqS7SjK
43zxUlZJhG9RCQYZZWBurpgWQgltcMulZBDgH3891tQ7Z2i2hkj5kj/GRDbTdkIw
64YJ1cGl0PKi+rzLiCavzxlG7YWS1EKsECR3yE3AUDmLYMjKzOA3GTva3+McU0R+
JyRIEVegVKwASAdOliq/JjlX3GJV9EJR6aEOvSFtZiQSUCEL+J8K0ExmQGwb2i4=
=yQc0
-----END PGP SIGNATURE-----

--Apple-Mail=_C3830BCC-5507-4B1A-8426-561FC9D0897F--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BA33FEAF-59FC-4B88-9B0B-3B4467443B67>