print error if creating a socket() failed - teed - A multiplex relay tee(1) daemon.
 (HTM) git clone git://bitreich.org/teed git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/teed
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Tags
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit b5674ba2b8612d190d7f61ed4816f56f7e1e9381
 (DIR) parent 8d1db0f43e921b998a06dd61d1442220db29ee89
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Mon, 14 Aug 2023 14:22:26 +0200
       
       print error if creating a socket() failed
       
       Signed-off-by: Christoph Lohmann <20h@r-36.net>
       
       Diffstat:
         M teed.c                              |       4 +++-
       
       1 file changed, 3 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/teed.c b/teed.c
       @@ -173,8 +173,10 @@ main(int argc, char *argv[])
                on = 1;
                for (i = 0; i < 2; i++) {
                        lfd = socket(AF_UNIX, SOCK_STREAM, 0);
       -                if (lfd < 0)
       +                if (lfd < 0) {
       +                        perror("socket");
                                goto stop_serving;
       +                }
                        if (setsockopt(lfd, SOL_SOCKET, SO_REUSEADDR,
                                        &on, sizeof(on)) < 0) {
                                perror("setsockopt");