mark (09/09/82)
One of the really annoying things about uucp is that when it gets jammed up, there is no easy way to tell spool files for mail from spool files for news from any other uux'ed spool files. The only way to tell is to inspect the D.local file mentioned in the C.remote file, and see if the command is rnews or rmail. Thus, when things get jammed up, it's very hard to remove all the backed up news (which was probably received by the other end days earlier) without losing valuable mail. The uucp command has an (undocumented) -g (grade) option which specifies the priority of the transfer. Grades are a character, and appear in the name of the C file, thus, for C.ucbvaxn1234, the grade is the letter 'n'. Lower letters in the ASCII sequence mean higher priority. The default for uucp is 'n', and this can be changed to, say, 'w' with the -gw option to the uucp command. Alas, the uux command does not have a -g option, but rather always uses grade 'A', a very high grade. It would seem to be a good idea to run news at a lower grade - this gives mail higher priority, and also makes it easier to remove all the news while leaving mail alone. The changes to uux.c to support a -g option are trivial and are enclosed here. Line numbers may vary, depending on what version of uucp you have, but if you have any trouble with this diff, be guided by your uucp.c, which has essentially identical code. I propose the grade 'd' as a standard news grade - this gives it higher priority than uucp but lower than mail, based on the assumption that uucp'ed files are longer than news articles. To change news to use this option, find your uux command and add "-gd" to the list of options. The location of the command may vary depending on your system - it may be in your sys or .sys file, or in your source to sendspoolednews, or in the DFTXMIT define in defs.h. Of course, making this change does not affect your connected neighbors in any way, except for the order that news and mail arrive, so there is no compatibility problem. Mark diff -c for uux.c *************** *** 37,42 int pipein = 0; int startjob = 1; int Copy = 1; char path[MAXFULLNAME]; char cmd[BUFSIZ]; char *ap, *cmdp; --- 37,43 ----- int pipein = 0; int startjob = 1; int Copy = 1; + char Grade = 'A'; char path[MAXFULLNAME]; char cmd[BUFSIZ]; char *ap, *cmdp; *************** *** 69,74 case 'c': Copy = 0; break; case 'x': Debug = atoi(&argv[1][2]); if (Debug <= 0) --- 70,78 ----- case 'c': Copy = 0; break; + case 'g': + Grade = argv[1][2]; + break; case 'x': Debug = atoi(&argv[1][2]); if (Debug <= 0) *************** *** 345,351 fclose(fpc); if (cflag) { ! gename(CMDPRE, xsys, 'A', cfile); link(tcfile, cfile); unlink(tcfile); if (startjob) --- 349,355 ----- fclose(fpc); if (cflag) { ! gename(CMDPRE, xsys, Grade, cfile); link(tcfile, cfile); unlink(tcfile); if (startjob)