Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: mcvax!cad.luth.se!sow@uunet.uu.net (Sven-Ove Westberg) Newsgroups: comp.sys.sun Subject: Re: at and atrun Message-ID: <8812130815.AAeru18985@eru.mt.luth.se> Date: 20 Dec 88 11:28:11 GMT Sender: usenet@rice.edu Organization: Sun-Spots Lines: 42 Approved: Sun-Spots@rice.edu Original-Date: Tue, 13 Dec 88 09:15:41 MET X-Sun-Spots-Digest: Volume 7, Issue 64, message 10 of 12 > 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@ucbvax.berkeley.edu (only dumb ARPA mailers)