mirror of
https://github.com/samba-team/samba.git
synced 2025-01-25 06:04:04 +03:00
9d0a5b167c
that tries to bind to the specified port on INADDR_ANY. This can be used for testing if a service is listening to that port or not. Errors are printed to stdout and the returned status code is either 0 : if we managed to bind to the port (in which case the service is NOT listening on that bort) or the value of errno that stopped us from binding to a port. errno for EADDRINUSE is 98 so a script using this command should check the status code against the value 98. If this command returns 98 it means the service is listening to the specified port. (This used to be ctdb commit 04cbb490c5a075080923fde58af7082572c55c43)