Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
1e5b0633
Commit
1e5b0633
authored
May 16, 2013
by
Jason Merrill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add quotes
From-SVN: r198981
parent
f14540b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
gcc/lock-and-run.sh
+7
-2
No files found.
gcc/lock-and-run.sh
View file @
1e5b0633
#! /bin/sh
# Shell-based mutex using mkdir.
lockdir
=
$1
prog
=
$2
;
shift
2
||
exit
1
count
=
0
lockdir
=
"
$1
"
prog
=
"
$2
"
;
shift
2
||
exit
1
# Remember when we started trying to acquire the lock.
count
=
0
touch lock-stamp.
$$
trap
'rm -r "$lockdir" lock-stamp.$$'
0
until
mkdir
"
$lockdir
"
2>/dev/null
;
do
# Say something periodically so the user knows what's up.
if
[
`
expr
$count
% 30
`
=
0
]
;
then
...
...
@@ -24,6 +27,8 @@ until mkdir "$lockdir" 2>/dev/null; do
sleep 1
count
=
`
expr
$count
+ 1
`
done
echo
$prog
"
$@
"
$prog
"
$@
"
# The trap runs on exit.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment