summaryrefslogtreecommitdiff
path: root/sys-utils/flock.c
AgeCommit message (Collapse)AuthorFilesLines
2012-01-22For non-linux build inly flock (ipc* for Illumos have zone support)Igor Pashev1-0/+1
2010-08-20flock: properly report exec() errorsKarel Zak1-1/+1
Reported-by: Barry Davis <barry_davis@stormagic.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-07-26portability: use standard constantsFrançois Revol1-1/+1
Signed-off-by: François Revol <revol@free.fr> Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-07flock: fix hang when parent ignores SIGCHLDMike Frysinger1-1/+9
If flock is executed from a process which has set SIGCHLD to SIG_IGN, then flock will eat cpu and hang indefinitely if given a command to execute. So before we fork(), make sure to set SIGCHLD handling back to the default so that the later waitpid() doesn't freak out on us. [kzak@redhat.com: - add a check for waitpid() return value] Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Karel Zak <kzak@redhat.com>
2009-03-11flock: add NLS support, remove tailing white-spacesKarel Zak1-18/+24
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-03-11flock: fix printf format error in usage()Karel Zak1-5/+5
flock.c: In function ‘usage’: flock.c:75: warning: too few arguments for format Signed-off-by: Karel Zak <kzak@redhat.com>
2009-03-11flockc: segfaults when file name is not givenKarel Zak1-1/+8
$ flock -s Segmentation fault ltrace: __libc_start_main(0x8048870, 2, 0xbfe9f404, 0x8049070, 0x8049060 <unfinished ...> getopt_long(2, 0xbfe9f404, "+sexnouw:hV?", 0x80494e0, 0xbfe9f354) = 115 getopt_long(2, 0xbfe9f404, "+sexnouw:hV?", 0x80494e0, 0xbfe9f354) = -1 strtol(0, 0xbfe9f34c, 10, 0x80494e0, 0xbfe9f354 <unfinished ...> --- SIGSEGV (Segmentation fault) --- +++ killed by SIGSEGV +++ Addresses-Red-Had-Bugzilla: #489672 Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-03flock: Allow lock directoryAlexey Gladkov1-1/+6
With this patch, you can lock directory. Additionally, lockfile opens with O_NOCTTY. Try to open file with O_CREAT flag first, and without it if open fails with EISDIR. Suggested by H. Peter Anvin. Signed-off-by: Alexey Gladkov <legion@altlinux.org>
2008-07-28remove CVS keywordsmaximilian attems1-1/+0
this patch removes old CVS keywords from comments. mount(8) works for newer Linux then 0.99 ;) Signed-off-by: maximilian attems <max@stro.at>
2006-12-07Imported from util-linux-2.13-pre7 tarball.Karel Zak1-3/+3
2006-12-07Imported from util-linux-2.13-pre2 tarball.Karel Zak1-109/+296
2006-12-07Imported from util-linux-2.13-pre1 tarball.Karel Zak1-1/+1
2006-12-07Imported from util-linux-2.12j tarball.Karel Zak1-0/+116