I have one question about this 'c' program

#define UCB 0
/* set to 0 for System V or 1 for Berkeley */

What should the above be set to?  We are running aix 5.2, my gut feeling
is System V


Thanks,
Dougc


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Hona, David S
Sent: Tuesday, December 18, 2007 9:52 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] anyone seen this error before?

Here is Dave Church's solution/workaround to address the long
outstanding UV & cron issue, it's a little C program...

-----Original Message-----
From: Hona, David S 
Sent: Thursday, January 19, 2006 9:02 PM
To: 'u2-users@listserver.u2ug.org'
Subject: RE: [U2] [UV] Calling Universe from CRON

I believe that issue is still there...haven't check lately...
 
Dave Church wrote & posted this C code on Info-Ardent and in
comp.databases.pick to solve the problem...


/* This c routine can be used to start universe processes 
   in cron or at.  Normally only one process can run at a 
   time because they use the same printer memory segment. 
   simply replace the 'uv' command with 'uvcron' for example: 
   uvcron 'BATCH-REPORT1' > dave.mail */ #define UCB 0  /* set to 0 for
System V or 1 for Berkeley */ main (argc, argv, envp) int argc; char
*argv[], *envp[]; { #if UCB 
        (void)setpgrp(0,getpid());
#else 
        (void)setpgrp();
#endif
/* CHANGE PATH TO MATCH YOUR INSTALLATION */
(void)execve("/u1/uv/bin/uv",argv,envp);
/* We should never come back here */
printf("exec failed \n");
exit(-1); 



}   




-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Clifton Oliver
Sent: Tuesday, December 18, 2007 3:20 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] anyone seen this error before?

Because that id is used to determine the id of the printer memory
segment for the process. If you have two UV processes with the same
gpid, they end up sharing the memory segment. This is where your MFILE
structures are stored (rotating file pool), among other things.  
Pointers get mixed up, and you end up getting some files data written
into a completely different file, usually corrupting the group or even
the file header, depending on how angry the computer gods are that day.


-- 

Regards,

Clif
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

-- 
This message has been scanned for viruses and
dangerous content by SecureMail, and is
believed to be clean.
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to