I successfully convert my service to run using xinetd on linux. However I still have one very minor hole. Is there a way the process can determine what port it was launched from?
If you do a ZSHOW "D":lv and look at the entry
for the socket named 0, one of the fields is
LOCAL=<ipaddr>@<port>. For example:
0 OPEN SOCKET TOTAL=1 CURRENT=0
SOCKET=h11967307790 DESC=0 CONNECTED ACTIVE TRAP REMOTE=99.999.99.99@35606
In this case, xinetd was listening on port 7777.