Assertion failure with --exec=date
The networking swiss army knife
Status: Beta
Brought to you by:
themnemonic
I'm trying to simulate a daytime server with netcat.
I expect this to work, but it fails:
[on terminal A]
$ netcat -l -p 9999 -e date
[on terminal B]
$ netcat -c localhost 9999
netcat: core.c:372: core_tcp_connect: Assertion `ret == 0' failed.
Aborted
This certainly looks like a bug.
On the other hand, replacing 'date' with 'cat' apparently works.
The problem with this is because the connection from the other side is closed and thus the file descriptor is reset before the client has time to read the answer. It's indeed a bug, i'll investigate it but unfortunately i'm unable to reproduce it here.