Bugzilla – Attachment 22040 Details for
Bug 6435
[ENH] Added daemon mode parameters to rebuild_zebra.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Small perl program to flock files and run commands
flock.pl (text/x-perl-script), 519 bytes, created by
Doug Kingston
on 2013-10-17 22:32:53 UTC
(
hide
)
Description:
Small perl program to flock files and run commands
Filename:
MIME Type:
Creator:
Doug Kingston
Created:
2013-10-17 22:32:53 UTC
Size:
519 bytes
patch
obsolete
>#!/usr/bin/perl >$LOCK_EX = 2; >$LOCK_NB = 4; > >if (@ARGV[0] eq "-w") { > $LOCK_NB = 0; > shift; >} >$lock = @ARGV[0]; >shift @ARGV; >die "Usage: flock [-w] lockfile command [args]\n" if ($#ARGV < 0); > >if (! -f $lock) { > open LOCK, ">$lock" || die "cannot create lock file $lock: $!\n"; > print LOCK "This is a lockfile created by flock. Do not remove.\n"; >} else { > open LOCK, $lock || die "cannot open lock file $lock: $!\n"; >} >if (flock LOCK, $LOCK_EX|$LOCK_NB) { > system (@ARGV); > exit $? >} >die "flock failed: $!\n"; >exit 1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 6435
:
19267
|
19710
|
20574
|
20575
|
21097
|
21099
|
21390
|
21391
|
22039
|
22040
|
22080
|
22201
|
22457
|
22851
|
22859
|
22986