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
5fbe64aa
Commit
5fbe64aa
authored
Dec 03, 1998
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
fa4031e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
5 deletions
+20
-5
pcgi/pcgi-wrapper.c
pcgi/pcgi-wrapper.c
+9
-5
pcgi/pcgi.h
pcgi/pcgi.h
+11
-0
No files found.
pcgi/pcgi-wrapper.c
View file @
5fbe64aa
...
...
@@ -55,7 +55,7 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
char
spewbuf
[
1024
];
/* yes, it's a global, but only for debugging */
#endif
static
char
_id_
[]
=
"$Id: pcgi-wrapper.c,v 1.
2 1998/10/29 15:37:20
brian Exp $"
;
static
char
_id_
[]
=
"$Id: pcgi-wrapper.c,v 1.
3 1998/12/03 22:38:19
brian Exp $"
;
/* Globals, OR: "I'll know I'll hate myself in the morning" */
extern
char
**
environ
;
...
...
@@ -711,9 +711,11 @@ void pcgiSIG(int s)
void
cleanup
()
{
#ifdef UNIX
UNION_SEMUN
arg
;
arg
.
val
=
0
;
if
(
g_lock
>
0
)
{
semctl
(
g_lock
,
1
,
IPC_RMID
,
sem_idx
);
semctl
(
g_lock
,
1
,
IPC_RMID
,
arg
);
}
#endif
}
...
...
@@ -727,6 +729,8 @@ int pcgiStartProc(pcgiResource *r)
pid_t
pid
;
char
*
p
=
NULL
;
int
i
=
0
;
UNION_SEMUN
arg
;
arg
.
val
=
0
;
if
((
p
=
strrchr
(
r
->
sw_exe
,
PATHSEP
))
==
NULL
)
{
...
...
@@ -790,7 +794,7 @@ int pcgiStartProc(pcgiResource *r)
init will inherit the grandchild (so it won't die) */
if
((
pid
=
fork
())
<
0
)
{
semctl
(
r
->
lock
,
1
,
IPC_RMID
,
sem_idx
);
semctl
(
r
->
lock
,
1
,
IPC_RMID
,
arg
);
return
(
-
1
);
}
else
if
(
pid
==
0
)
...
...
@@ -831,14 +835,14 @@ int pcgiStartProc(pcgiResource *r)
/* Wait for the first child to finish */
if
(
waitpid
(
pid
,
NULL
,
0
)
<
0
)
{
semctl
(
r
->
lock
,
1
,
IPC_RMID
,
sem_idx
);
{
semctl
(
r
->
lock
,
1
,
IPC_RMID
,
arg
);
return
(
-
1
);
}
/*
// Release restart lock!
*/
semctl
(
r
->
lock
,
1
,
IPC_RMID
,
sem_idx
);
semctl
(
r
->
lock
,
1
,
IPC_RMID
,
arg
);
/*
// Reset signal handlers
...
...
pcgi/pcgi.h
View file @
5fbe64aa
...
...
@@ -242,5 +242,16 @@ long pcgiReadSocket(pcgi_socket, char *, long);
long
pcgiWriteSocket
(
pcgi_socket
,
const
char
*
,
long
);
#endif
#ifdef HAVE_UNION_SEMUN
#define UNION_SEMUN union semun
#else
#define UNION_SEMUN \
union semun { \
int val; \
struct semid_ds *buf; \
ushort *array; \
};
#endif
#define PCGI_H 1
#endif
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