$! CGIWASD.COM 'f$verify(0) $! DECnet object for WASD HTTPd DECnet-based CGI scripting. $! STARTUP_DECNET.COM expects this to be located in WASD_ROOT:[CGI-BIN]. $! 24-APR-2003 MGD a little "exception"al handling $! 15-AUG-1998 MGD reuse $! 07-JAN-1998 MGD initial $! $ delsym = "delete/symbol" $ delsym/global/all $ delsym/local/all $ on warning then $exit $ open/read/write/share net$link SYS$NET $ reuseLoop: $ if f$trnlnm("CGIEOF","LNM$PROCESS") .nes. "" then deassign/process CGIEOF $ if f$trnlnm("CGIREUSE","LNM$PROCESS") .nes. "" $ then $ deassign/process CGIREUSE $ readNetLink = "read/error=endReuseLoop/end=endReuseLoop net$link Line" $ else $ readNetLink = "read/error=endReuseLoop/end=endReuseLoop/time=30 net$link Line" $ endif $ define/process/nolog sys$output net$link $ define/process/nolog sys$input net$link $ define/process/nolog http$input net$link $ linkLoop: $ readNetLink $'Line' $ goto linkLoop $ endLinkLoop: $ DoIt: $ if f$trnlnm("CGIREUSE","LNM$PROCESS") .nes. "" $ then $ cgiReused = 'f$trnlnm("CGIREUSED","LNM$PROCESS")' + 1 $ define/process/nolog CGIREUSED 'cgiReused' $ endif $ readNetLink $ on warning then $continue $'Line' $! 'f$verify(0) $ delsym = "delete/symbol" $ delsym/global/all $ delsym/local/all $ on warning then $exit $ write sys$output f$trnlnm("CGIEOF","LNM$PROCESS") $ endDoIt: $ deassign/process sys$output $ deassign/process sys$input $ deassign/process http$input $ if f$trnlnm("CGIREUSE","LNM$PROCESS") .nes. "" then goto reuseLoop $ endReuseLoop: $ if f$trnlnm("CGIREUSED","LNM$PROCESS") .nes. "" then deassign/process CGIREUSED $ close net$link $ exit