svn commit: r264617 - head/libexec/atrun
Guy Helmer
guy.helmer at gmail.com
Thu Apr 17 16:54:50 UTC 2014
On Apr 17, 2014, at 11:00 AM, Guy Helmer <ghelmer at FreeBSD.org> wrote:
> Author: ghelmer
> Date: Thu Apr 17 16:00:26 2014
> New Revision: 264617
> URL: http://svnweb.freebsd.org/changeset/base/264617
>
> 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.
>
I neglected to note that this was submitted by J.R. Oldroyd jr at opal.com
> Modified:
> head/libexec/atrun/atrun.c
>
> Modified: head/libexec/atrun/atrun.c
> ==============================================================================
> --- 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);
>
> + if (flock(dirfd(spool), LOCK_UN) == -1)
> + perr("cannot unlock %s", ATJOB_DIR);
> +
> + if (closedir(spool) == -1)
> + perr("cannot closedir %s", ATJOB_DIR);
> +
> closelog();
> exit(EXIT_SUCCESS);
> }
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20140417/a32c9ef7/attachment.sig>
More information about the svn-src-all
mailing list