aboutsummaryrefslogtreecommitdiffstats
path: root/src/main_notify.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-23 20:47:31 +0200
committerMax Kellermann <max@duempel.org>2008-09-23 20:47:31 +0200
commit1db88364bb68c3dbca55a627915b94a560b91e00 (patch)
tree6454fb412fc47122a52bf339ce89e8694da2d38a /src/main_notify.c
parent913028a780707543a2eca0dcca61a0e8eb6b6167 (diff)
downloadmpd-1db88364bb68c3dbca55a627915b94a560b91e00.tar.gz
mpd-1db88364bb68c3dbca55a627915b94a560b91e00.tar.xz
mpd-1db88364bb68c3dbca55a627915b94a560b91e00.zip
main_notify: use init_async_pipe()
Remove duplicated code.
Diffstat (limited to '')
-rw-r--r--src/main_notify.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/main_notify.c b/src/main_notify.c
index 6a14a9871..267394807 100644
--- a/src/main_notify.c
+++ b/src/main_notify.c
@@ -60,14 +60,7 @@ static int ioops_consume(int fd_count, fd_set * rfds,
void init_main_notify(void)
{
- if (pipe(main_pipe) < 0)
- FATAL("Couldn't open pipe: %s", strerror(errno));
- if (set_nonblocking(main_pipe[0]) < 0)
- FATAL("Couldn't set non-blocking on main_notify fd: %s",
- strerror(errno));
- if (set_nonblocking(main_pipe[1]) < 0)
- FATAL("Couldn't set non-blocking on main_notify fd: %s",
- strerror(errno));
+ init_async_pipe(main_pipe);
main_notify_IO.fdset = ioops_fdset;
main_notify_IO.consume = ioops_consume;
registerIO(&main_notify_IO);