mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-30 13:42:58 -05:00
[general] Put back support for platforms without pipe2(), see issue #239
This commit is contained in:
@@ -289,14 +289,22 @@ worker_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
#ifdef HAVE_PIPE2
|
||||
ret = pipe2(g_exit_pipe, O_CLOEXEC);
|
||||
#else
|
||||
ret = pipe(g_exit_pipe);
|
||||
#endif
|
||||
if (ret < 0)
|
||||
{
|
||||
DPRINTF(E_LOG, L_MAIN, "Could not create pipe: %s\n", strerror(errno));
|
||||
goto exit_fail;
|
||||
}
|
||||
|
||||
#ifdef HAVE_PIPE2
|
||||
ret = pipe2(g_cmd_pipe, O_CLOEXEC);
|
||||
#else
|
||||
ret = pipe(g_cmd_pipe);
|
||||
#endif
|
||||
if (ret < 0)
|
||||
{
|
||||
DPRINTF(E_LOG, L_MAIN, "Could not create command pipe: %s\n", strerror(errno));
|
||||
|
||||
Reference in New Issue
Block a user