at and atrun
Sven-Ove Westberg
mcvax!cad.luth.se!sow at uunet.uu.net
Tue Dec 20 21:28:11 AEST 1988
> I have a problem running at and atrun on our sun3 under Sun UNIX 4.2
> Release 3.5
> the script is never executed, and when I run atrun by hand, I get an error:
> like this one:
> 88.334.0000.09: bad spool header
> 88.335.1105.48: bad spool header
It is a bug in the c-compiler, c-library or atrun. The problem is that
Suns scanf requires thet it is atleast one character left to this
expession '%*[^\n]'. I include a diff from bsd4.3 atrun to fix this
problem.
------- atrun.c -------
*** /tmp/da8191 Tue Dec 13 09:02:45 1988
--- atrun.c Sun Oct 16 00:27:10 1988
***************
*** 177,186 ****
* Grab the 4-line header out of the spoolfile.
*/
if (
! (fscanf(infile,"# owner: %127s%*[^\n]\n",owner) != 1) ||
! (fscanf(infile,"# jobname: %127s%*[^\n]\n",jobname) != 1) ||
! (fscanf(infile,"# shell: %3s%*[^\n]\n",shell) != 1) ||
! (fscanf(infile,"# notify by mail: %3s%*[^\n]\n",mailvar) != 1)
) {
fprintf(stderr, "%s: bad spool header\n", spoolfile);
exit(1);
--- 177,186 ----
* Grab the 4-line header out of the spoolfile.
*/
if (
! (fscanf(infile,"# owner: %127s\n",owner) != 1) ||
! (fscanf(infile,"# jobname: %127s\n",jobname) != 1) ||
! (fscanf(infile,"# shell: %3s\n",shell) != 1) ||
! (fscanf(infile,"# notify by mail: %3s\n",mailvar) != 1)
) {
fprintf(stderr, "%s: bad spool header\n", spoolfile);
exit(1);
Sven-Ove Westberg, CAD, University of Lulea, S-951 87 Lulea, Sweden.
ARPA: sow%cad.luth.se at ucbvax.berkeley.edu (only dumb ARPA mailers)
More information about the Comp.sys.sun
mailing list