fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fluid-dev] Failure to bind server socket: 98


From: Marcus Weseloh
Subject: Re: [fluid-dev] Failure to bind server socket: 98
Date: Mon, 7 Mar 2022 00:19:06 +0100

Am So., 6. März 2022 um 23:34 Uhr schrieb Marcus Weseloh <marcus@weseloh.cc>:
> I just tried it with 2.2.1 and got the same result: when I type
> "quit", FluidSynth doesn't exit but waits for the accept() to return.
> And I don't see any ifdefs for WIN32 around this call... really weird.
> Is Windows handling thread joining differently and actually terminates
> a thread blocking in IO when calling fluid_thread_join()?

Hm... I have the feeling we are relying on undefined POSIX behaviour
here. Calling close() on a socket from one thread that another thread
is blocking on in accept() does not necessarily cause the accept() to
return. At least my system doesn't. The interactive shell command
"quit" calls fluid_socket_close() on the client->socket, then joins
the client thread. On systems where close() interrupts an accept() it
seems to works fine. But not on my system... If I add an explicit
shutdown(client->socket, SHUT_RDWR) before the socket_close(), then
accept is also interrupted. Mind you, calling close on another threads
socket seems to be discouraged anyway.

Sorry Ben for hijacking your thread, I'll create an issue on GitHub
for this problem.

So... so answer your real question: I would be all in favour for
adding a new command that actually terminates the whole of FluidSynth.
"shutdown" might be an appropriate name. :-)

Cheers
Marcus



reply via email to

[Prev in Thread] Current Thread [Next in Thread]