Replying again ... Having looked at the previous email, I notice that the if/else/endif was originally #if/#else/#endif. Those #'s are important ... ignore my previous solution and put the #s back.
Oh - and whether UCB is 1 or 0 - do "man setpgrp" and hopefully the answer will be obvious ... Cheers, Wol -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Doug Chanco Sent: 27 December 2007 13:43 To: [email protected] Subject: RE: [U2] anyone seen this error before? # cat uvcron.c /* 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 setpgrp(0,getpid()); else setpgrp(); endif /* CHANGE PATH TO MATCH YOUR INSTALLATION */ (void)execve("/usr/ibm/uv/bin/uv",argv,envp); /* We should never come back here */ printf("exec failed \n"); exit(-1); } When I try to compile the above code I am getting the following errors: (using both cc and gcc) on aix 5.2 # gcc uvcron.c uvcron.c: In function `main': uvcron.c:17: error: parse error before numeric constant uvcron.c:25: error: parse error before "void" # My 'c' programming skills are pitiful, can anyone shed any light on the errors and a fix? Thanks, Dougc ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
