OK VMS Wizards, here's a good one for you:
We have an application that comes as a pile of executables that get spawned
from a X Windows interface. One of the things we do under Unix is start
an X term as a backround process, and have it run a shell script.
So for the grand and glorious Port to VMS, I tried the direct approach:
simply replace all these
system("xterm -e sh gumby_script &");
In a word, NOT! For some reason, you do a "CREATE /TERM/NOWAIT" from
system(). The frame shows up on the display to be placed, and then disappears
once you place it. Hmmm....
Next try -- use lib$spawn. Roughly the same results. Grrr....
Final try -- use lib$spawn with NOWAIT to run a DCL script, that builds
ANOTHER script file, which it then runs with CREATE/TERM/WAIT. That works!
where gumby_dcl.com looks something like this
$ tmpfile = "sys$scratch" + f$getjpi("","PID") + ".COM"
$ open /write tmp 'tmpfile'
$ write tmp "$ write sys$output ""this is a test ''p1' ''p2' ''p3'""
$ write tmp "$ inquire throwaway ""hit enter to close this window""
$ close tmp
$ delete 'tmpfile';*
So my question is, (to quote P.J. O'Rourke) what the f**king f**k? Why
can't you start decterms asynchronously with system? Why CAN you start
them from DCL scripts run asynchronously? Is there some simpler way
to get from here to there?
I come from a Unix backround (Actually my mother was Mormom ...) so have
pity on me -- I'm used to a completely different set of arcane restrictions
and abstruse weirdness.
"Science has come with wonderful ways to cure sick people one at a time,
and to kill healthy people thousands at a time" -- guy on NPR