OpenBCM V1.08-5-g2f4a (Linux)

Packet Radio Mailbox

IZ3LSV

[San Dona' di P. JN]

 Login: GUEST





  
KC2RGW > LINUX    01.02.10 18:01l 23 Lines 998 Bytes #999 (0) @ WW
BID : 9582_W2GSA
Read: GUEST
Subj: Writing perl apps for telnet/node use tip!
Path: IZ3LSV<IK2XDE<ON4HU<PY4WVZ<CX2SA<N9PMO<N4ZKF<N4LEM<KB2VLX<WA2SNA<
      WB2SNN<W2GSA
Sent: 100131/2246Z @:W2GSA.#CNJ.NJ.USA.NOAM #:9582 [Tinton Falls] $:9582_W2GSA
From: KC2RGW@W2GSA.#CNJ.NJ.USA.NOAM
To  : LINUX@WW

So I wrote a small app to do QRZ.com call sign lookups using their XML API so that I could initially use it in shell/console mode while running a swap net on HF.

I decided to just make it available over inetd so that packet nodes or telnet sessions could access the application.

Everything worked great in shell, I'd used this application for at least a year without any issues...when I put it over inetd...nothing, black screen, not handling <STDIN> properly and on and on.

After six plus hours of misery with my back in a knot, I bounced it off a few experienced Perl guys and got my answer.

It was a line buffering issue all along.  One hour to write the app, six to troubleshoot it for telnet use.

The fix was a simple one-liner.  Simply adding the following to the script at the top.

STDIN->autoflush;

That was it!

So if you try writing your own text applications for node or telnet use, remember this one...I know I will

73 Chris


Read previous mail | Read next mail


 20.09.2024 07:48:43lGo back Go up