home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume26 / QBATCH / patch03a < prev    next >
Encoding:
Text File  |  1991-11-29  |  13.0 KB  |  340 lines

  1. Newsgroups: comp.sources.misc
  2. From: alan@tharr (Alan Saunders)
  3. Subject:  v26i085:  QBATCH - a queued batch processing system for UNIX, Patch03a/2
  4. Message-ID: <csm-v26i085=QBATCH.211946@sparky.IMD.Sterling.COM>
  5. X-Md4-Signature: 10a79651645b139542b22099da7f4e79
  6. Date: Sat, 30 Nov 1991 03:20:05 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: alan@tharr (Alan Saunders)
  10. Posting-number: Volume 26, Issue 85
  11. Archive-name: QBATCH/patch03a
  12. Environment: UNIX
  13. Patch-To: QBATCH: Volume 25, Issue 20-25
  14.  
  15. Well, the mail seems to have tailed off a fair amount now, so I'm assuming
  16. that all the glaring holes have been found.
  17.  
  18. The only outstanding problems I am aware of are with a user who doesn't have
  19. news or mail access, and I can't get the patches to him 'til next week.  It
  20. may be that the latest version solves his problems, but I'll state them
  21. briefly here:
  22.  
  23. HP 9000/800 HP/UX 8.00 After a system reboot (with a job in the queue) the
  24. job restarts and completes but qp hangs without apparently recognising that
  25. the child has terminated.  Seems to clear up ok when another job is
  26. submitted.
  27.  
  28. Interactive 386/IX  Version 2.2 seems ok but systems in 2.01 just seem to
  29. hang.
  30.  
  31. If anyone has ported QBATCH to either of these environments or can give any
  32. help, please contact me.
  33.  
  34. This is qbatch patch 03. Issued 22 Nov 1991.
  35.  
  36. Change directory to the root of the qbatch hierarchy (where you originally
  37. copied and unpacked the shar files and the patches.)  Unshar BOTH parts of
  38. this submission and apply the patches as:
  39.  
  40. patch -p0 < patches/qbatch.p3
  41.  
  42. (You may want to read the notes in src/config.ARCH before making).
  43.  
  44. The following points are addressed in this patch.
  45.  
  46. change process priority (nice) to be BEFORE seutid.  (non root uid's can't
  47. increase priority (reduce nice value)!!)
  48.  
  49. This was reported in comp.sources.bugs.  If you manually changed qp.c, you
  50. will need to re-instate the patch 2 source before applying this patch.
  51.  
  52. Changed occurrences of cc to $(CC) to allow definition of compiler.
  53. (compiles with gcc vn 1.39)
  54.  
  55. Added qbatch.h dependency to logging.o and time.o to force recompilation
  56. after changing Makefile.
  57.  
  58. Pointed out to me by Michael Hamilton <hamilton@wcc.govt.nz> that POSIX
  59. conforming cuserid() returns the user name relating to the EFFECTIVE user id
  60. and not the logged in user id!  Since js is setuid root, the entry.qe_uname
  61. displayed in ql, and used by jobdone (and used to send mailed monitors to) is
  62. always root on a POSIX conformant system.
  63.  
  64. added 3 new defines to config.h, and related code to config.c to define the
  65. source of the logged in user name.
  66.  
  67. Tidied up sources a bit so that lint doesn't complain so much.
  68.  
  69. Added facility for using predefined configurations defined in a new file
  70. config.ARCH.  If users send me their configurations when they have QBATCH
  71. working, I can include them in this file and we can forestall much hacking of
  72. config.h for future users on the same architecture.
  73.  
  74. Fixed a 'tail chasing dog' in config.h.  If a system needs ???_t defining, it
  75. needs it first of all in qbatch.h.  qbatch.h is included before config.h
  76. since the latter needs some of the defines in qbatch.h???
  77.  
  78. Since I want to keep all architecture variables in the same file (config.h)
  79. I've added an #ifdef for __QBATCH_H_ around the typedefs and #included
  80. config.h in qbatch.h.  .. Sounds convoluted but it does what I want!
  81.  
  82. Implemented specifying monitors as pipes.
  83.  
  84. Found bug! js was only checking enviroment for MONITOR if queue default
  85. monitor was NONE.  Changed this and made rejection message more informative.
  86.  
  87. Added leading zero to patchlevel .. at the rate this is going, I'll need it!
  88.  
  89. Regards ..Alan
  90. #! /bin/sh
  91. # This is a shell archive.  Remove anything before this line, then unpack
  92. # it by saving it into a file and typing "sh file".  To overwrite existing
  93. # files, type "sh file -c".  You can also feed this as standard input via
  94. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  95. # will see the following message at the end:
  96. #        "End of archive 1 (of 2)."
  97. # Contents:  PLEASE src/config.ARCH
  98. # Wrapped by root@vfib_d on Fri Nov 22 12:15:09 1991
  99. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  100. if test -f 'PLEASE' -a "${1}" != "-c" ; then 
  101.   echo shar: Will not clobber existing file \"'PLEASE'\"
  102. else
  103. echo shar: Extracting \"'PLEASE'\" \(3761 characters\)
  104. sed "s/^X//" >'PLEASE' <<'END_OF_FILE'
  105. X[
  106. X  I started to write this to add to the header of qbatch patch 3.  It struck me
  107. X  whilst writing it that it actually applies to any package that has been
  108. X  posted to the net.  Personally, I have been pleasantly surprised and
  109. X  encouraged by the response I have received, but there are cases where
  110. X  users have sent me queries, then nothing further.  I don't know in which
  111. X  of the following categories they now belong.  I am sure that other software
  112. X  authors have the same experience.
  113. X
  114. X  I'm therefore posting it as a separate message in comp.sources.d.  As it
  115. X  stands it is related to QBATCH.  Just substitute 'product/program/package'
  116. X  for 'QBATCH' and 'author(s)' for 'me/i/' and see if it applies to you.
  117. X
  118. X  Alan .. 22 Nov 1991
  119. X]
  120. In the absence of evidence to the contrary, (and assuming that you have any
  121. interest at all in QBATCH) I can only assume one of the following
  122. possibilities:
  123. X
  124. X    1- You got it all working by just changing definitions in config.h.
  125. X
  126. X        2- You had to make changes to the released version and patches to
  127. X       get it working.
  128. X
  129. X    3- You got it working and have in some way altered it's functionality
  130. X       (by adding facilities enhancements etc.)
  131. X    
  132. X    4- You can't get it working at all.
  133. X
  134. X    5- You haven't got time to work on it now.
  135. X
  136. X1- If you haven't already done so please send me details of your configuration.
  137. X   The easiest way is :
  138. X   grep '^#define' config.h >file
  139. X   grep '^typedef' config.h >>file
  140. X   If your machine supports uname then :
  141. X   uname -a >> file
  142. X   Edit the file if necessary to provide full information on system type,
  143. X   operating system and level, and compiler (if not native) and compiler 
  144. X   switches.
  145. X   Then please mail it to me.
  146. X
  147. X2- Please mail me the diffs between your sources and mine (at  the latest
  148. X   patch level) If the changes are necessary to get it working, others need to
  149. X   know.
  150. X
  151. X3- If you've enhanced the functionality of QBATCH, others may want to share.
  152. X   As of patch level 3 I've implemented all suggestions received (except a
  153. X   request for multiple concurrent jobs in a queue which would have belied
  154. X   the nature of a queued batch system).
  155. X
  156. X   If the enhancement is one or more standalone programs, then why not post
  157. X   them to comp.sources.misc (but also mail me a copy so that I can include
  158. X   them in the distribution).
  159. X   If it involves changes to the existing sources, then please mail me the
  160. X   diffs so that I can incorporate it at source distribution level.  I can then
  161. X   issue a patch to bring all users into line.
  162. X
  163. X   It is to your own advantage to do this, as patches and enhancements
  164. X   issued by by me will ALWAYS be based on the latest patch level as issued.
  165. X   If your sources differ through local changes, then you will have to patch
  166. X   by hand to take advantage of them.
  167. X
  168. X4- Contact me!  Someone else may have got it working on the same platform,
  169. X   and has let me know.  I may have the info you want.
  170. X   Please include ALL the information that you can regarding the problem:
  171. X
  172. X   The system you are trying to build on
  173. X   The operating system, version and level.
  174. X   The compiler, make, etc you are using to build (if not system standard)
  175. X   error messages produced by 'make'.
  176. X
  177. X   If I can help I will do so, if I can't I'll let you know, and you can
  178. X   post a query onto the net (someone will have the answer).
  179. X
  180. X5- If you feel the QBATCH be useful, try to find the time.
  181. X   One sees messages on the net of the form:
  182. X   "I'm trying to contact the author of so-and-so', I've got problems."
  183. X   If it's got to this stage, it could be too late.
  184. X   If you find problems, then the sooner they're sorted out the better.
  185. X   If not for yourself, then for the person less experienced than yourself
  186. X   who may have less work to do when you send me your configuration details.
  187. END_OF_FILE
  188. if test 3761 -ne `wc -c <'PLEASE'`; then
  189.     echo shar: \"'PLEASE'\" unpacked with wrong size!
  190. fi
  191. # end of 'PLEASE'
  192. fi
  193. if test -f 'src/config.ARCH' -a "${1}" != "-c" ; then 
  194.   echo shar: Will not clobber existing file \"'src/config.ARCH'\"
  195. else
  196. echo shar: Extracting \"'src/config.ARCH'\" \(3846 characters\)
  197. sed "s/^X//" >'src/config.ARCH' <<'END_OF_FILE'
  198. X/************************************************************************
  199. X*
  200. X* This file is designed to help new users of QBATCH to get it compiled
  201. X* on their system.  It comprises the #defines in config.h claimed to
  202. X* give a working QBATCH on various systems.
  203. X* 
  204. X* If you get QBATCH working on your system, please send details to me
  205. X* in the following format, so that it can be included in the release.
  206. X*
  207. X* The easiest way to do this is:
  208. X* uname -a           >    <filename>
  209. X* grep '^#define' config.h >>    <filename>
  210. X* grep '^typedef' config.h >>    <filename>
  211. X*
  212. X* edit the resulting <filename> to enclose the architecture info as a quote
  213. X* and to bracket the entire group with an #ifdef/#endif on a name preferrably
  214. X* not in the following list.  Then send it to me.
  215. X*
  216. X* Also included are any comments relating to oddballs in configuration.
  217. X*
  218. X* Current known working configurations as at 18 Nov 1991:
  219. X*
  220. X* To use one of these predefined configurations, #define one of the following
  221. X* architectures in config.h on the line BEFORE this file is #included.
  222. X*
  223. X* #define        Source and Platform.
  224. X*
  225. X* SUNSPARC.411            Me.
  226. X*            SunOS 4.1 4.1.1 on Sun4 Sun4C (Sparc)
  227. X*
  228. X* DEC3100.U40        Bryan        <bryan%sphinx.uucp.uunet.uu.net>
  229. X*            Ultrix 4.0 on DECstation 3100
  230. X*
  231. X* RS6000.AIX315        Michael Gray <mjg@eng.cam.ac.uk>
  232. X*            AIX 3.1.5 on IBM RS6000            
  233. X*           and  Michael Hamilton <hamilton@wcc.govt.nz>
  234. X*            (os version unstated) on IBM RS6000
  235. X*
  236. X************************************************************************/
  237. X
  238. X#ifdef SUNSPARC.411
  239. X/* SunOS 4.1.1 version 2, Architecture sun4, sun4c (sparc) */
  240. X#ifndef __QBATCH_H_
  241. X#define ARCH_DEFINED
  242. X#define XPG3PGP        /* setpgid() and kill() with negative pid    XPG3 */
  243. X#define FCNTL        /* use fcntl() calls for file locking (XPG3) */
  244. X#define SIGACTION    /* XPG3 */
  245. X#define WAIT_XPG3    /* XPG3 */
  246. X#define QCLOCK_TICK sysconf(_SC_CLK_TCK);
  247. typedef void HANDLER_TYPE;
  248. typedef int WAIT_TYPE;     /* XPG3 */
  249. X#define Q_UNAME_PWD
  250. X#else /* __QBATCH_H_ */
  251. X/* include any of the ???_t typedefs here */
  252. X#endif /* __QBATCH_H_ */
  253. X/*
  254. X* Comments:
  255. X* This is the original release platform.  If you get a config.h containing
  256. X* different definitions, it'll be because I have been testing.  Several
  257. X* combinations will actually work on this platform, but the above are the
  258. X* recommended ones.
  259. X*/
  260. X#endif /* SUNPARC.411 */
  261. X
  262. X#ifdef DEC3100.U40
  263. X/* DECstation 3100 running Ultrix 4.0 */
  264. X#ifndef __QBATCH_H_
  265. X#define ARCH_DEFINED
  266. X#define XPG3PGP        /* setpgid() and kill() with negative pid    XPG3 */
  267. X#define FCNTL        /* use fcntl() calls for file locking (XPG3) */
  268. X#define SIGPAUSE 
  269. X#define SIGNAL
  270. X#define WAIT_XPG3    /* XPG3 */
  271. X#define QCLOCK_TICK sysconf(_SC_CLK_TCK);
  272. X#define Q_UNAME_PWD
  273. X#else /* __QBATCH_H_ */
  274. X/* include any of the ???_t typedefs here */
  275. X#endif /* __QBATCH_H_ */
  276. X/*
  277. X* Comments:
  278. X* Apparently requires a change to src/rcgen line 2:
  279. X* From: if  [ ${ech:-\c} = "A-n" ]
  280. X* to:   if  [ ${ech--\c} = "A-n" ]
  281. X*                  ^^
  282. X*/
  283. X#endif /*ifdef DEC3100.U40 */
  284. X
  285. X#ifdef RS6000.AIX315
  286. X/* IBM rs6000 running AIX version 3.1.5 */
  287. X#ifndef __QBATCH_H_
  288. X#define ARCH_DEFINED
  289. X#define XPG3PGP        /* setpgid() and kill() with negative pid    XPG3 */
  290. X#define FCNTL        /* use fcntl() calls for file locking (XPG3) */
  291. X#define SIGACTION    /* XPG3 */
  292. X#define WAIT_XPG3    /* XPG3 */
  293. X#define QCLOCK_TICK sysconf(_SC_CLK_TCK);
  294. typedef void HANDLER_TYPE;
  295. typedef int WAIT_TYPE;     /* XPG3 */
  296. X#define Q_UNAME_PWD
  297. X#else /* __QBATCH_H_ */
  298. X/* include any of the ???_t typedefs here */
  299. X#endif /* __QBATCH_H_ */
  300. X/*
  301. X* Comments:
  302. X* Michael found a bug in qp.c which his version ifdef'ed round. This will be
  303. X* fixed in patch 3.
  304. X* Also I hope to resolve a query relating to the need for '&' when structures
  305. X* are passed as parameters to functions.
  306. X* Given that This can be resolved, should be ok without any extra defines.
  307. X* resolved 21 Nov 91 changes incorporated in p3
  308. X*/
  309. X#endif /* RS6000.AIX315 */
  310. END_OF_FILE
  311. if test 3846 -ne `wc -c <'src/config.ARCH'`; then
  312.     echo shar: \"'src/config.ARCH'\" unpacked with wrong size!
  313. fi
  314. # end of 'src/config.ARCH'
  315. fi
  316. echo shar: End of archive 1 \(of 2\).
  317. cp /dev/null ark1isdone
  318. MISSING=""
  319. for I in 1 2 ; do
  320.     if test ! -f ark${I}isdone ; then
  321.     MISSING="${MISSING} ${I}"
  322.     fi
  323. done
  324. if test "${MISSING}" = "" ; then
  325.     echo You have unpacked both archives.
  326.     rm -f ark[1-9]isdone
  327. else
  328.     echo You still need to unpack the following archives:
  329.     echo "        " ${MISSING}
  330. fi
  331. ##  End of shell archive.
  332. exit 0
  333.  
  334. exit 0 # Just in case...
  335. -- 
  336. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  337. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  338. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  339. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  340.