converted tcp-echo to use sigaction

The tcp-echo example has been converted to use
sigaction instead of signal.