From: Konstantin Osipov <kostja.osipov@gmail.com>
To: tarantool-patches@freelists.org
Cc: vdavydov.dev@gmail.com, i.kosarev@corp.mail.ru,
Ilya Kosarev <ilyanapar@yandex.ru>
Subject: Re: [tarantool-patches] [PATCH v2] iproto: close socket explicitly before wal_dir at exit
Date: Mon, 25 Feb 2019 19:50:47 +0300 [thread overview]
Message-ID: <20190225165047.GF2663@chai> (raw)
In-Reply-To: <20190225145625.10840-1-i.kosarev@tarantool.org>
* Ilya Kosarev <i.kosarev@tarantool.org> [19/02/25 19:14]:
> +void
> +iproto_free()
> +{
> + tt_pthread_cancel(net_cord.id);
> + tt_pthread_join(net_cord.id, NULL);
> + /*
> + * Close socket descriptor to prevent hot standby instance
> + * failing to bind in case it tries to bind
> + * before socket is closed by OS.
> + */
> + close(binary.ev.fd);
> +}
What if there is no socket descriptor in binary.ev.fd?
I understand it's OK to close a non-existing descriptor, but still
looks a bit messy to me.
--
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov
next prev parent reply other threads:[~2019-02-25 16:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-25 14:56 Ilya Kosarev
2019-02-25 15:07 ` Vladimir Davydov
2019-02-25 16:50 ` Konstantin Osipov [this message]
2019-02-25 17:08 ` [tarantool-patches] " Vladimir Davydov
2020-08-14 10:46 [Tarantool-patches] " Ilya Kosarev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190225165047.GF2663@chai \
--to=kostja.osipov@gmail.com \
--cc=i.kosarev@corp.mail.ru \
--cc=ilyanapar@yandex.ru \
--cc=tarantool-patches@freelists.org \
--cc=vdavydov.dev@gmail.com \
--subject='Re: [tarantool-patches] [PATCH v2] iproto: close socket explicitly before wal_dir at exit' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox