rncp does not output if piped
Running e.g. rncp -p | cat outputs nothing, while e.g. rnx -p | cat outputs identity information.
This makes e.g. parsing rncp -p to get the listening identity in scripts a bit tricky.
It seems rncp refuses to print anything when not run in an interactive tty?
Can you provide the complete commands you are using to reproduce this? Of course, just strip any destination hashes / filenames.
running
rncp -p | cat
in a terminal is the minimal example that outputs nothing. The full use in my script is
rncp -p | grep Listen
rnx -p | grep Listen
rnsh -p | grep Listen
In order to quickly grab the listening identity for all these tools; both rnx and rnsh work here.
edit: to clarify, this is all in a plain old linux terminal, or in a bash/sh script
Full example with outputs from my terminal (I realize rnsh is not a part of reticulum proper, just using it as an illustration):
$ rncp -p | cat
{nothing}
$ rnx -p | cat
Identity : <0d[..]>
Listening on : <8d[..]>
$ rnsh -p | cat
Identity : <32[..]>
$ rncp -p
Identity : <07[..]>
Listening on : <dd[..]>
$ rnx -p
Identity : <0d[..]>
Listening on : <8d[..]>
$ rnsh -p
Identity : <32[..]>
Can confirm. That is weird. This is gonna be an interesting one to fix...
Straight after printing the "Listening on" line, RNS is exiting with os._exit(), so the output is not flushed to the pipe. Adding sys.stdout.flush() before the exit() should fix it, or terminating more gracefully via sys.exit().