When dgsh_negotiate fails it should set errno as follows.
[x] ECONNRESET when the negotiation fails remotely.
[x] ENOTSOCK when the number of specified channels is greater than one and there is no dgsh client on the corresponding side.
[x] Other errors according to failed functions. (No need to modify code here, other than to ensure that no library calls until the return clobber errno.
[x] When dgsh_negotiate fails, clients must exit with an error code. Clients must exit silently on ECONNRESET and report the error in all other error cases.
[x] The documentation (return value and example) must be updated to reflect these changes.
When
dgsh_negotiate
fails it should seterrno
as follows.ECONNRESET
when the negotiation fails remotely.ENOTSOCK
when the number of specified channels is greater than one and there is no dgsh client on the corresponding side.return
clobbererrno
.dgsh_negotiate
fails, clients must exit with an error code. Clients must exit silently onECONNRESET
and report the error in all other error cases.