lockfile



Liczniki odwiedzin | Księgi gości | Metal Lyrics | Znaczenie imion | Konwerter | Wolne domeny | Informacje o samochodach | Zakupy w UK | | | | | | | wyposażenie warsztatów | Wypoczynek nad jeziorami




NAME

       lockfile - conditional semaphore-file creator


SYNOPSIS

       lockfile -sleeptime | -r retries |
            -l locktimeout | -s suspend | -!  | -ml | -mu | file-
       name ...


DESCRIPTION

       lockfile can be used  to  create  one  or  more  semaphore
       files.   If  lockfile can't create all the specified files
       (in the specified order), it waits sleeptime (defaults  to
       8)  seconds and retries the last file that didn't succeed.
       You can specify the number of retries to do until  failure
       is  returned.   If  the  number of retries is -1 (default,
       i.e.  -r-1) lockfile will retry forever.

       If the number of retries expires  before  all  files  have
       been created, lockfile returns failure and removes all the
       files it created up till that point.

       The return value of lockfile can  be  easily  inverted  by
       specifying  -!   as  an  argument (comes in handy in shell
       scripts).

       All flags can be specified anywhere on the  command  line,
       they will be processed when encountered.  The command line
       is simply parsed from left to right.

       All files created by lockfile will have access  permission
       0, and therefore will have to be removed with rm -f.

       If  you  specify  a  locktimeout  then  a lockfile will be
       removed by force after  locktimeout  seconds  have  passed
       since  the lockfile was last modified/created (most proba-
       bly by some other program that unexpectedly  died  a  long
       time  ago, and hence could not clean up any leftover lock-
       files).  Lockfile is clock skew immune.  After a  lockfile
       has been removed by force, a suspension of suspend seconds
       (defaults to 16) is taken into account, in order  to  pre-
       vent  the  inadvertent immediate removal of any newly cre-
       ated lockfile by another program (compare SUSPEND in proc-
       mail(1)).

   Mailbox locks
       If  the  permissions  on  the  system mail spool directory
       allow it, or if lockfile is suitably setgid,  it  will  be
       able  to  lock and unlock your system mailbox by using the
       options -ml and -mu respectively.



EXAMPLES

       Suppose you want to make sure  that  access  to  the  file
       "important"  is  serialised, i.e. no more than one program
       or shell script should be allowed to access it.  For  sim-
       plicity's  sake,  let's suppose that it is a shell script.
       In this case you could solve it like this:
              ...
              lockfile important.lock
              ...
              access_"important"_to_your_hearts_content
              ...
              rm -f important.lock
              ...
       Now if all the scripts that access "important" follow this
       guideline,  you  will  be  assured that at most one script
       will be executing between the `lockfile' and the `rm' com-
       mands.


ENVIRONMENT

       LOGNAME                used  as  a  hint  to determine the
                              invoker's loginname


FILES

       /etc/passwd            to  verify   and/or   correct   the
                              invoker's  loginname  (and  to find
                              out his HOME directory, if needed)

       /var/spool/mail/$LOGNAME.lock
                              lockfile for  the  system  mailbox,
                              the  environment  variables present
                              in here will not be taken from  the
                              environment, but will be determined
                              by looking in /etc/passwd


SEE ALSO

       rm(1), mail(1), binmail(1), sendmail(8), procmail(1)


DIAGNOSTICS

       Filename too long, ... Use shorter filenames.

       Forced unlock denied on "x"
                              No write permission in the directo-
                              ry  where  lockfile "x" resides, or
                              more than one  lockfile  trying  to
                              force  a  lock  at exactly the same
                              time.





       Forcing lock on "x"    Lockfile "x" is going to be removed
                              by force because of a timeout (com-
                              pare LOCKTIMEOUT in procmail(1)).

       Out of memory, ...     The system is out of swap space.

       Signal received, ...   Lockfile will  remove  anything  it
                              created till now and terminate.

       Sorry, ...             The retries limit has been reached.

       Truncating "x" and retrying lock
                              "x" does not seem  to  be  a  valid
                              filename.

       Try praying, ...       Missing  subdirectories or insuffi-
                              cient privileges.


BUGS

       Definitely less than one.


MISCELLANEOUS

       Lockfile is NFS-resistant and eight-bit clean.


NOTES

       Calling up lockfile with the -h or -? options  will  cause
       it to display a command-line help page.

       Multiple -!  flags will toggle the return status.

       Since  flags  can  occur anywhere on the command line, any
       filename starting with a '-' has to be preceded by './'.

       The number of retries will not be reset when any following
       file  is being created (i.e. they are simply used up).  It
       can, however, be reset by  specifying  -rnewretries  after
       every file on the command line.

       Although  files with any name can be used as lockfiles, it
       is common practice to use the extension  `.lock'  to  lock
       mailfolders  (it  is appended to the mailfolder name).  In
       case one does not want to have to  worry  about  too  long
       filenames  and does not have to conform to any other lock-
       filename convention, then an excellent way to  generate  a
       lockfilename  corresponding  to some already existing file
       is by taking the prefix `lock.' and appending  the  i-node
       number of the file which is to be locked.


SOURCE

       This program is part of the procmail mail-processing-pack-
       age (v3.10 1994/10/31) available at  your  nearest  USENET
       comp.sources.misc   archive,  or  at  ftp.informatik.rwth-
       aachen.de as pub/packages/procmail/procmail.tar.gz.


MAILINGLIST

       There exists a mailinglist for questions relating  to  any
       program in the procmail package:
              procmail@informatik.rwth-aachen.de
                     for submitting questions/answers.
              procmail-request@informatik.rwth-aachen.de
                     for subscription requests.


