Operating System - HP-UX
1834125 Members
2383 Online
110064 Solutions
New Discussion

Omnimcopy in background process

 
SOLVED
Go to solution
Raul Gonzalez Limon
Occasional Contributor

Omnimcopy in background process

Hi Gurus,

I make two copies of tapes into new tapes every day in background. My problem is that the log of the omnimcopy process is not being logged until omnimcopy has finished.

I have tried with stout (omnimcopy $PARAMETERS > $FILE) and with a "tee -a". But the results are the same...

Can anyone help me with this...

Thanks a lot !
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Omnimcopy in background process

You are wasting your time. You will get no output until either the process terminates OR you get enough output to fill the buffer --- which would be many error messages. Even combining stdout and stderr onto the same file descriptor does no good. Welcome to the world of buffered output.

In case your are wondering how xomni does it, surprisingly, xomni does not actually invoke the command-line utility omnimcopy.
If it ain't broke, I can fix that.
Raul Gonzalez Limon
Occasional Contributor

Re: Omnimcopy in background process

So, i understand there is no way to do it?
Raul Gonzalez Limon
Occasional Contributor

Re: Omnimcopy in background process

But then.. there is something i don't understand. Why if i do it in foreground process, it shows me the stdout in time?
A. Clay Stephenson
Acclaimed Contributor

Re: Omnimcopy in background process

I run omnimcopy commands in the foreground and I don't get immediate output UNLESS stdout is a terminal device. In the case that stdout and stderr are determined to be tty devices then the output is line-buffered. As soon as an ASCII LF is sent, the buffer is flushed -- it shouldn't make any difference whether it is foreground or background.
If it ain't broke, I can fix that.