linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael J. Baars" <mjbaars1977.linux-kernel@cyberfiber.eu>
To: Bernd Petrovitsch <bernd@petrovitsch.priv.at>,
	linux-kernel@vger.kernel.org
Subject: Re: SIGHUP on connect
Date: Thu, 29 Oct 2020 15:54:47 +0100	[thread overview]
Message-ID: <c4bc7e51f7daad7cf9e8933137572c2f4c5ae6ff.camel@cyberfiber.eu> (raw)
In-Reply-To: <8b693bb1-1711-5289-5bc8-e5955da21968@petrovitsch.priv.at>

On Mon, 2020-10-26 at 17:12 +0000, Bernd Petrovitsch wrote:
> Hi all!
> 
> On 25/10/2020 16:11, Michael J. Baars wrote:
> [...]
> > I've been writing a simple client and server for cluster computing this weekend. At first everything appeared to work just fine, but soon enough I found
> > some
> > inexplicable bind errors. I've tried to make sure that the client closes it's sockets before the server closes it's sockets, to prevent linger, but trying
> > did
> 
> Which were exactly?
> English/original text pls ...
> 
> And The close() (and shutdown() syscalls, respectively) don't avoid
> the FIN_WAIT2 timeout on a closed socket.
> Just set the SO_REUSEADDR socket option on the listening socket.
> 
> > not help. Now I think I found the problem.
> 
> Then solve it.
> 
> > Please do have a look at the code. It looks like the SIGHUP is sent to the server not on close or exit, but on the connect instead.
> 
> Too lazy to save and uncompress the file ...
> 
> MfG,
> 	Bernd

And I think this was sort of part of the question:

We have on sock[0] serverside 1 SIGHUP on the connect
We have on sock[1] serverside about 7 SIGHUPs on the close

Why not sent these 6 or 7 SIGHUPs on sock[0], such that the SIGHUP handler has to be installed only once?

Regards,
Mischa.


  parent reply	other threads:[~2020-10-29 15:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-25 16:11 SIGHUP on connect Michael J. Baars
2020-10-26 17:12 ` Bernd Petrovitsch
2020-10-29 14:10   ` Michael J. Baars
2020-10-29 20:48     ` Bernd Petrovitsch
2020-10-30 14:22       ` Michael J. Baars
2020-10-29 14:54   ` Michael J. Baars [this message]
2020-10-29 15:09   ` Michael J. Baars

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=c4bc7e51f7daad7cf9e8933137572c2f4c5ae6ff.camel@cyberfiber.eu \
    --to=mjbaars1977.linux-kernel@cyberfiber.eu \
    --cc=bernd@petrovitsch.priv.at \
    --cc=linux-kernel@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).