[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

netcat in listen mode don't exit



I"m trying to setup netcat so it serves logs to other systems. When a client connects, the server starts to send some logs.

I run netcat in listem mode like this:

# nc -l -p 5558 -c "tail -f /var/log/syslog"

the client I run like this:

# nc <host> 5558

The problem is that the server keeps running when client disconnects. The netstat doesn't show the connection anymore, but if I try to reconnect, I get "connection refused". Already tryed -k and -q 0 options (but I dont know if I understood them correctly).

The problem seams to be in the -c option. Without that, all works perfectly.

Any help would be apreciated.


Reply to: