Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
5af46750
...
5af46750cb2e43420601996b7369f1a6d44c4b9b
authored
2003-09-18 10:06:36 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(process_cleanup): New function
1 parent
0db7e468
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
pop3d/signal.c
pop3d/signal.c
View file @
5af4675
...
...
@@ -17,17 +17,27 @@
#include "pop3d.h"
RETSIGTYPE
pop3d_sigchld
(
int
signo
ARG_UNUSED
)
static
int
need_cleanup
=
0
;
void
process_cleanup
()
{
pid_t
pid
;
int
status
;
if
(
need_cleanup
)
{
need_cleanup
=
0
;
while
(
(
pid
=
waitpid
(
-
1
,
&
status
,
WNOHANG
))
>
0
)
--
children
;
}
}
while
(
(
pid
=
waitpid
(
-
1
,
&
status
,
WNOHANG
))
>
0
)
--
children
;
RETSIGTYPE
pop3d_sigchld
(
int
signo
ARG_UNUSED
)
{
need_cleanup
=
1
;
#ifndef HAVE_SIGACTION
/* On some system, signal implements the unreliable semantic and
has to be rearm. */
signal
(
signo
,
pop3d_sigchld
);
#endif
}
...
...
Please
register
or
sign in
to post a comment