AUTHOR

       Stephen R. van den Berg at RWTH-Aachen, Germany
              berg@pool.informatik.rwth-aachen.de

  Księgarnia

- Oferta księgarni Mentis
- Oferta księgarni Onepress
- Linux Manual (english)
- Konstytucje
- Kręgosłup, bóle karku
- Elektroniczne książki
- Prasa elektroniczna
- Gry RPG, figurki
- darmowy słownik on-line
- jubiler - biżuteria
- polityka prywatności





Linux - Welsh Matt, Dalheimer Matthias Kalle, Kaufman Lar Linux
Autor: Welsh Matt, Dalheimer Matthias Kalle, Kaufman Lar
Cena: 85.44
Rok wydania: 2000
Wydawnictwo: Read Me
Ilość stron: 700
Linux - bezpieczeństwo serwerów - Michael D.Bauer Linux - bezpieczeństwo serwerów
Autor: Michael D.Bauer
Cena: 58.88
Rok wydania: 2003
Wydawnictwo: Read Me
Ilość stron: 488
Linux kernel - Daniel P. Bovet, Marco Cesati Linux kernel
Autor: Daniel P. Bovet, Marco Cesati
Cena: 85.44
Rok wydania: 2001
Wydawnictwo: Read Me
Ilość stron: 634
Linux. Programowanie dla zaawansowanych - Mark Mitchell. Jeffrey Oldham, Alex Samuel Linux. Programowanie dla zaawansowanych
Autor: Mark Mitchell. Jeffrey Oldham, Alex Samuel
Cena: 42.32
Rok wydania: 2002
Wydawnictwo: Read Me
Ilość stron: 300
Linux: Systemy plików - Moshe Bar Linux: Systemy plików
Autor: Moshe Bar
Cena: 51.52
Rok wydania: 2002
Wydawnictwo: Read Me
Ilość stron: 332
Linux. Archiwizacja danych - Leszek Madeja Linux. Archiwizacja danych
Autor: Leszek Madeja
Cena: 17.60
Rok wydania: 2003
Wydawnictwo: Mikom
Ilość stron:
Linux i galanteria SCSI - Leszek Madeja Linux i galanteria SCSI
Autor: Leszek Madeja
Cena: 10.80
Rok wydania: 2003
Wydawnictwo: Mikom
Ilość stron: 88
Bezpieczeństwo systemu Linux - Ramón J. Hontañón Bezpieczeństwo systemu Linux
Autor: Ramón J. Hontañón
Cena: 44.62
Rok wydania: 2002
Wydawnictwo: Mikom
Ilość stron: 464
Korzystanie z drukarki. Ćwiczenia z systemu Linux - Leszek Madeja Korzystanie z drukarki. Ćwiczenia z systemu Linux
Autor: Leszek Madeja
Cena: 16.80
Rok wydania: 2000
Wydawnictwo: Mikom
Ilość stron: 192
Korzystanie z pomocy. Ćwiczenia z systemu Linux - Leszek Madeja Korzystanie z pomocy. Ćwiczenia z systemu Linux
Autor: Leszek Madeja
Cena: 15.40
Rok wydania: 2000
Wydawnictwo: Mikom
Ilość stron: 152
Linux - książka kucharska - Michael Stutz Linux - książka kucharska
Autor: Michael Stutz
Cena: 47.84
Rok wydania: 2002
Wydawnictwo: Mikom
Ilość stron: 488
Linux. Gniazda w programowaniu - Woren W. Gay Linux. Gniazda w programowaniu
Autor: Woren W. Gay
Cena: 47.29
Rok wydania: 2001
Wydawnictwo: Mikom
Ilość stron: 552
LINUX. Rozwiązywanie problemów - Brian Ward LINUX. Rozwiązywanie problemów
Autor: Brian Ward
Cena: 33.92
Rok wydania: 2001
Wydawnictwo: Mikom
Ilość stron: 312
Midnight Commander. Ćwiczenia z systemu Linux - Leszek Madeja Midnight Commander. Ćwiczenia z systemu Linux
Autor: Leszek Madeja
Cena: 23.80
Rok wydania: 2000
Wydawnictwo: Mikom
Ilość stron: 272
Red Hat Linux 6.2 same konkrety - Bob Rankin Red Hat Linux 6.2 same konkrety
Autor: Bob Rankin
Cena: 39.74
Rok wydania: 2000
Wydawnictwo: Mikom
Ilość stron: 372
Caldera Linux 2.3 dla każdego - Bill Ball Caldera Linux 2.3 dla każdego
Autor: Bill Ball
Cena: 49.00
Rok wydania: 2000
Wydawnictwo: Helion
Ilość stron: 400
Linux. Praktyczne rozwiązania - Adam Podstawczyński Linux. Praktyczne rozwiązania
Autor: Adam Podstawczyński
Cena: 35.00
Rok wydania: 2000
Wydawnictwo: Helion
Ilość stron: 248
Red Hat Linux 7.3. Księga eksperta - Bill Ball Red Hat Linux 7.3. Księga eksperta
Autor: Bill Ball
Cena: 110.00
Rok wydania: 2002
Wydawnictwo: Helion
Ilość stron: 752
Linux w sieci - Adam Podstawczyński Linux w sieci
Autor: Adam Podstawczyński
Cena: 39.00
Rok wydania: 2002
Wydawnictwo: Helion
Ilość stron: 224
Red Hat Linux 7.2. Ćwiczenia praktyczne - Jerzy Marczyński Red Hat Linux 7.2. Ćwiczenia praktyczne
Autor: Jerzy Marczyński
Cena: 18.00
Rok wydania: 2002
Wydawnictwo: Helion
Ilość stron: 176






ksiegarnia.pila.pl exists since 2005 year.
Provided by: Przemysław Krajniak, PHP Scripts