# 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/