CYGWIN PIDs ...

Snyder, Alexander alex at misteralexander.com
Wed Jan 6 14:38:58 MST 2016


Hello!

I have written a script that establishes an SSH Tunnel and does Port
Forwarding from a local CYGWIN Shell ....

When I try to kill the tunnel by the PID, I get nothing ...

Does anyone know how CYGWIN handles PIDs in a local Shell?

ssh -NTf -L 6111:remote.server.org:8080 -L 6112:remote.server.org:8080
me at tunnel.server.org
PIDOF=$!
echo -e "Local Port 6111 is now resolving content from \"
remote.server.org:8080\""
echo -e "Local Port 6112 is now resolving content from \"
remote.server.org:8080\""
echo -e ""
echo -e "Port Forwarding
${red_back}${yellow_text}Active${norm_text}${norm_back}:"
            while true
                do
                    echo -e "Press Any Key to ${red_text}STOP${norm_text}
Port Forwarding ..."
                    read kill
                    case $kill in
                        *) kill $PIDOF ;;
                    esac
                done
    ;;
esac

I'm just getting an empty variable (kill has nothing to kill) .... since
this is just a local shell and not a full fledged system, I was wondering
if anyone knew how CYGWIN handles PIDs.

--
Thanks,
--:: Alexander J. Snyder ::--
--:: ThisGuyShouldWorkFor.Us <http://thisguyshouldworkfor.us> ::--
--:: "Never trust a computer you can't throw out a window. --Steve Wozniak"
::--
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phxlinux.org/pipermail/plug-discuss/attachments/20160106/38de7a8a/attachment.html>


More information about the PLUG-discuss mailing list