Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
3486b02e
Commit
3486b02e
authored
Jun 29, 1999
by
Michel Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
z2 now behaves deamonicly.
parent
59ad6b8b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
z2.py
z2.py
+19
-1
No files found.
z2.py
View file @
3486b02e
...
...
@@ -337,9 +337,27 @@ if sys.platform=='win32': Zpid=''
sys
.
path
=
[
os
.
path
.
join
(
here
,
'lib'
,
'python'
),
here
]
+
filter
(
None
,
sys
.
path
)
# from this point forward we can use the zope logger
import
zLOG
,
posix
if
Zpid
:
import
zdeamon
,
App
.
FindHomes
sys
.
ZMANAGED
=
1
x
=
os
.
fork
()
if
x
:
sys
.
exit
(
0
)
elif
x
==
-
1
:
zLOG
.
LOG
(
"z2"
,
zLOG
.
ERROR
,
"couldn't fork to detatch"
)
sys
.
exit
(
1
)
pgrp
=
posix
.
setsid
()
if
pgrp
==
-
1
:
zLOG
.
LOG
(
"z2"
,
zLOG
.
ERROR
,
"setsid failed"
)
sys
.
exit
(
1
)
zdeamon
.
run
(
sys
.
argv
,
os
.
path
.
join
(
INSTANCE_HOME
,
Zpid
))
# Import Zope (or Main), and thus get SOFTWARE_HOME and INSTANCE_HOME
...
...
@@ -441,7 +459,7 @@ try:
uid
=
pwd
.
getpwnam
(
UID
)[
2
]
os
.
setuid
(
uid
)
except
KeyError
:
print
"can't find UID %s"
%
UID
zLOG
.
LOG
(
"z2"
,
zLOG
.
ERROR
,
(
"can't find UID %s"
%
UID
))
except
:
pass
...
...
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