Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

roscpp: TransportTCP: Allow socket() to return 0 #1707

Merged
merged 2 commits into from Oct 3, 2019
Merged

roscpp: TransportTCP: Allow socket() to return 0 #1707

merged 2 commits into from Oct 3, 2019

Conversation

g-arjones
Copy link
Contributor

In situations that an application has stdin closed, socket() may (and will) return 0. This is totally fine.

In situations that an application has stdin closed, socket() may (and will) return 0. This is totally fine.
@g-arjones
Copy link
Contributor Author

I would really appreciate if this was also backported to Kinetic.... I will gladly open a PR for the corresponding branch if that's the case. Thank you.

@cwecht
Copy link
Contributor

cwecht commented Apr 30, 2019

Just to backup the argument up: socket() is specified to return either a valid file descriptor (which is nonnegative) or -1 in the error case.

The same issue can be found in TransportUDP::createIncoming and should be fixed there as well.

@g-arjones
Copy link
Contributor Author

@dirk-thomas ?

@dirk-thomas
Copy link
Member

The same issue can be found in TransportUDP::createIncoming and should be fixed there as well.

Please update the PR to do so.

@g-arjones
Copy link
Contributor Author

Done

@ivan1993br
Copy link

I am facing the same problem, any updates?

@ivan1993br
Copy link

@dirk-thomas

@dirk-thomas
Copy link
Member

@ros-pull-request-builder retest this please

@dirk-thomas dirk-thomas added the bug label Oct 3, 2019
@dirk-thomas
Copy link
Member

Thanks for the patch.

@dirk-thomas dirk-thomas merged commit 78c6d6c into ros:melodic-devel Oct 3, 2019
dirk-thomas pushed a commit that referenced this pull request Aug 4, 2020
* roscpp: TransportTCP: Allow socket() to return 0

In situations that an application has stdin closed, socket() may (and will) return 0. This is totally fine.

* TransportUDP: fix incoming socket creation
dirk-thomas pushed a commit that referenced this pull request Aug 4, 2020
* roscpp: TransportTCP: Allow socket() to return 0

In situations that an application has stdin closed, socket() may (and will) return 0. This is totally fine.

* TransportUDP: fix incoming socket creation
dirk-thomas pushed a commit that referenced this pull request Aug 4, 2020
* roscpp: TransportTCP: Allow socket() to return 0

In situations that an application has stdin closed, socket() may (and will) return 0. This is totally fine.

* TransportUDP: fix incoming socket creation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants