Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hamza
erp5-Boxiang
Commits
4f648847
Commit
4f648847
authored
May 06, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement execution with environment change.
parent
e0efffa4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
slapos/recipe/erp5/src/slapos/recipe/erp5/__init__.py
slapos/recipe/erp5/src/slapos/recipe/erp5/__init__.py
+1
-0
slapos/recipe/erp5/src/slapos/recipe/erp5/execute.py
slapos/recipe/erp5/src/slapos/recipe/erp5/execute.py
+10
-0
No files found.
slapos/recipe/erp5/src/slapos/recipe/erp5/__init__.py
View file @
4f648847
...
...
@@ -741,6 +741,7 @@ SSLRandomSeed connect builtin
def
installMysqlServer
(
self
,
ip
,
port
,
database
=
'erp5'
,
user
=
'user'
,
test_database
=
'test_erp5'
,
test_user
=
'test_user'
,
template_filename
=
None
):
backup_directory
=
self
.
createBackupDirectory
(
'mysql'
)
if
template_filename
is
None
:
template_filename
=
self
.
getTemplateFilename
(
'my.cnf.in'
)
error_log
=
os
.
path
.
join
(
self
.
log_directory
,
'mysqld.log'
)
...
...
slapos/recipe/erp5/src/slapos/recipe/erp5/execute.py
View file @
4f648847
...
...
@@ -13,6 +13,16 @@ def execute(args):
child_pg
=
None
def
executee
(
args
):
"""Portable execution with process replacement and environment manipulation"""
exec_list
=
list
(
args
[
0
])
environment
=
args
[
1
]
env
=
os
.
environ
.
copy
()
for
k
,
v
in
environment
.
iteritems
():
env
[
k
]
=
v
os
.
execve
(
exec_list
[
0
],
exec_list
+
sys
.
argv
[
1
:],
env
)
def
sig_handler
(
signal
,
frame
):
print
'Received signal %r, killing children and exiting'
%
signal
if
child_pg
is
not
None
:
...
...
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