Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coopdevs OCB mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External 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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Odoo
Coopdevs OCB mirror
Commits
bec3abd6
Commit
bec3abd6
authored
12 years ago
by
Christophe Simonis
Browse files
Options
Downloads
Patches
Plain Diff
[FIX] restart of server on windows
bzr revid: chs@openerp.com-20121126122220-38s3hla3hyl1b15p
parent
452d1af6
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
openerp/service/__init__.py
+7
-3
7 additions, 3 deletions
openerp/service/__init__.py
with
7 additions
and
3 deletions
openerp/service/__init__.py
+
7
−
3
View file @
bec3abd6
...
...
@@ -129,6 +129,7 @@ def start_services_workers():
def
_reexec
():
"""
reexecute openerp-server process with (nearly) the same arguments
"""
# TODO check if parent is a NT service
strip_args
=
[
'
-d
'
,
'
-u
'
]
a
=
sys
.
argv
[:]
args
=
[
x
for
i
,
x
in
enumerate
(
a
)
if
x
not
in
strip_args
and
a
[
max
(
i
-
1
,
0
)]
not
in
strip_args
]
...
...
@@ -141,9 +142,12 @@ def restart_server():
os
.
kill
(
pid
,
signal
.
SIGHUP
)
else
:
if
os
.
name
==
'
nt
'
:
# TODO check if parent is a service
stop_services
()
_reexec
()
def
reborn
():
stop_services
()
_reexec
()
# run in a thread to let the current thread return response to the caller.
threading
.
Thread
(
target
=
reborn
).
start
()
else
:
openerp
.
phoenix
=
True
os
.
kill
(
os
.
getpid
(),
signal
.
SIGINT
)
...
...
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