[Icecast] The myth of the two different kinds of mounts [WAS: Re: falling back]

Petr Pisar petr.pisar at atlas.cz
Sun May 23 09:26:08 UTC 2021


V Sat, May 22, 2021 at 12:40:55PM +0100, Ken Gillett napsal(a):
> Could I ask more about this point here. Are you suggesting that the CGI
> script is run by an http server (being accessed by the Icecast relay mount,
> when first listener connects) or by Icecast directly?
>
By an HTTP server.

> That would simplify the Icecast side of things, but how would that be
> stopped when the last Icecast listener disconnects? Icecast would then
> ‘disconnect’ from that source, but how would that then stop the
> CGI/transcoding?

When Icecast disconnects, the CGI script process, which was writing to the TCP socket
on its standard output, gets a SIGPIPE signal from the kernel. If the script
did not install its own handler for the signal, a default one will be invoked
by kernel which terminates the process. Effectivelly the script process frees all
resources, e.g. an opened tunner device.

More advanced HTTP server may keep proxying data between an HTTP client
(Icecast) and the CGI script. In that case the server notices a TCP disconnect
and should (?) kill the CGI script.

-- Petr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.xiph.org/pipermail/icecast/attachments/20210523/c3a47895/attachment.sig>


More information about the Icecast mailing list