Skip to content

Commit 1849004

Browse files
committed
libflux: drop FLUX_REACTOR_SIGCHLD
Problem: the FLUX_REACTOR_SIGCHLD flag has no users. Drop this flag. Update unit test.
1 parent b803986 commit 1849004

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

src/common/libflux/reactor.c

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,7 @@ void flux_reactor_decref (flux_reactor_t *r)
3939
{
4040
if (r && --r->usecount == 0) {
4141
int saved_errno = errno;
42-
if (r->loop) {
43-
if (ev_is_default_loop (r->loop))
44-
ev_default_destroy ();
45-
else
46-
ev_loop_destroy (r->loop);
47-
}
42+
ev_loop_destroy (r->loop);
4843
free (r);
4944
errno = saved_errno;
5045
}
@@ -65,14 +60,13 @@ flux_reactor_t *flux_reactor_create (int flags)
6560
{
6661
flux_reactor_t *r;
6762

68-
if (valid_flags (flags, FLUX_REACTOR_SIGCHLD) < 0)
63+
if (flags != 0) {
64+
errno = EINVAL;
6965
return NULL;
66+
}
7067
if (!(r = calloc (1, sizeof (*r))))
7168
return NULL;
72-
if ((flags & FLUX_REACTOR_SIGCHLD))
73-
r->loop = ev_default_loop (EVFLAG_SIGNALFD);
74-
else
75-
r->loop = ev_loop_new (EVFLAG_NOSIGMASK | EVFLAG_SIGNALFD);
69+
r->loop = ev_loop_new (EVFLAG_NOSIGMASK | EVFLAG_SIGNALFD);
7670
if (!r->loop) {
7771
errno = ENOMEM;
7872
flux_reactor_destroy (r);

src/common/libflux/reactor.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@ enum {
2727
/* one event occurs */
2828
};
2929

30-
/* Flags for flux_reactor_create()
31-
*/
32-
enum {
33-
FLUX_REACTOR_SIGCHLD = 1, /* enable use of child watchers */
34-
/* only one thread can do this per program */
35-
};
36-
3730
flux_reactor_t *flux_reactor_create (int flags);
3831
void flux_reactor_destroy (flux_reactor_t *r);
3932
void flux_reactor_incref (flux_reactor_t *r);

0 commit comments

Comments
 (0)