Re: [PATCH netcat] Only force fd's to -1 once

2020-09-27 Thread Duncan Roe
On Sun, Sep 27, 2020 at 02:18:21PM -0600, Bob Beck wrote: > On Sun, Sep 27, 2020 at 02:46:39PM +1000, Duncan Roe wrote: > > The motivation for this is to make debug logs less confusing. > > What is this fixing and what behavior are you changing? You can only see the difference

Re: [PATCH netcat] Only force fd's to -1 once

2020-09-27 Thread Duncan Roe
On Sun, Sep 27, 2020 at 07:53:27PM -0600, Theo de Raadt wrote: > Duncan Roe wrote: > > > On Sun, Sep 27, 2020 at 02:18:21PM -0600, Bob Beck wrote: > > > On Sun, Sep 27, 2020 at 02:46:39PM +1000, Duncan Roe wrote: > > > > The motivation for this is

[PATCH netcat] Only force fd's to -1 once

2020-09-26 Thread Duncan Roe
The motivation for this is to make debug logs less confusing. All changed lines have previously demonstrated the problem. Signed-off-by: Duncan Roe --- usr.bin/nc/netcat.c | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/usr.bin/nc/netcat.c b

Re: [PATCH netcat] Only force fd's to -1 once

2020-09-27 Thread Duncan Roe
On Sun, Sep 27, 2020 at 08:27:24PM -0600, Theo de Raadt wrote: > Duncan Roe wrote: > > > > I disagree with your plan. This kind of "force it off" programming is > > > typical. > > > > > Might be typical, but I think it's sloppy. > >

[PATCH netcat] UDP server with -k sends data to most recent client

2020-09-28 Thread Duncan Roe
This allows e.g. a sequence of clients to have 2-way conversations. Prior to this, server standard input was effectively discarded. -k -l -u -v reports each time a message comes from a different client than that from which the previous message came. Signed-off-by: Duncan Roe --- usr.bin/nc

[PATCH netcat] Use correct preposition in verbose reports

2020-09-20 Thread Duncan Roe
Rather than reporting everything as "on" report e.g. "Connection received from", "Bound to" and so on. Signed-off-by: Duncan Roe --- usr.bin/nc/netcat.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/usr.bin/nc/netcat.c b/usr.bin