Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
ffbs-gluon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
darkbit
ffbs-gluon
Commits
5dcb7843
Unverified
Commit
5dcb7843
authored
7 years ago
by
Matthias Schiffer
Browse files
Options
Downloads
Patches
Plain Diff
gluon-core: remove unused lock and exec functions
parent
987eef01
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua
+0
-35
0 additions, 35 deletions
package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua
with
0 additions
and
35 deletions
package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua
+
0
−
35
View file @
5dcb7843
...
...
@@ -13,16 +13,6 @@ local function do_filter_prefix(input, output, prefix)
return
f
end
local
function
close_stdio
(
stream
,
mode
)
local
null
=
nixio
.
open
(
'/dev/null'
,
mode
)
if
null
then
nixio
.
dup
(
null
,
nixio
[
stream
])
if
null
:
fileno
()
>
2
then
null
:
close
()
end
end
end
local
io
=
io
local
os
=
os
...
...
@@ -76,23 +66,6 @@ function remove_from_set(t, itm)
return
changed
end
function
exec
(
...
)
local
pid
,
errno
,
error
=
nixio
.
fork
()
if
pid
==
0
then
close_stdio
(
'stdin'
,
'r'
)
close_stdio
(
'stdout'
,
'w'
)
close_stdio
(
'stderr'
,
'w'
)
nixio
.
execp
(
...
)
os.exit
(
127
)
elseif
pid
>
0
then
local
wpid
,
status
,
code
=
nixio
.
waitpid
(
pid
)
return
wpid
and
status
==
'exited'
and
code
else
return
nil
,
errno
,
error
end
end
-- Removes all lines starting with a prefix from a file, optionally adding a new one
function
replace_prefix
(
file
,
prefix
,
add
)
local
tmp
=
file
..
'.tmp'
...
...
@@ -110,14 +83,6 @@ function readline(fd)
return
line
end
function
lock
(
file
)
exec
(
'lock'
,
file
)
end
function
unlock
(
file
)
exec
(
'lock'
,
'-u'
,
file
)
end
function
node_id
()
return
string.gsub
(
sysconfig
.
primary_mac
,
':'
,
''
)
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment