nicolas / debian.moreutils (public) (License: GPL-2, GPL-2+, Expat, BSD-2-Clause, Public Domain) (since 2018-09-25) (hash sha1)
Debian packaging of joeyh's moreutils

/lckdo.docbook (3fbf797b177d6933ce106cce2e8368e5094702ab) (3637 bytes) (mode 100644) (type blob)

<?xml version="1.0" encoding="utf-8"?>

<!--

Written by Michael Tokarev <mjt@tls.msk.ru>
Public domain.

-->

<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
[]>

<refentry>
	<refentryinfo>
		<address>
			<email>mjt@tls.msk.ru</email>
		</address>
		<author>
			<firstname>Michael</firstname>
			<surname>Tokarev</surname>
		</author>
		<date>2007-08-15</date>
	</refentryinfo>

	<refmeta>
		<refentrytitle>lckdo</refentrytitle>
		<manvolnum>1</manvolnum>
		<refmiscinfo class="manual">moreutils</refmiscinfo>
		<refmiscinfo class="source">moreutils</refmiscinfo>
	</refmeta>

	<refnamediv>
		<refname>lckdo</refname> 
		<refpurpose>run a program with a lock held</refpurpose>
	</refnamediv>

	<refsynopsisdiv>
		<cmdsynopsis>
			<command>lckdo</command>
			<arg>options</arg>
			<arg choice="req">lockfile</arg>
			<arg choice="req">program</arg>
			<arg>arguments</arg>
		</cmdsynopsis>
	</refsynopsisdiv>
	
	<refsect1>
		<title>DESCRIPTION</title>
		
		<para><command>lckdo</command> runs a program with a lock
		held, in order to prevent multiple processes from running in
		parallel. Use just like <command>nice</command> or
		<command>nohup</command>.</para>

		<para>Now that util-linux contains a similar command
		named <command>flock</command>, lckdo is deprecated,
		and will be removed from some future version of moreutils.
		</para>

	</refsect1>
	
	<refsect1>
		<title>OPTIONS</title>
		
		<variablelist>
		
		<varlistentry>
			<term><option>-w</option></term>
			<listitem>
				<para>If the lock is already held by another process,
				wait for it to complete instead of failing
				immediately.</para>
			</listitem>
		</varlistentry>
		
		<varlistentry>
			<term><option>-W {sec}</option></term>
			<listitem>
				<para>The same as -w but wait not more than sec
				seconds.</para>
			</listitem>
		</varlistentry>

		<varlistentry>
			<term><option>-e</option></term>
			<listitem>
				<para>Execute the program directly without forking and
				waiting (keeps an extra file descriptor open).</para>
			</listitem>
		</varlistentry>

		<varlistentry>
			<term><option>-E {nnn}</option></term>
			<listitem>
				<para>Set the file descriptor number to keep open when
				exec()ing (implies -e).</para>
			</listitem>
		</varlistentry>

		<varlistentry>
			<term><option>-n</option></term>
			<listitem>
				<para>Do not create the lock file if it does not
				exist.</para>
			</listitem>
		</varlistentry>

		<varlistentry>
			<term><option>-q</option></term>
			<listitem>
				<para>Produce no output if lock is already held.</para>
			</listitem>
		</varlistentry>

		<varlistentry>
			<term><option>-s</option></term>
			<listitem>
				<para>Lock in shared (read) mode.</para>
			</listitem>
		</varlistentry>

		<varlistentry>
			<term><option>-x</option></term>
			<listitem>
				<para>Lock in exclusive (write) mode (default).</para>
			</listitem>
		</varlistentry>

		<varlistentry>
			<term><option>-t</option></term>
			<listitem>
				<para>Test for lock existence.</para>
			</listitem>
		</varlistentry>

		</variablelist>
		
	</refsect1>
	
	<refsect1>
		<title>EXIT STATUS</title>

        <para>If the lock was successfully acquired, the return value is that
        of the program invoked by <command>lckdo</command>. If the lock
        couldn't be acquired, EX_TEMPFAIL is returned. If there was a problem
        opening/creating or locking the lock file, EX_CANTCREAT or EX_OSERR
        will be returned.</para>
		
	</refsect1>
	
	<refsect1>
		<title>AUTHOR</title>
		<para>
			Michael Tokarev
		</para>
	</refsect1>

</refentry>


Mode Type Size Ref File
100644 blob 44 5d425843f23db3bb6970a55c953f345e3a8c8fe1 .gitattributes
100644 blob 17989 b7b5f53df1412df1e117607f18385b39004cdaa2 COPYING
100644 blob 1113 4f8af10c6b1b101e9fb3046bc3164ae1d6f5ab2d Makefile
100644 blob 1181 1bb90af3a954062b79c41840a150e8580dfec37a README
100755 blob 806 83a4eed00f82e3bcc81856149b47cffc4091f9aa check-isutf8
100755 blob 1330 f70091a75952981a4585a46cac6f1c73d37f0c70 chronic
100755 blob 3047 7f311d7aa58631795fcad87aa8fcc0f416a01796 combine
040000 tree - e0e5c3e9323435fc50b3822aa1ae90513ca34636 debian
100644 blob 5102 d2f68a1ac365a0c8df88d4b64a400f63fffe4c69 errno.c
100644 blob 3877 8d9b4acf28e4e85244dc43dce7fbf35bb2171f80 errno.docbook
100644 blob 13634 4210b75832b3d83f063daf7e6fff977a5478b1a4 ifdata.c
100644 blob 7339 47f414301c47a69a81694c3b5affd71261207d49 ifdata.docbook
100644 blob 3027 ff648cc55865f5bf9af76b9622b52b08a1b489fb ifne.c
100644 blob 2465 e9c45692b7b95e77ea0184732f883d278c9415f6 ifne.docbook
100644 blob 7598 971112457c834ca97fdecb5880dc7c749dc8ca44 isutf8.c
100644 blob 3088 f0d0dbe51a3e1afc2616807d631bcd15ccd07cbe isutf8.docbook
100644 blob 5471 4925409bd548b058f07defe913724868801040df lckdo.c
100644 blob 3637 3fbf797b177d6933ce106cce2e8368e5094702ab lckdo.docbook
100644 blob 5790 c5245316bf1ff46260e10caf09703f3dc7bc7db7 mispipe.c
100644 blob 2566 d65d1a45b1b47ba8d6fc7c87211cf4b26eb0feed mispipe.docbook
100644 blob 7131 af85a334d4b2e3c5750af05eedb14bba435c67be parallel.c
100644 blob 3992 87e58787b21e94d007f4f62b038296599e995f2f parallel.docbook
100644 blob 1188 a8565c0245914cfa8bc8fb2c46dcb83c7f1dd8ab pee.c
100644 blob 2324 f554ad05e29361c56ececa40f00a402559f4be9e pee.docbook
100644 blob 7301 a53a2cf1906998c91533f5f5435ceeeeb1a7cd59 physmem.c
100644 blob 9200 09d3971fdb020de4da825625bd6dbbec8521d803 sponge.c
100644 blob 2865 31bc6dbc244e5e5313a2b34871877878fce24827 sponge.docbook
100755 blob 3893 3ce73c9b1d051f42231f90a6ccad454acfdaba79 ts
100755 blob 4746 c7f12392fe90ef5c31ebf4a2952922127559073c vidir
100755 blob 1403 2bf640dbd13f46dea540cbc49b8295d07d25a883 vipe
100755 blob 2518 98d1445a5f8106f04be690f85d802a7f6decfd13 zrun
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/nicolas/debian.moreutils

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/nicolas/debian.moreutils

Clone this repository using git:
git clone git://git.rocketgit.com/user/nicolas/debian.moreutils

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main