T.R | Title | User | Personal Name | Date | Lines |
---|
665.1 | | JON::MORONEY | Redundancy example: Criminal lawyer. | Sun Jan 17 1988 13:01 | 10 |
| Include your SYS$ERROR file. Your program works fine as is, and I've
been doing similar things from C for a while. Remember, it takes a
little while for the data to get written out to the file (it's probably
in RMS buffers) and the file is locked until the program terminates.
Run the program interactively for obvious errors. You'll get an error on
your terminal if something's wrong, but the RUN/PROC process sometimes
disappears without a peep for some errors.
-Mike
|
665.2 | | SMAUG::MENDEL | Pessimists Always Get Good News. | Mon Jan 18 1988 12:57 | 7 |
| Did you try pointing FOO at your terminal when you ran it?
$ RUN FOO/OUT='f$log("TT")'
Unadorned printf's should work. (tell me if they don't?)
Kevin
|
665.3 | | SMAUG::MENDEL | Pessimists Always Get Good News. | Mon Jan 18 1988 13:01 | 9 |
| RE .-1
... I just re-read .0, and I guess I jumped to the conclusion that
you wanted to have you're detached process write to you're terminal.
(That's what SYS$OUTPUT means to me ... )
So ignore my ramblings ...
P.S. *DID* you point /OUTPUT to somewhere?
|
665.4 | Redirecting FOO's output | 38167::BHAVNANI | Must be the compiler... | Tue Jan 19 1988 00:29 | 20 |
| On closer inspection I found I indeed had a SYS$ERROR.; created in
my dir, along with a plethora of SYS$OUTPUT.;s. However, all files
were zero block files. I tried /OUT=OUTPUT.LOG, /ERR=ERROR.LOG but
still got zero length files. I even killed the sleep(10), but no
luck.
In any case, I'm going to go with an explicitly created .LOG file
opened as shareable for read, so I can monitor the progress of the
detached process. I strongly suspect it's meaningless to expect
output at a device as there (apparently) is no device associated
with the process (hence "detached"?)
Now only if someone wrote me a friendly C-callable $SNDJBC routine,
I'd be thrilled... :-)
/ravi
PS: My detatched process runs a pgm that isn't supposed to terminate
until external control directs it to do so - that's why I couldn't
just wait till the program ended, to view the O/P file.
|
665.5 | Blame the run-time system | SQM::HALLYB | You have the right to remain silent. | Tue Jan 19 1988 21:42 | 4 |
| Perhaps you should try including a $FLUSH, which will force out
the buffers immediately. I don't know how you do it from C.
John
|
665.6 | Flushing SYS$OUTPUT | FOO::BHAVNANI | Must be the compiler... | Tue Jan 19 1988 22:57 | 6 |
| That's an idea. I haven't tried it yet, but I guess what I should.
Btw, flushing SYS$OUTPUT's buffer in C is easy:
fflush (stdout);
/ravi
|
665.7 | special case? | OVDVAX::LENNIG | Dave, SWS, @CYO Cincinnati | Wed Jan 20 1988 11:39 | 9 |
| This has hit upon something I've always wondered about.
There is a DCL command SET OUTPUT_RATE[=delta-time] which causes
these flushes to occur automagically (for batch jobs, it says).
Q1 - does this only apply to batch? (How about 'NETWORK')
Q2 - how does one do this for processes that don't have a CLI?
Dave
|
665.8 | | PASTIS::MONAHAN | I am not a free number, I am a telephone box | Wed Jan 20 1988 22:09 | 6 |
| There is a flush service that anything that owns an output file can
use. DCL owns the batch log file for a process that has DCL as its CLI.
I am not sure which other CLIs can be persuaded to do regular
flushes. In a process without a CLI the application programme owns all
output files, so it can decide if or when it wants to do a flush.
|
665.9 | I think it's broader in definition | MDVAX3::COAR | M��se Choreographer | Thu Jan 21 1988 12:03 | 9 |
| SET OUTPUT_RATE applies to all process log files, including (I'm
pretty sure) the file you just DEFINEd SYS$OUTPUT to go to. That
is, all output files that are process-permanent and opened by DCL.
Which makes me think that it would also apply to files you might
be using with OPEN and WRITE (as long as you said /SHARE=READ).
Someone from VMS-land want to toss in a couple of �? Jon?
#ken :-)}
|
665.10 | | PLDVAX::ZARLENGA | Lost the will to compromise | Sun Jan 24 1988 14:43 | 7 |
| How does a _detached_ process know that SYS$OUTPUT is the same
SYS$OUTPUT of the initiating process?
A subprocess can always assume it's available, but this doesn't
seem like a wise assumption for a detached process.
-mike z
|
665.11 | Unwise? I think I agree | DPDMAI::BEATTIE | But, Is BLISS ignorance? | Mon Jan 25 1988 10:38 | 24 |
| RE: .10
As far as I know, a DETACHED process need have nothing of any
consequence in common with the initiating process; It must contend
for and consume resources all by itself. It has it's own process and
job logical tables, and in particular, it's own translation of
SYS$OUTPUT:.
If the device to which its SYS$OUTPUT logical points is currently
allocated to another process (even the initiator), communications
are limited in the same way that they would be limited if the device
was allocated to ANY other process. SYS$GETDVI will return the owner
of a device (DVI$_OWNUIC, DVI$_PID) but you're going to have
difficulty finding the owner process translation of SYS$OUTPUT:
I would say that if you detach a program of your own, you could
code in the ASSUMPTION that your detached process will be directing
its output to a device allocated to another process. I would expect
you'd need to in order to provide for use of SYS$BRKTHRU, or overriding
device protections, or something like that...
-- Brian
|