home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume22 / queuer / part01 next >
Text File  |  1990-06-07  |  63KB  |  2,349 lines

  1. Subject:  v22i007:  Multi-system program queueing package, Part01/03
  2. Newsgroups: comp.sources.unix
  3. Approved: rsalz@uunet.UU.NET
  4. X-Checksum-Snefru: 35b29043 43ba7a34 81580e88 692c2095
  5.  
  6. Submitted-by: Scott Bradner <sob@harvisr.harvard.edu>
  7. Posting-number: Volume 22, Issue 7
  8. Archive-name: queuer/part01
  9.  
  10.     These programs implement a mostly-transparent queueing and
  11. remote-execution system for programs that do not require tty-level
  12. access to the user.  That is, standard input and output can be
  13. copied as with rsh, but ioctls and the like will fail.  The entire
  14. package is extremely dependent on 4.[23] networking operations and
  15. may have some remaining localisms; however, it has been used without
  16. much trouble on recent Ultrix and SunOS machines.  There is at least
  17. one assumption that may require attention:  when using a remote file
  18. system, paths of the form /r/hostname/ are assumed to reach the root
  19. of the remote host.  Worse, some assumptions that the same path name
  20. is valid from different hosts have probably crept in.  Finally,
  21. NFS became popular sometime in the early evolution of the queuer so
  22. the modes of operation that do not require a remote file system
  23. were not fully developed.  These restrictions aside, we have found
  24. this package quite useful.
  25.     In operation, a program to be queued is made non-executable
  26. by the general public and a link is established from the queue program
  27. to the name of the program in another directory on the user's path.
  28. Alternately, the original program can be renamed and the link
  29. established in the same directory as the original program.  A configuration
  30. file is created in /usr/lib/queued with the same name as the queued
  31. program.  Access to the original program is controlled by briefly
  32. enabling world execution using the semantics of vfork() to minimize
  33. the window; this has proved adequate in our environment.
  34.     A list of potential execution hosts is specified in the
  35. configuration file and these are tried in order of least load
  36. (as determined by examining the rwho spool files) with the local
  37. host being used as a last resort (unless specifically disabled).
  38. This rather autonomous behavior can be can be made more deterministic
  39. through the use of the qmaster program.
  40.  
  41. #! /bin/sh
  42. # This is a shell archive.  Remove anything before this line, then unpack
  43. # it by saving it into a file and typing "sh file".  To overwrite existing
  44. # files, type "sh file -c".  You can also feed this as standard input via
  45. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  46. # will see the following message at the end:
  47. #        "End of archive 1 (of 3)."
  48. # Contents:  BGLIM.reg BIMED BIMED.check BIMED.long BLIMDEP
  49. #   BLIMDEP.long DONEMSG GGLIM.long GGLIM.reg GLIMDEP GLIMDEP.long
  50. #   GSPSSX.check GSPSSX.long GSPSSX.reg MANIFEST Makefile QUEUES
  51. #   README SPSSX.check SPSSX.long SPSSX.psy1995 SPSSX.reg SPSSX2.check
  52. #   SPSSX2.long SPSSX2.reg STUFF bcc bcsh bcsh.long bsh bsh.long cat
  53. #   cc compiler cspawn.c defer defer.long f77 fort getload.c
  54. #   getrload.c getstr.c gistat gistat.check gistat.long infile.c ipm
  55. #   lock.c newstring.c nroff optcmp.c otroff qrm.1 qs.1 qs.c queue.h
  56. #   queued.8 spell stat stat.check stat.long test titroff tp.troff
  57. #   usr.lib.queued.shar wordproc xfputs.c
  58. # Wrapped by rsalz@coconut.bbn.com on Tue May  1 17:18:17 1990
  59. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  60. if test -f 'BGLIM.reg' -a "${1}" != "-c" ; then 
  61.   echo shar: Will not clobber existing file \"'BGLIM.reg'\"
  62. else
  63. echo shar: Extracting \"'BGLIM.reg'\" \(124 characters\)
  64. sed "s/^X//" >'BGLIM.reg' <<'END_OF_FILE'
  65. Xprogram BGLIM.reg /usr/vendor/bin/BGLIM
  66. Xhost burrhus
  67. Xoption DEFAULT copyin ARG0
  68. Xefs
  69. Xmaxcpu 1800
  70. Xmode interactive
  71. Xqueue stat
  72. END_OF_FILE
  73. if test 124 -ne `wc -c <'BGLIM.reg'`; then
  74.     echo shar: \"'BGLIM.reg'\" unpacked with wrong size!
  75. fi
  76. # end of 'BGLIM.reg'
  77. fi
  78. if test -f 'BIMED' -a "${1}" != "-c" ; then 
  79.   echo shar: Will not clobber existing file \"'BIMED'\"
  80. else
  81. echo shar: Extracting \"'BIMED'\" \(285 characters\)
  82. sed "s/^X//" >'BIMED' <<'END_OF_FILE'
  83. Xprogram BIMED /usr/bmdp/exes/bmdp_mstr
  84. Xhost burrhus
  85. Xoption -D ignore ARG1
  86. Xoption -F ignore ARG1
  87. Xoption -T ignore ARG1
  88. Xoption -b ignore ARG1
  89. Xoption -o ignore ARG1
  90. Xoption -n
  91. Xoption -B
  92. Xoption /usr/bmdp/exes/*
  93. Xoption DEFAULT copyin ARG0
  94. Xefs
  95. Xmaxrun 1
  96. Xmaxcpu 900
  97. Xmode interactive
  98. Xqueue stat
  99. END_OF_FILE
  100. if test 285 -ne `wc -c <'BIMED'`; then
  101.     echo shar: \"'BIMED'\" unpacked with wrong size!
  102. fi
  103. # end of 'BIMED'
  104. fi
  105. if test -f 'BIMED.check' -a "${1}" != "-c" ; then 
  106.   echo shar: Will not clobber existing file \"'BIMED.check'\"
  107. else
  108. echo shar: Extracting \"'BIMED.check'\" \(297 characters\)
  109. sed "s/^X//" >'BIMED.check' <<'END_OF_FILE'
  110. Xprogram BIMED.check /usr/bmdp/exes/bmdp_mstr
  111. Xhost burrhus
  112. Xoption -D ignore ARG1
  113. Xoption -F ignore ARG1
  114. Xoption -T ignore ARG1
  115. Xoption -b ignore ARG1
  116. Xoption -o ignore ARG1
  117. Xoption -n
  118. Xoption -B
  119. Xoption /usr/bmdp/exes/*
  120. Xoption DEFAULT copyin ARG0
  121. Xefs
  122. Xmaxrun 1
  123. Xmaxcpu 180
  124. Xmode interactive
  125. Xqueue stat.check
  126. END_OF_FILE
  127. if test 297 -ne `wc -c <'BIMED.check'`; then
  128.     echo shar: \"'BIMED.check'\" unpacked with wrong size!
  129. fi
  130. # end of 'BIMED.check'
  131. fi
  132. if test -f 'BIMED.long' -a "${1}" != "-c" ; then 
  133.   echo shar: Will not clobber existing file \"'BIMED.long'\"
  134. else
  135. echo shar: Extracting \"'BIMED.long'\" \(297 characters\)
  136. sed "s/^X//" >'BIMED.long' <<'END_OF_FILE'
  137. Xprogram BIMED.long /usr/bmdp/exes/bmdp_mstr
  138. Xhost burrhus
  139. Xoption -D ignore ARG1
  140. Xoption -F ignore ARG1
  141. Xoption -T ignore ARG1
  142. Xoption -b ignore ARG1
  143. Xoption -o ignore ARG1
  144. Xoption -n
  145. Xoption -B
  146. Xoption /usr/bmdp/exes/*
  147. Xoption DEFAULT copyin ARG0
  148. Xefs
  149. Xmaxrun 1
  150. Xmaxcpu 14400
  151. Xmode interactive
  152. Xqueue stat.long
  153. END_OF_FILE
  154. if test 297 -ne `wc -c <'BIMED.long'`; then
  155.     echo shar: \"'BIMED.long'\" unpacked with wrong size!
  156. fi
  157. # end of 'BIMED.long'
  158. fi
  159. if test -f 'BLIMDEP' -a "${1}" != "-c" ; then 
  160.   echo shar: Will not clobber existing file \"'BLIMDEP'\"
  161. else
  162. echo shar: Extracting \"'BLIMDEP'\" \(124 characters\)
  163. sed "s/^X//" >'BLIMDEP' <<'END_OF_FILE'
  164. Xprogram BLIMDEP /usr/vendor/bin/BLIMDEP
  165. Xhost burrhus
  166. Xoption DEFAULT copyin ARG0
  167. Xefs
  168. Xmaxcpu 1800
  169. Xmode interactive
  170. Xqueue stat
  171. END_OF_FILE
  172. if test 124 -ne `wc -c <'BLIMDEP'`; then
  173.     echo shar: \"'BLIMDEP'\" unpacked with wrong size!
  174. fi
  175. # end of 'BLIMDEP'
  176. fi
  177. if test -f 'BLIMDEP.long' -a "${1}" != "-c" ; then 
  178.   echo shar: Will not clobber existing file \"'BLIMDEP.long'\"
  179. else
  180. echo shar: Extracting \"'BLIMDEP.long'\" \(135 characters\)
  181. sed "s/^X//" >'BLIMDEP.long' <<'END_OF_FILE'
  182. Xprogram BLIMDEP.long /usr/vendor/bin/BLIMDEP
  183. Xhost burrhus
  184. Xoption DEFAULT copyin ARG0
  185. Xefs
  186. Xmaxcpu 14400
  187. Xmode interactive
  188. Xqueue stat.long
  189. END_OF_FILE
  190. if test 135 -ne `wc -c <'BLIMDEP.long'`; then
  191.     echo shar: \"'BLIMDEP.long'\" unpacked with wrong size!
  192. fi
  193. # end of 'BLIMDEP.long'
  194. fi
  195. if test -f 'DONEMSG' -a "${1}" != "-c" ; then 
  196.   echo shar: Will not clobber existing file \"'DONEMSG'\"
  197. else
  198. echo shar: Extracting \"'DONEMSG'\" \(28 characters\)
  199. sed "s/^X//" >'DONEMSG' <<'END_OF_FILE'
  200. XYour batch job is finished.
  201. END_OF_FILE
  202. if test 28 -ne `wc -c <'DONEMSG'`; then
  203.     echo shar: \"'DONEMSG'\" unpacked with wrong size!
  204. fi
  205. # end of 'DONEMSG'
  206. fi
  207. if test -f 'GGLIM.long' -a "${1}" != "-c" ; then 
  208.   echo shar: Will not clobber existing file \"'GGLIM.long'\"
  209. else
  210. echo shar: Extracting \"'GGLIM.long'\" \(141 characters\)
  211. sed "s/^X//" >'GGLIM.long' <<'END_OF_FILE'
  212. Xprogram GGLIM.long /usr/vendor/bin/glim
  213. Xhost generali
  214. Xoption DEFAULT copyin ARG0
  215. Xefs
  216. Xmaxcpu 14400
  217. Xmode interactive
  218. Xqueue gistat.long
  219. Xnolocal
  220. END_OF_FILE
  221. if test 141 -ne `wc -c <'GGLIM.long'`; then
  222.     echo shar: \"'GGLIM.long'\" unpacked with wrong size!
  223. fi
  224. # end of 'GGLIM.long'
  225. fi
  226. if test -f 'GGLIM.reg' -a "${1}" != "-c" ; then 
  227.   echo shar: Will not clobber existing file \"'GGLIM.reg'\"
  228. else
  229. echo shar: Extracting \"'GGLIM.reg'\" \(134 characters\)
  230. sed "s/^X//" >'GGLIM.reg' <<'END_OF_FILE'
  231. Xprogram GGLIM.reg /usr/vendor/bin/glim
  232. Xhost generali
  233. Xoption DEFAULT copyin ARG0
  234. Xefs
  235. Xmaxcpu 1800
  236. Xmode interactive
  237. Xqueue gistat
  238. Xnolocal
  239. END_OF_FILE
  240. if test 134 -ne `wc -c <'GGLIM.reg'`; then
  241.     echo shar: \"'GGLIM.reg'\" unpacked with wrong size!
  242. fi
  243. # end of 'GGLIM.reg'
  244. fi
  245. if test -f 'GLIMDEP' -a "${1}" != "-c" ; then 
  246.   echo shar: Will not clobber existing file \"'GLIMDEP'\"
  247. else
  248. echo shar: Extracting \"'GLIMDEP'\" \(134 characters\)
  249. sed "s/^X//" >'GLIMDEP' <<'END_OF_FILE'
  250. Xprogram GLIMDEP /usr/vendor/bin/limdep
  251. Xhost generali
  252. Xoption DEFAULT copyin ARG0
  253. Xefs
  254. Xmaxcpu 1800
  255. Xmode interactive
  256. Xqueue gistat
  257. Xnolocal
  258. END_OF_FILE
  259. if test 134 -ne `wc -c <'GLIMDEP'`; then
  260.     echo shar: \"'GLIMDEP'\" unpacked with wrong size!
  261. fi
  262. # end of 'GLIMDEP'
  263. fi
  264. if test -f 'GLIMDEP.long' -a "${1}" != "-c" ; then 
  265.   echo shar: Will not clobber existing file \"'GLIMDEP.long'\"
  266. else
  267. echo shar: Extracting \"'GLIMDEP.long'\" \(145 characters\)
  268. sed "s/^X//" >'GLIMDEP.long' <<'END_OF_FILE'
  269. Xprogram GLIMDEP.long /usr/vendor/bin/limdep
  270. Xhost generali
  271. Xoption DEFAULT copyin ARG0
  272. Xefs
  273. Xmaxcpu 14400
  274. Xmode interactive
  275. Xqueue gistat.long
  276. Xnolocal
  277. END_OF_FILE
  278. if test 145 -ne `wc -c <'GLIMDEP.long'`; then
  279.     echo shar: \"'GLIMDEP.long'\" unpacked with wrong size!
  280. fi
  281. # end of 'GLIMDEP.long'
  282. fi
  283. if test -f 'GSPSSX.check' -a "${1}" != "-c" ; then 
  284.   echo shar: Will not clobber existing file \"'GSPSSX.check'\"
  285. else
  286. echo shar: Extracting \"'GSPSSX.check'\" \(170 characters\)
  287. sed "s/^X//" >'GSPSSX.check' <<'END_OF_FILE'
  288. Xprogram GSPSSX.check /usr/spss/spssx0/SPSSX
  289. Xhost generali
  290. Xoption /usr/spss/spssx0/*
  291. Xoption DEFAULT copyin ARG0
  292. Xefs
  293. Xmaxcpu 180
  294. Xmode interactive
  295. Xqueue gistat.check
  296. Xnolocal
  297. END_OF_FILE
  298. if test 170 -ne `wc -c <'GSPSSX.check'`; then
  299.     echo shar: \"'GSPSSX.check'\" unpacked with wrong size!
  300. fi
  301. # end of 'GSPSSX.check'
  302. fi
  303. if test -f 'GSPSSX.long' -a "${1}" != "-c" ; then 
  304.   echo shar: Will not clobber existing file \"'GSPSSX.long'\"
  305. else
  306. echo shar: Extracting \"'GSPSSX.long'\" \(170 characters\)
  307. sed "s/^X//" >'GSPSSX.long' <<'END_OF_FILE'
  308. Xprogram GSPSSX.long /usr/spss/spssx0/SPSSX
  309. Xhost generali
  310. Xoption /usr/spss/spssx0/*
  311. Xoption DEFAULT copyin ARG0
  312. Xefs
  313. Xmaxcpu 14400
  314. Xmode interactive
  315. Xqueue gistat.long
  316. Xnolocal
  317. END_OF_FILE
  318. if test 170 -ne `wc -c <'GSPSSX.long'`; then
  319.     echo shar: \"'GSPSSX.long'\" unpacked with wrong size!
  320. fi
  321. # end of 'GSPSSX.long'
  322. fi
  323. if test -f 'GSPSSX.reg' -a "${1}" != "-c" ; then 
  324.   echo shar: Will not clobber existing file \"'GSPSSX.reg'\"
  325. else
  326. echo shar: Extracting \"'GSPSSX.reg'\" \(162 characters\)
  327. sed "s/^X//" >'GSPSSX.reg' <<'END_OF_FILE'
  328. Xprogram GSPSSX.reg /usr/spss/spssx0/SPSSX
  329. Xhost generali
  330. Xoption /usr/spss/spssx0/*
  331. Xoption DEFAULT copyin ARG0
  332. Xefs
  333. Xmaxcpu 900
  334. Xmode interactive
  335. Xqueue gistat
  336. Xnolocal
  337. END_OF_FILE
  338. if test 162 -ne `wc -c <'GSPSSX.reg'`; then
  339.     echo shar: \"'GSPSSX.reg'\" unpacked with wrong size!
  340. fi
  341. # end of 'GSPSSX.reg'
  342. fi
  343. if test -f 'MANIFEST' -a "${1}" != "-c" ; then 
  344.   echo shar: Will not clobber existing file \"'MANIFEST'\"
  345. else
  346. echo shar: Extracting \"'MANIFEST'\" \(2594 characters\)
  347. sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
  348. X   File Name        Archive #    Description
  349. X-----------------------------------------------------------
  350. X BGLIM.reg                  1    
  351. X BIMED                      1    
  352. X BIMED.check                1    
  353. X BIMED.long                 1    
  354. X BLIMDEP                    1    
  355. X BLIMDEP.long               1    
  356. X DONEMSG                    1    
  357. X GGLIM.long                 1    
  358. X GGLIM.reg                  1    
  359. X GLIMDEP                    1    
  360. X GLIMDEP.long               1    
  361. X GSPSSX.check               1    
  362. X GSPSSX.long                1    
  363. X GSPSSX.reg                 1    
  364. X MANIFEST                   1    This shipping list
  365. X Makefile                   1    
  366. X QUEUES                     1    
  367. X README                     1    
  368. X SPSSX.check                1    
  369. X SPSSX.long                 1    
  370. X SPSSX.psy1995              1    
  371. X SPSSX.reg                  1    
  372. X SPSSX2.check               1    
  373. X SPSSX2.long                1    
  374. X SPSSX2.reg                 1    
  375. X STUFF                      1    
  376. X bcc                        1    
  377. X bcsh                       1    
  378. X bcsh.long                  1    
  379. X bsh                        1    
  380. X bsh.long                   1    
  381. X cat                        1    
  382. X cc                         1    
  383. X com.c                      2    
  384. X compiler                   1    
  385. X cspawn.c                   1    
  386. X defer                      1    
  387. X defer.c                    2    
  388. X defer.long                 1    
  389. X dequeue.c                  2    
  390. X enqueue.c                  3    
  391. X f77                        1    
  392. X fort                       1    
  393. X getload.c                  1    
  394. X getrload.c                 1    
  395. X getstr.c                   1    
  396. X gistat                     1    
  397. X gistat.check               1    
  398. X gistat.long                1    
  399. X infile.c                   1    
  400. X ipm                        1    
  401. X lock.c                     1    
  402. X newstring.c                1    
  403. X nroff                      1    
  404. X optcmp.c                   1    
  405. X otroff                     1    
  406. X qmaster.c                  3    
  407. X qrm.1                      1    
  408. X qrm.c                      2    
  409. X qs.1                       1    
  410. X qs.c                       1    
  411. X queue.1                    2    
  412. X queue.c                    2    
  413. X queue.h                    1    
  414. X queued.5                   2    
  415. X queued.8                   1    
  416. X queued.c                   2    
  417. X readconf.c                 2    
  418. X selhost.c                  2    
  419. X showqueue.c                2    
  420. X spell                      1    
  421. X stat                       1    
  422. X stat.check                 1    
  423. X stat.long                  1    
  424. X test                       1    
  425. X titroff                    1    
  426. X tp.troff                   1    
  427. X usr.lib.queued.shar        1    
  428. X wordproc                   1    
  429. X xfputs.c                   1    
  430. END_OF_FILE
  431. if test 2594 -ne `wc -c <'MANIFEST'`; then
  432.     echo shar: \"'MANIFEST'\" unpacked with wrong size!
  433. fi
  434. # end of 'MANIFEST'
  435. fi
  436. if test -f 'Makefile' -a "${1}" != "-c" ; then 
  437.   echo shar: Will not clobber existing file \"'Makefile'\"
  438. else
  439. echo shar: Extracting \"'Makefile'\" \(934 characters\)
  440. sed "s/^X//" >'Makefile' <<'END_OF_FILE'
  441. XOBJ=queue queued qs qrm qmaster defer
  442. X
  443. Xall: ${OBJ}
  444. X
  445. Xqueue: queue.o optcmp.o com.o readconf.o cspawn.o lock.o \
  446. X    newstring.o infile.o getrload.o selhost.o xfputs.o
  447. X    ${CC} -o queue queue.o com.o optcmp.o readconf.o cspawn.o lock.o \
  448. X        newstring.o infile.o getrload.o selhost.o xfputs.o
  449. X
  450. Xqueued: queued.o readconf.o enqueue.o newstring.o getstr.o \
  451. X    cspawn.o lock.o showqueue.o dequeue.o infile.o xfputs.o \
  452. X    getload.o
  453. X    ${CC} -o queued queued.o readconf.o enqueue.o newstring.o getstr.o \
  454. X        cspawn.o lock.o showqueue.o dequeue.o infile.o xfputs.o \
  455. X        getload.o
  456. X
  457. Xqs: qs.o com.o readconf.o newstring.o
  458. X    ${CC} -o qs qs.o com.o readconf.o newstring.o
  459. X
  460. Xqrm: qrm.o com.o readconf.o newstring.o
  461. X    ${CC} -o qrm qrm.o com.o readconf.o newstring.o
  462. X
  463. Xqmaster: qmaster.o readconf.o newstring.o getrload.o infile.o
  464. X    ${CC} -o qmaster qmaster.o readconf.o newstring.o getrload.o infile.o
  465. X
  466. Xdefer: defer.o
  467. X    ${CC} -o defer defer.o
  468. X
  469. Xclean:
  470. X    rm -f *.o ${OBJ}
  471. END_OF_FILE
  472. if test 934 -ne `wc -c <'Makefile'`; then
  473.     echo shar: \"'Makefile'\" unpacked with wrong size!
  474. fi
  475. # end of 'Makefile'
  476. fi
  477. if test -f 'QUEUES' -a "${1}" != "-c" ; then 
  478.   echo shar: Will not clobber existing file \"'QUEUES'\"
  479. else
  480. echo shar: Extracting \"'QUEUES'\" \(85 characters\)
  481. sed "s/^X//" >'QUEUES' <<'END_OF_FILE'
  482. Xcompiler
  483. Xwordproc
  484. Xstat
  485. Xstat.check
  486. Xstat.long
  487. Xtest
  488. Xgistat
  489. Xgistat.long
  490. Xdefer
  491. Xdefer.long
  492. END_OF_FILE
  493. if test 85 -ne `wc -c <'QUEUES'`; then
  494.     echo shar: \"'QUEUES'\" unpacked with wrong size!
  495. fi
  496. # end of 'QUEUES'
  497. fi
  498. if test -f 'README' -a "${1}" != "-c" ; then 
  499.   echo shar: Will not clobber existing file \"'README'\"
  500. else
  501. echo shar: Extracting \"'README'\" \(1915 characters\)
  502. sed "s/^X//" >'README' <<'END_OF_FILE'
  503. X    These programs implement a mostly-transparent queueing and
  504. Xremote-execution system for programs that do not require tty-level
  505. Xaccess to the user.  That is, standard input and output can be
  506. Xcopied as with rsh, but ioctls and the like will fail.  The entire
  507. Xpackage is extremely dependent on 4.[23] networking operations and
  508. Xmay have some remaining localisms; however, it has been used without
  509. Xmuch trouble on recent Ultrix and SunOS machines.  There is at least
  510. Xone assumption that may require attention:  when using a remote file
  511. Xsystem, paths of the form /r/hostname/ are assumed to reach the root
  512. Xof the remote host.  Worse, some assumptions that the same path name
  513. Xis valid from different hosts have probably crept in.  Finally,
  514. XNFS became popular sometime in the early evolution of the queuer so
  515. Xthe modes of operation that do not require a remote file system
  516. Xwere not fully developed.  These restrictions aside, we have found
  517. Xthis package quite useful.
  518. X    In operation, a program to be queued is made non-executable
  519. Xby the general public and a link is established from the queue program
  520. Xto the name of the program in another directory on the user's path.
  521. XAlternately, the original program can be renamed and the link
  522. Xestablished in the same directory as the original program.  A configuration
  523. Xfile is created in /usr/lib/queued with the same name as the queued
  524. Xprogram.  Access to the original program is controlled by briefly
  525. Xenabling world execution using the semantics of vfork() to minimize
  526. Xthe window; this has proved adequate in our environment.
  527. X    A list of potential execution hosts is specified in the
  528. Xconfiguration file and these are tried in order of least load
  529. X(as determined by examining the rwho spool files) with the local
  530. Xhost being used as a last resort (unless specifically disabled).
  531. XThis rather autonomous behavior can be can be made more deterministic
  532. Xthrough the use of the qmaster program.
  533. END_OF_FILE
  534. if test 1915 -ne `wc -c <'README'`; then
  535.     echo shar: \"'README'\" unpacked with wrong size!
  536. fi
  537. # end of 'README'
  538. fi
  539. if test -f 'SPSSX.check' -a "${1}" != "-c" ; then 
  540.   echo shar: Will not clobber existing file \"'SPSSX.check'\"
  541. else
  542. echo shar: Extracting \"'SPSSX.check'\" \(152 characters\)
  543. sed "s/^X//" >'SPSSX.check' <<'END_OF_FILE'
  544. Xprogram SPSSX.check /usr/spss/SPSSX
  545. Xhost burrhus
  546. Xoption /usr/spss/*
  547. Xoption DEFAULT copyin ARG0
  548. Xefs
  549. Xmaxcpu 180
  550. Xmode interactive
  551. Xqueue stat.check
  552. Xnolocal
  553. END_OF_FILE
  554. if test 152 -ne `wc -c <'SPSSX.check'`; then
  555.     echo shar: \"'SPSSX.check'\" unpacked with wrong size!
  556. fi
  557. # end of 'SPSSX.check'
  558. fi
  559. if test -f 'SPSSX.long' -a "${1}" != "-c" ; then 
  560.   echo shar: Will not clobber existing file \"'SPSSX.long'\"
  561. else
  562. echo shar: Extracting \"'SPSSX.long'\" \(152 characters\)
  563. sed "s/^X//" >'SPSSX.long' <<'END_OF_FILE'
  564. Xprogram SPSSX.long /usr/spss/SPSSX
  565. Xhost burrhus
  566. Xoption /usr/spss/*
  567. Xoption DEFAULT copyin ARG0
  568. Xefs
  569. Xmaxcpu 14400
  570. Xmode interactive
  571. Xqueue stat.long
  572. Xnolocal
  573. END_OF_FILE
  574. if test 152 -ne `wc -c <'SPSSX.long'`; then
  575.     echo shar: \"'SPSSX.long'\" unpacked with wrong size!
  576. fi
  577. # end of 'SPSSX.long'
  578. fi
  579. if test -f 'SPSSX.psy1995' -a "${1}" != "-c" ; then 
  580.   echo shar: Will not clobber existing file \"'SPSSX.psy1995'\"
  581. else
  582. echo shar: Extracting \"'SPSSX.psy1995'\" \(141 characters\)
  583. sed "s/^X//" >'SPSSX.psy1995' <<'END_OF_FILE'
  584. Xprogram SPSSX.psy1995 /usr/spss/SPSSX
  585. Xhost burrhus
  586. Xoption /usr/spss/*
  587. Xoption DEFAULT copyin ARG0
  588. Xefs
  589. Xmaxcpu 1800
  590. Xmode interactive
  591. Xqueue stat
  592. END_OF_FILE
  593. if test 141 -ne `wc -c <'SPSSX.psy1995'`; then
  594.     echo shar: \"'SPSSX.psy1995'\" unpacked with wrong size!
  595. fi
  596. # end of 'SPSSX.psy1995'
  597. fi
  598. if test -f 'SPSSX.reg' -a "${1}" != "-c" ; then 
  599.   echo shar: Will not clobber existing file \"'SPSSX.reg'\"
  600. else
  601. echo shar: Extracting \"'SPSSX.reg'\" \(144 characters\)
  602. sed "s/^X//" >'SPSSX.reg' <<'END_OF_FILE'
  603. Xprogram SPSSX.reg /usr/spss/SPSSX
  604. Xhost burrhus
  605. Xoption /usr/spss/*
  606. Xoption DEFAULT copyin ARG0
  607. Xefs
  608. Xmaxcpu 900
  609. Xmode interactive
  610. Xqueue stat
  611. Xnolocal
  612. END_OF_FILE
  613. if test 144 -ne `wc -c <'SPSSX.reg'`; then
  614.     echo shar: \"'SPSSX.reg'\" unpacked with wrong size!
  615. fi
  616. # end of 'SPSSX.reg'
  617. fi
  618. if test -f 'SPSSX2.check' -a "${1}" != "-c" ; then 
  619.   echo shar: Will not clobber existing file \"'SPSSX2.check'\"
  620. else
  621. echo shar: Extracting \"'SPSSX2.check'\" \(160 characters\)
  622. sed "s/^X//" >'SPSSX2.check' <<'END_OF_FILE'
  623. Xprogram SPSSX.check /usr/spss.old/SPSSX
  624. Xhost burrhus
  625. Xoption /usr/spss.old/*
  626. Xoption DEFAULT copyin ARG0
  627. Xefs
  628. Xmaxcpu 180
  629. Xmode interactive
  630. Xqueue stat.check
  631. Xnolocal
  632. END_OF_FILE
  633. if test 160 -ne `wc -c <'SPSSX2.check'`; then
  634.     echo shar: \"'SPSSX2.check'\" unpacked with wrong size!
  635. fi
  636. # end of 'SPSSX2.check'
  637. fi
  638. if test -f 'SPSSX2.long' -a "${1}" != "-c" ; then 
  639.   echo shar: Will not clobber existing file \"'SPSSX2.long'\"
  640. else
  641. echo shar: Extracting \"'SPSSX2.long'\" \(160 characters\)
  642. sed "s/^X//" >'SPSSX2.long' <<'END_OF_FILE'
  643. Xprogram SPSSX.long /usr/spss.old/SPSSX
  644. Xhost burrhus
  645. Xoption /usr/spss.old/*
  646. Xoption DEFAULT copyin ARG0
  647. Xefs
  648. Xmaxcpu 14400
  649. Xmode interactive
  650. Xqueue stat.long
  651. Xnolocal
  652. END_OF_FILE
  653. if test 160 -ne `wc -c <'SPSSX2.long'`; then
  654.     echo shar: \"'SPSSX2.long'\" unpacked with wrong size!
  655. fi
  656. # end of 'SPSSX2.long'
  657. fi
  658. if test -f 'SPSSX2.reg' -a "${1}" != "-c" ; then 
  659.   echo shar: Will not clobber existing file \"'SPSSX2.reg'\"
  660. else
  661. echo shar: Extracting \"'SPSSX2.reg'\" \(153 characters\)
  662. sed "s/^X//" >'SPSSX2.reg' <<'END_OF_FILE'
  663. Xprogram SPSSX2.reg /usr/spss.old/SPSSX
  664. Xhost burrhus
  665. Xoption /usr/spss.old/*
  666. Xoption DEFAULT copyin ARG0
  667. Xefs
  668. Xmaxcpu 900
  669. Xmode interactive
  670. Xqueue stat
  671. Xnolocal
  672. END_OF_FILE
  673. if test 153 -ne `wc -c <'SPSSX2.reg'`; then
  674.     echo shar: \"'SPSSX2.reg'\" unpacked with wrong size!
  675. fi
  676. # end of 'SPSSX2.reg'
  677. fi
  678. if test -f 'STUFF' -a "${1}" != "-c" ; then 
  679.   echo shar: Will not clobber existing file \"'STUFF'\"
  680. else
  681. echo shar: Extracting \"'STUFF'\" \(261 characters\)
  682. sed "s/^X//" >'STUFF' <<'END_OF_FILE'
  683. XFri Jun 16 12:40:12 EDT 1989
  684. XFri Jun 16 12:40:13 EDT 1989
  685. XFri Jun 16 12:40:13 EDT 1989
  686. XFri Jun 16 12:40:13 EDT 1989
  687. XFri Jun 16 12:40:14 EDT 1989
  688. XFri Jun 16 12:40:14 EDT 1989
  689. XFri Jun 16 12:40:15 EDT 1989
  690. XFri Jun 16 12:40:15 EDT 1989
  691. XFri Jun 16 12:40:15 EDT 1989
  692. END_OF_FILE
  693. if test 261 -ne `wc -c <'STUFF'`; then
  694.     echo shar: \"'STUFF'\" unpacked with wrong size!
  695. fi
  696. # end of 'STUFF'
  697. fi
  698. if test -f 'bcc' -a "${1}" != "-c" ; then 
  699.   echo shar: Will not clobber existing file \"'bcc'\"
  700. else
  701. echo shar: Extracting \"'bcc'\" \(342 characters\)
  702. sed "s/^X//" >'bcc' <<'END_OF_FILE'
  703. Xprogram bcc /usr/local/bin/bcc
  704. Xqueue compiler
  705. Xoption -c copyout *.o
  706. Xoption -g
  707. Xoption -go
  708. Xoption -v
  709. Xoption -w
  710. Xoption -p
  711. Xoption -pg
  712. Xoption -O
  713. Xoption -R
  714. Xoption -S copyout *.s
  715. Xoption -E
  716. Xoption -C
  717. Xoption -o copyout ARG1
  718. Xoption -D*
  719. Xoption -U*
  720. Xoption -I*
  721. Xoption -B*
  722. Xoption -t*
  723. Xoption DEFAULT copyin ARG0
  724. Xcopyout a.out
  725. Xmaxrun 1
  726. Xmagic
  727. Xmode background
  728. END_OF_FILE
  729. if test 342 -ne `wc -c <'bcc'`; then
  730.     echo shar: \"'bcc'\" unpacked with wrong size!
  731. fi
  732. # end of 'bcc'
  733. fi
  734. if test -f 'bcsh' -a "${1}" != "-c" ; then 
  735.   echo shar: Will not clobber existing file \"'bcsh'\"
  736. else
  737. echo shar: Extracting \"'bcsh'\" \(112 characters\)
  738. sed "s/^X//" >'bcsh' <<'END_OF_FILE'
  739. Xprogram bcsh /bin/csh
  740. Xqueue defer
  741. Xload 300 450
  742. Xmaxrun 1
  743. Xmaxcpu 1800
  744. Xmode batch
  745. Xefs
  746. Xmagic
  747. Xrestart
  748. Xoption DEFAULT
  749. END_OF_FILE
  750. if test 112 -ne `wc -c <'bcsh'`; then
  751.     echo shar: \"'bcsh'\" unpacked with wrong size!
  752. fi
  753. # end of 'bcsh'
  754. fi
  755. if test -f 'bcsh.long' -a "${1}" != "-c" ; then 
  756.   echo shar: Will not clobber existing file \"'bcsh.long'\"
  757. else
  758. echo shar: Extracting \"'bcsh.long'\" \(134 characters\)
  759. sed "s/^X//" >'bcsh.long' <<'END_OF_FILE'
  760. Xprogram bcsh.long /bin/csh
  761. Xqueue defer.long
  762. Xload 200 350
  763. Xminnice 10
  764. Xmaxrun 1
  765. Xmaxcpu 36000
  766. Xmode batch
  767. Xefs
  768. Xmagic
  769. Xrestart
  770. Xoption DEFAULT
  771. END_OF_FILE
  772. if test 134 -ne `wc -c <'bcsh.long'`; then
  773.     echo shar: \"'bcsh.long'\" unpacked with wrong size!
  774. fi
  775. # end of 'bcsh.long'
  776. fi
  777. if test -f 'bsh' -a "${1}" != "-c" ; then 
  778.   echo shar: Will not clobber existing file \"'bsh'\"
  779. else
  780. echo shar: Extracting \"'bsh'\" \(110 characters\)
  781. sed "s/^X//" >'bsh' <<'END_OF_FILE'
  782. Xprogram bsh /bin/sh
  783. Xqueue defer
  784. Xload 300 450
  785. Xmaxrun 1
  786. Xmaxcpu 1800
  787. Xmode batch
  788. Xefs
  789. Xmagic
  790. Xrestart
  791. Xoption DEFAULT
  792. END_OF_FILE
  793. if test 110 -ne `wc -c <'bsh'`; then
  794.     echo shar: \"'bsh'\" unpacked with wrong size!
  795. fi
  796. # end of 'bsh'
  797. fi
  798. if test -f 'bsh.long' -a "${1}" != "-c" ; then 
  799.   echo shar: Will not clobber existing file \"'bsh.long'\"
  800. else
  801. echo shar: Extracting \"'bsh.long'\" \(132 characters\)
  802. sed "s/^X//" >'bsh.long' <<'END_OF_FILE'
  803. Xprogram bsh.long /bin/sh
  804. Xqueue defer.long
  805. Xload 200 350
  806. Xminnice 10
  807. Xmaxrun 1
  808. Xmaxcpu 36000
  809. Xmode batch
  810. Xefs
  811. Xmagic
  812. Xrestart
  813. Xoption DEFAULT
  814. END_OF_FILE
  815. if test 132 -ne `wc -c <'bsh.long'`; then
  816.     echo shar: \"'bsh.long'\" unpacked with wrong size!
  817. fi
  818. # end of 'bsh.long'
  819. fi
  820. if test -f 'cat' -a "${1}" != "-c" ; then 
  821.   echo shar: Will not clobber existing file \"'cat'\"
  822. else
  823. echo shar: Extracting \"'cat'\" \(92 characters\)
  824. sed "s/^X//" >'cat' <<'END_OF_FILE'
  825. Xprogram cat /bin/cat
  826. Xqueue test
  827. Xoption DEFAULT copyin ARG0
  828. Xmode interactive
  829. Xqmaster harvisr
  830. END_OF_FILE
  831. if test 92 -ne `wc -c <'cat'`; then
  832.     echo shar: \"'cat'\" unpacked with wrong size!
  833. fi
  834. # end of 'cat'
  835. fi
  836. if test -f 'cc' -a "${1}" != "-c" ; then 
  837.   echo shar: Will not clobber existing file \"'cc'\"
  838. else
  839. echo shar: Extracting \"'cc'\" \(325 characters\)
  840. sed "s/^X//" >'cc' <<'END_OF_FILE'
  841. Xprogram cc /bin/cc
  842. Xqueue compiler
  843. Xoption -c copyout *.o
  844. Xoption -g
  845. Xoption -go
  846. Xoption -v
  847. Xoption -w
  848. Xoption -p
  849. Xoption -pg
  850. Xoption -O
  851. Xoption -R
  852. Xoption -S copyout *.s
  853. Xoption -E
  854. Xoption -C
  855. Xoption -o copyout ARG1
  856. Xoption -D*
  857. Xoption -U*
  858. Xoption -I*
  859. Xoption -B*
  860. Xoption -t*
  861. Xoption DEFAULT copyin ARG0
  862. Xcopyout a.out
  863. Xmaxrun 1
  864. Xmode interactive
  865. END_OF_FILE
  866. if test 325 -ne `wc -c <'cc'`; then
  867.     echo shar: \"'cc'\" unpacked with wrong size!
  868. fi
  869. # end of 'cc'
  870. fi
  871. if test -f 'compiler' -a "${1}" != "-c" ; then 
  872.   echo shar: Will not clobber existing file \"'compiler'\"
  873. else
  874. echo shar: Extracting \"'compiler'\" \(331 characters\)
  875. sed "s/^X//" >'compiler' <<'END_OF_FILE'
  876. Xprogram compiler /bin/cc
  877. Xqueue compiler
  878. Xoption -c copyout *.o
  879. Xoption -g
  880. Xoption -go
  881. Xoption -v
  882. Xoption -w
  883. Xoption -p
  884. Xoption -pg
  885. Xoption -O
  886. Xoption -R
  887. Xoption -S copyout *.s
  888. Xoption -E
  889. Xoption -C
  890. Xoption -o copyout ARG1
  891. Xoption -D*
  892. Xoption -U*
  893. Xoption -I*
  894. Xoption -B*
  895. Xoption -t*
  896. Xoption DEFAULT copyin ARG0
  897. Xcopyout a.out
  898. Xmaxrun 1
  899. Xmode interactive
  900. END_OF_FILE
  901. if test 331 -ne `wc -c <'compiler'`; then
  902.     echo shar: \"'compiler'\" unpacked with wrong size!
  903. fi
  904. # end of 'compiler'
  905. fi
  906. if test -f 'cspawn.c' -a "${1}" != "-c" ; then 
  907.   echo shar: Will not clobber existing file \"'cspawn.c'\"
  908. else
  909. echo shar: Extracting \"'cspawn.c'\" \(1448 characters\)
  910. sed "s/^X//" >'cspawn.c' <<'END_OF_FILE'
  911. X/* Copyright 1990  The President and Fellows of Harvard University
  912. X
  913. XPermission to use, copy, modify, and distribute this program for any
  914. Xpurpose and without fee is hereby granted, provided that this
  915. Xcopyright and permission notice appear on all copies and supporting
  916. Xdocumentation, the name of Harvard University not be used in advertising
  917. Xor publicity pertaining to distribution of the program, or to results
  918. Xderived from its use, without specific prior written permission, and notice
  919. Xbe given in supporting documentation that copying and distribution is by
  920. Xpermission of Harvard University.  Harvard University makes no
  921. Xrepresentations about the suitability of this software for any purpose.
  922. XIt is provided "as is" without express or implied warranty.    */
  923. X
  924. X/* cspawn.c - Dan Lanciani '85 */
  925. X
  926. X#include <sys/types.h>
  927. X#include <sys/stat.h>
  928. X#include <sys/time.h>
  929. X#include <sys/resource.h>
  930. X#include <stdio.h>
  931. X
  932. X#include "queue.h"
  933. X
  934. Xcspawn(prog, v)
  935. Xregister char *prog, **v;
  936. X{
  937. X    register int pid;
  938. X    struct stat statb;
  939. X    struct rlimit rlimit;
  940. X
  941. X    if(stat(prog, &statb))
  942. X        return(-1);
  943. X    if(chmod(prog, statb.st_mode | 0111))
  944. X        return(-1);
  945. X    if((pid = vfork()) < 0)
  946. X        return(-1);
  947. X    if(!pid) {
  948. X        if(maxcpu) {
  949. X            rlimit.rlim_cur = rlimit.rlim_max = maxcpu;
  950. X            setrlimit(RLIMIT_CPU, &rlimit);
  951. X        }
  952. X        if(minnice)
  953. X            nice(minnice);
  954. X        setuid(getuid());
  955. X        if(!getpgrp(0))
  956. X            setpgrp(0, getpid());
  957. X        execv(prog, v);
  958. X        exit(1);
  959. X    }
  960. X    chmod(prog, statb.st_mode);
  961. X    return(pid);
  962. X}
  963. END_OF_FILE
  964. if test 1448 -ne `wc -c <'cspawn.c'`; then
  965.     echo shar: \"'cspawn.c'\" unpacked with wrong size!
  966. fi
  967. # end of 'cspawn.c'
  968. fi
  969. if test -f 'defer' -a "${1}" != "-c" ; then 
  970.   echo shar: Will not clobber existing file \"'defer'\"
  971. else
  972. echo shar: Extracting \"'defer'\" \(112 characters\)
  973. sed "s/^X//" >'defer' <<'END_OF_FILE'
  974. Xprogram defer /bin/sh
  975. Xqueue defer
  976. Xload 300 450
  977. Xmaxrun 1
  978. Xmaxcpu 1800
  979. Xmode batch
  980. Xefs
  981. Xmagic
  982. Xrestart
  983. Xoption DEFAULT
  984. END_OF_FILE
  985. if test 112 -ne `wc -c <'defer'`; then
  986.     echo shar: \"'defer'\" unpacked with wrong size!
  987. fi
  988. # end of 'defer'
  989. fi
  990. if test -f 'defer.long' -a "${1}" != "-c" ; then 
  991.   echo shar: Will not clobber existing file \"'defer.long'\"
  992. else
  993. echo shar: Extracting \"'defer.long'\" \(134 characters\)
  994. sed "s/^X//" >'defer.long' <<'END_OF_FILE'
  995. Xprogram defer.long /bin/sh
  996. Xqueue defer.long
  997. Xload 200 350
  998. Xminnice 10
  999. Xmaxrun 1
  1000. Xmaxcpu 36000
  1001. Xmode batch
  1002. Xefs
  1003. Xmagic
  1004. Xrestart
  1005. Xoption DEFAULT
  1006. END_OF_FILE
  1007. if test 134 -ne `wc -c <'defer.long'`; then
  1008.     echo shar: \"'defer.long'\" unpacked with wrong size!
  1009. fi
  1010. # end of 'defer.long'
  1011. fi
  1012. if test -f 'f77' -a "${1}" != "-c" ; then 
  1013.   echo shar: Will not clobber existing file \"'f77'\"
  1014. else
  1015. echo shar: Extracting \"'f77'\" \(372 characters\)
  1016. sed "s/^X//" >'f77' <<'END_OF_FILE'
  1017. Xprogram f77 /usr/bin/f77
  1018. Xqueue compiler
  1019. Xoption -c copyout *.o
  1020. Xoption -g
  1021. Xoption -o copyout ARG1
  1022. Xoption -p
  1023. Xoption -pg
  1024. Xoption -w
  1025. Xoption -D*
  1026. Xoption -I*
  1027. Xoption -O
  1028. Xoption -S copyout *.s
  1029. Xoption -i2
  1030. Xoption -m
  1031. Xoption -onetrip
  1032. Xoption -u
  1033. Xoption -v
  1034. Xoption -C
  1035. Xoption -F
  1036. Xoption -E*
  1037. Xoption -R*
  1038. Xoption -N*
  1039. Xoption -U
  1040. Xoption DEFAULT copyin ARG0
  1041. Xcopyout a.out
  1042. Xmaxrun 1
  1043. Xmagic
  1044. Xmode background
  1045. END_OF_FILE
  1046. if test 372 -ne `wc -c <'f77'`; then
  1047.     echo shar: \"'f77'\" unpacked with wrong size!
  1048. fi
  1049. # end of 'f77'
  1050. fi
  1051. if test -f 'fort' -a "${1}" != "-c" ; then 
  1052.   echo shar: Will not clobber existing file \"'fort'\"
  1053. else
  1054. echo shar: Extracting \"'fort'\" \(385 characters\)
  1055. sed "s/^X//" >'fort' <<'END_OF_FILE'
  1056. Xprogram fort /usr/bin/fort
  1057. Xqueue compiler
  1058. Xhost harvisr
  1059. Xoption -c copyout *.o
  1060. Xoption -g
  1061. Xoption -o copyout ARG1
  1062. Xoption -p
  1063. Xoption -pg
  1064. Xoption -w
  1065. Xoption -D*
  1066. Xoption -I*
  1067. Xoption -O
  1068. Xoption -S copyout *.s
  1069. Xoption -i2
  1070. Xoption -m
  1071. Xoption -onetrip
  1072. Xoption -u
  1073. Xoption -v
  1074. Xoption -C
  1075. Xoption -F
  1076. Xoption -E*
  1077. Xoption -R*
  1078. Xoption -N*
  1079. Xoption -U
  1080. Xoption DEFAULT copyin ARG0
  1081. Xcopyout a.out
  1082. Xmaxrun 1
  1083. Xefs
  1084. Xmode background
  1085. END_OF_FILE
  1086. if test 385 -ne `wc -c <'fort'`; then
  1087.     echo shar: \"'fort'\" unpacked with wrong size!
  1088. fi
  1089. # end of 'fort'
  1090. fi
  1091. if test -f 'getload.c' -a "${1}" != "-c" ; then 
  1092.   echo shar: Will not clobber existing file \"'getload.c'\"
  1093. else
  1094. echo shar: Extracting \"'getload.c'\" \(1238 characters\)
  1095. sed "s/^X//" >'getload.c' <<'END_OF_FILE'
  1096. X/* Copyright 1990  The President and Fellows of Harvard University
  1097. X
  1098. XPermission to use, copy, modify, and distribute this program for any
  1099. Xpurpose and without fee is hereby granted, provided that this
  1100. Xcopyright and permission notice appear on all copies and supporting
  1101. Xdocumentation, the name of Harvard University not be used in advertising
  1102. Xor publicity pertaining to distribution of the program, or to results
  1103. Xderived from its use, without specific prior written permission, and notice
  1104. Xbe given in supporting documentation that copying and distribution is by
  1105. Xpermission of Harvard University.  Harvard University makes no
  1106. Xrepresentations about the suitability of this software for any purpose.
  1107. XIt is provided "as is" without express or implied warranty.    */
  1108. X
  1109. X
  1110. X/* getload.c - Dan Lanciani '85 */
  1111. X
  1112. X#include <nlist.h>
  1113. X
  1114. Xstruct    nlist nl[] = {
  1115. X    { "_avenrun" },
  1116. X#define    X_AVENRUN    0
  1117. X    { "" },
  1118. X};
  1119. X
  1120. Xint    kmem = -1;
  1121. Xdouble    avenrun[3];
  1122. X
  1123. Xgetload()
  1124. X{
  1125. X    if(kmem < 0 && (kmem = open("/dev/kmem", 0)) < 0)
  1126. X        return(0);
  1127. X    if(!nl[0].n_type) {
  1128. X        nlist("/vmunix", nl);
  1129. X        if(!nl[0].n_type)
  1130. X            return(0);
  1131. X    }
  1132. X    lseek(kmem, (long)nl[X_AVENRUN].n_value, 0);
  1133. X    if(read(kmem, avenrun, sizeof(avenrun)) != sizeof(avenrun))
  1134. X        return(0);
  1135. X    return((int)(100.0 * avenrun[0]));
  1136. X}
  1137. END_OF_FILE
  1138. if test 1238 -ne `wc -c <'getload.c'`; then
  1139.     echo shar: \"'getload.c'\" unpacked with wrong size!
  1140. fi
  1141. # end of 'getload.c'
  1142. fi
  1143. if test -f 'getrload.c' -a "${1}" != "-c" ; then 
  1144.   echo shar: Will not clobber existing file \"'getrload.c'\"
  1145. else
  1146. echo shar: Extracting \"'getrload.c'\" \(1246 characters\)
  1147. sed "s/^X//" >'getrload.c' <<'END_OF_FILE'
  1148. X/* Copyright 1990  The President and Fellows of Harvard University
  1149. X
  1150. XPermission to use, copy, modify, and distribute this program for any
  1151. Xpurpose and without fee is hereby granted, provided that this
  1152. Xcopyright and permission notice appear on all copies and supporting
  1153. Xdocumentation, the name of Harvard University not be used in advertising
  1154. Xor publicity pertaining to distribution of the program, or to results
  1155. Xderived from its use, without specific prior written permission, and notice
  1156. Xbe given in supporting documentation that copying and distribution is by
  1157. Xpermission of Harvard University.  Harvard University makes no
  1158. Xrepresentations about the suitability of this software for any purpose.
  1159. XIt is provided "as is" without express or implied warranty.    */
  1160. X
  1161. X
  1162. X/* getrload.c - Dan Lanciani '89 */
  1163. X
  1164. X#include <sys/types.h>
  1165. X#include <sys/stat.h>
  1166. X#include <protocols/rwhod.h>
  1167. X
  1168. Xgetrload(h)
  1169. Xchar *h;
  1170. X{
  1171. X    register int f;
  1172. X    char buf[200];
  1173. X    struct whod awhod;
  1174. X    struct stat statb;
  1175. X    time_t t, time();
  1176. X
  1177. X    sprintf(buf, "/usr/spool/rwho/whod.%s", h);
  1178. X    if((f = open(buf, 0)) < 0)
  1179. X        return(10000);
  1180. X    fstat(f, &statb);
  1181. X    time(&t);
  1182. X    if(t - statb.st_mtime > 5*60) {
  1183. X        close(f);
  1184. X        return(1000);
  1185. X    }
  1186. X    read(f, &awhod, sizeof(awhod));
  1187. X    close(f);
  1188. X    return(awhod.wd_loadav[0]);
  1189. X}
  1190. END_OF_FILE
  1191. if test 1246 -ne `wc -c <'getrload.c'`; then
  1192.     echo shar: \"'getrload.c'\" unpacked with wrong size!
  1193. fi
  1194. # end of 'getrload.c'
  1195. fi
  1196. if test -f 'getstr.c' -a "${1}" != "-c" ; then 
  1197.   echo shar: Will not clobber existing file \"'getstr.c'\"
  1198. else
  1199. echo shar: Extracting \"'getstr.c'\" \(1112 characters\)
  1200. sed "s/^X//" >'getstr.c' <<'END_OF_FILE'
  1201. X/* Copyright 1990  The President and Fellows of Harvard University
  1202. X
  1203. XPermission to use, copy, modify, and distribute this program for any
  1204. Xpurpose and without fee is hereby granted, provided that this
  1205. Xcopyright and permission notice appear on all copies and supporting
  1206. Xdocumentation, the name of Harvard University not be used in advertising
  1207. Xor publicity pertaining to distribution of the program, or to results
  1208. Xderived from its use, without specific prior written permission, and notice
  1209. Xbe given in supporting documentation that copying and distribution is by
  1210. Xpermission of Harvard University.  Harvard University makes no
  1211. Xrepresentations about the suitability of this software for any purpose.
  1212. XIt is provided "as is" without express or implied warranty.    */
  1213. X
  1214. X
  1215. X/* getstr.c - Dan Lanciani '85 */
  1216. X
  1217. X#include <stdio.h>
  1218. X
  1219. Xchar *
  1220. Xgetstr(n, buf)
  1221. Xchar *buf;
  1222. X{
  1223. X    register char *p = buf;
  1224. X
  1225. X    do
  1226. X        if(read(n, p, 1) != 1)
  1227. X            exit(1);
  1228. X    while(*p++);
  1229. X    return(buf);
  1230. X}
  1231. X
  1232. Xchar *
  1233. Xfgetstr(n, buf)
  1234. XFILE *n;
  1235. Xchar *buf;
  1236. X{
  1237. X    register int c;
  1238. X    register char *p = buf;
  1239. X
  1240. X    do
  1241. X        if((c = getc(n)) == EOF)
  1242. X            exit(1);
  1243. X    while(*p++ = c);
  1244. X    return(buf);
  1245. X}
  1246. END_OF_FILE
  1247. if test 1112 -ne `wc -c <'getstr.c'`; then
  1248.     echo shar: \"'getstr.c'\" unpacked with wrong size!
  1249. fi
  1250. # end of 'getstr.c'
  1251. fi
  1252. if test -f 'gistat' -a "${1}" != "-c" ; then 
  1253.   echo shar: Will not clobber existing file \"'gistat'\"
  1254. else
  1255. echo shar: Extracting \"'gistat'\" \(243 characters\)
  1256. sed "s/^X//" >'gistat' <<'END_OF_FILE'
  1257. Xprogram gistat /usr/lib/queued/statjob
  1258. Xhost generali
  1259. Xoption -F ignore ARG1
  1260. Xoption -T ignore ARG1
  1261. Xoption -b ignore ARG1
  1262. Xoption -o ignore ARG1
  1263. Xoption -n
  1264. Xoption -B
  1265. Xoption -s
  1266. Xoption DEFAULT copyin ARG0
  1267. Xefs
  1268. Xmaxcpu 900
  1269. Xmode interactive
  1270. Xqueue gistat
  1271. END_OF_FILE
  1272. if test 243 -ne `wc -c <'gistat'`; then
  1273.     echo shar: \"'gistat'\" unpacked with wrong size!
  1274. fi
  1275. # end of 'gistat'
  1276. fi
  1277. if test -f 'gistat.check' -a "${1}" != "-c" ; then 
  1278.   echo shar: Will not clobber existing file \"'gistat.check'\"
  1279. else
  1280. echo shar: Extracting \"'gistat.check'\" \(256 characters\)
  1281. sed "s/^X//" >'gistat.check' <<'END_OF_FILE'
  1282. X
  1283. Xprogram gistat.check /usr/lib/queued/statjob
  1284. Xhost generali
  1285. Xoption -F ignore ARG1
  1286. Xoption -T ignore ARG1
  1287. Xoption -b ignore ARG1
  1288. Xoption -o ignore ARG1
  1289. Xoption -n
  1290. Xoption -B
  1291. Xoption -s
  1292. Xoption DEFAULT copyin ARG0
  1293. Xefs
  1294. Xmaxcpu 180
  1295. Xmode interactive
  1296. Xqueue gistat.check
  1297. END_OF_FILE
  1298. if test 256 -ne `wc -c <'gistat.check'`; then
  1299.     echo shar: \"'gistat.check'\" unpacked with wrong size!
  1300. fi
  1301. # end of 'gistat.check'
  1302. fi
  1303. if test -f 'gistat.long' -a "${1}" != "-c" ; then 
  1304.   echo shar: Will not clobber existing file \"'gistat.long'\"
  1305. else
  1306. echo shar: Extracting \"'gistat.long'\" \(255 characters\)
  1307. sed "s/^X//" >'gistat.long' <<'END_OF_FILE'
  1308. Xprogram gistat.long /usr/lib/queued/statjob
  1309. Xhost generali
  1310. Xoption -F ignore ARG1
  1311. Xoption -T ignore ARG1
  1312. Xoption -b ignore ARG1
  1313. Xoption -o ignore ARG1
  1314. Xoption -n
  1315. Xoption -B
  1316. Xoption -s
  1317. Xoption DEFAULT copyin ARG0
  1318. Xefs
  1319. Xmaxcpu 14400
  1320. Xmode interactive
  1321. Xqueue gistat.long
  1322. END_OF_FILE
  1323. if test 255 -ne `wc -c <'gistat.long'`; then
  1324.     echo shar: \"'gistat.long'\" unpacked with wrong size!
  1325. fi
  1326. # end of 'gistat.long'
  1327. fi
  1328. if test -f 'infile.c' -a "${1}" != "-c" ; then 
  1329.   echo shar: Will not clobber existing file \"'infile.c'\"
  1330. else
  1331. echo shar: Extracting \"'infile.c'\" \(1098 characters\)
  1332. sed "s/^X//" >'infile.c' <<'END_OF_FILE'
  1333. X/* Copyright 1990  The President and Fellows of Harvard University
  1334. X
  1335. XPermission to use, copy, modify, and distribute this program for any
  1336. Xpurpose and without fee is hereby granted, provided that this
  1337. Xcopyright and permission notice appear on all copies and supporting
  1338. Xdocumentation, the name of Harvard University not be used in advertising
  1339. Xor publicity pertaining to distribution of the program, or to results
  1340. Xderived from its use, without specific prior written permission, and notice
  1341. Xbe given in supporting documentation that copying and distribution is by
  1342. Xpermission of Harvard University.  Harvard University makes no
  1343. Xrepresentations about the suitability of this software for any purpose.
  1344. XIt is provided "as is" without express or implied warranty.    */
  1345. X
  1346. X
  1347. X/* infile.c - Dan Lanciani '85 */
  1348. X
  1349. X#include <stdio.h>
  1350. X
  1351. Xinfile(file, name)
  1352. Xregister char *file, *name;
  1353. X{
  1354. X    char buf[BUFSIZ];
  1355. X    register FILE *n;
  1356. X
  1357. X    if(!(n = fopen(file, "r")))
  1358. X        return(0);
  1359. X    while(fgets(buf, sizeof(buf), n)) {
  1360. X        buf[strlen(buf)-1] = '\0';
  1361. X        if(!strcmp(buf, name)) {
  1362. X            fclose(n);
  1363. X            return(1);
  1364. X        }
  1365. X    }
  1366. X    fclose(n);
  1367. X    return(0);
  1368. X}
  1369. END_OF_FILE
  1370. if test 1098 -ne `wc -c <'infile.c'`; then
  1371.     echo shar: \"'infile.c'\" unpacked with wrong size!
  1372. fi
  1373. # end of 'infile.c'
  1374. fi
  1375. if test -f 'ipm' -a "${1}" != "-c" ; then 
  1376.   echo shar: Will not clobber existing file \"'ipm'\"
  1377. else
  1378. echo shar: Extracting \"'ipm'\" \(277 characters\)
  1379. sed "s/^X//" >'ipm' <<'END_OF_FILE'
  1380. Xprogram ipm /usr/bmdp/exes/ipm
  1381. Xhost burrhus
  1382. Xoption -D ignore ARG1
  1383. Xoption -F ignore ARG1
  1384. Xoption -T ignore ARG1
  1385. Xoption -b ignore ARG1
  1386. Xoption -o ignore ARG1
  1387. Xoption -n
  1388. Xoption -B
  1389. Xoption /usr/bmdp/exes/*
  1390. Xoption DEFAULT copyin ARG0
  1391. Xefs
  1392. Xmaxrun 1
  1393. Xmaxcpu 900
  1394. Xmode interactive
  1395. Xqueue stat
  1396. END_OF_FILE
  1397. if test 277 -ne `wc -c <'ipm'`; then
  1398.     echo shar: \"'ipm'\" unpacked with wrong size!
  1399. fi
  1400. # end of 'ipm'
  1401. fi
  1402. if test -f 'lock.c' -a "${1}" != "-c" ; then 
  1403.   echo shar: Will not clobber existing file \"'lock.c'\"
  1404. else
  1405. echo shar: Extracting \"'lock.c'\" \(1299 characters\)
  1406. sed "s/^X//" >'lock.c' <<'END_OF_FILE'
  1407. X/* Copyright 1990  The President and Fellows of Harvard University
  1408. X
  1409. XPermission to use, copy, modify, and distribute this program for any
  1410. Xpurpose and without fee is hereby granted, provided that this
  1411. Xcopyright and permission notice appear on all copies and supporting
  1412. Xdocumentation, the name of Harvard University not be used in advertising
  1413. Xor publicity pertaining to distribution of the program, or to results
  1414. Xderived from its use, without specific prior written permission, and notice
  1415. Xbe given in supporting documentation that copying and distribution is by
  1416. Xpermission of Harvard University.  Harvard University makes no
  1417. Xrepresentations about the suitability of this software for any purpose.
  1418. XIt is provided "as is" without express or implied warranty.    */
  1419. X
  1420. X
  1421. X/* lock.c - Dan Lanciani '85 */
  1422. X
  1423. X#include <stdio.h>
  1424. X
  1425. X#include "queue.h"
  1426. X#include <signal.h>
  1427. X
  1428. Xstatic int ccnt = 0;
  1429. X
  1430. Xlock(p)
  1431. Xregister char *p;
  1432. X{
  1433. X    char lock[BUFSIZ];
  1434. X    register int i;
  1435. X
  1436. X    close(creat(LOCKNODE, 0644));
  1437. X    strcpy(lock, p);
  1438. X    strcat(lock, ".lock");
  1439. X    for(i = 0; i < 60; i++) {
  1440. X        if(!link(LOCKNODE, lock)) {
  1441. X            if(!ccnt++)
  1442. X                signal(SIGTERM, SIG_IGN);
  1443. X            return;
  1444. X        }
  1445. X        sleep(1);
  1446. X    }
  1447. X}
  1448. X
  1449. Xunlock(p)
  1450. Xregister char *p;
  1451. X{
  1452. X    char lock[BUFSIZ];
  1453. X
  1454. X    strcpy(lock, p);
  1455. X    strcat(lock, ".lock");
  1456. X    unlink(lock);
  1457. X    if(!--ccnt)
  1458. X        signal(SIGTERM, SIG_DFL);
  1459. X}
  1460. END_OF_FILE
  1461. if test 1299 -ne `wc -c <'lock.c'`; then
  1462.     echo shar: \"'lock.c'\" unpacked with wrong size!
  1463. fi
  1464. # end of 'lock.c'
  1465. fi
  1466. if test -f 'newstring.c' -a "${1}" != "-c" ; then 
  1467.   echo shar: Will not clobber existing file \"'newstring.c'\"
  1468. else
  1469. echo shar: Extracting \"'newstring.c'\" \(1071 characters\)
  1470. sed "s/^X//" >'newstring.c' <<'END_OF_FILE'
  1471. X/* Copyright 1990  The President and Fellows of Harvard University
  1472. X
  1473. XPermission to use, copy, modify, and distribute this program for any
  1474. Xpurpose and without fee is hereby granted, provided that this
  1475. Xcopyright and permission notice appear on all copies and supporting
  1476. Xdocumentation, the name of Harvard University not be used in advertising
  1477. Xor publicity pertaining to distribution of the program, or to results
  1478. Xderived from its use, without specific prior written permission, and notice
  1479. Xbe given in supporting documentation that copying and distribution is by
  1480. Xpermission of Harvard University.  Harvard University makes no
  1481. Xrepresentations about the suitability of this software for any purpose.
  1482. XIt is provided "as is" without express or implied warranty.    */
  1483. X
  1484. X
  1485. X/* newstring.c - Dan Lanciani '85 */
  1486. X
  1487. Xchar *malloc();
  1488. X
  1489. Xchar *
  1490. Xxmalloc(size)
  1491. X{
  1492. X    register char *p;
  1493. X
  1494. X    if(p = malloc(size))
  1495. X        return(p);
  1496. X    write(2, "Out of memory\n", 14);
  1497. X    exit(1);
  1498. X    /*NOTREACHED*/
  1499. X}
  1500. X
  1501. Xchar *
  1502. Xnewstring(s)
  1503. Xregister char *s;
  1504. X{
  1505. X    register char *p;
  1506. X
  1507. X    p = xmalloc(strlen(s)+1);
  1508. X    strcpy(p, s);
  1509. X    return(p);
  1510. X}
  1511. END_OF_FILE
  1512. if test 1071 -ne `wc -c <'newstring.c'`; then
  1513.     echo shar: \"'newstring.c'\" unpacked with wrong size!
  1514. fi
  1515. # end of 'newstring.c'
  1516. fi
  1517. if test -f 'nroff' -a "${1}" != "-c" ; then 
  1518.   echo shar: Will not clobber existing file \"'nroff'\"
  1519. else
  1520. echo shar: Extracting \"'nroff'\" \(318 characters\)
  1521. sed "s/^X//" >'nroff' <<'END_OF_FILE'
  1522. Xprogram nroff /usr/bin/nroff
  1523. Xqueue wordproc
  1524. Xqmaster harvisr
  1525. Xhost /etc/cluster
  1526. Xoption -
  1527. Xoption -o*
  1528. Xoption -n*
  1529. Xoption -s*
  1530. Xoption -m*
  1531. Xoption -r*
  1532. Xoption -i
  1533. Xoption -q
  1534. Xoption -T*
  1535. Xoption -e
  1536. Xoption -h
  1537. Xoption -t
  1538. Xoption -f
  1539. Xoption -w
  1540. Xoption -b
  1541. Xoption -a
  1542. Xoption -p*
  1543. Xoption -F*
  1544. Xoption DEFAULT copyin ARG0
  1545. Xmaxrun 2
  1546. Xmode interactive
  1547. END_OF_FILE
  1548. if test 318 -ne `wc -c <'nroff'`; then
  1549.     echo shar: \"'nroff'\" unpacked with wrong size!
  1550. fi
  1551. # end of 'nroff'
  1552. fi
  1553. if test -f 'optcmp.c' -a "${1}" != "-c" ; then 
  1554.   echo shar: Will not clobber existing file \"'optcmp.c'\"
  1555. else
  1556. echo shar: Extracting \"'optcmp.c'\" \(982 characters\)
  1557. sed "s/^X//" >'optcmp.c' <<'END_OF_FILE'
  1558. X/* Copyright 1990  The President and Fellows of Harvard University
  1559. X
  1560. XPermission to use, copy, modify, and distribute this program for any
  1561. Xpurpose and without fee is hereby granted, provided that this
  1562. Xcopyright and permission notice appear on all copies and supporting
  1563. Xdocumentation, the name of Harvard University not be used in advertising
  1564. Xor publicity pertaining to distribution of the program, or to results
  1565. Xderived from its use, without specific prior written permission, and notice
  1566. Xbe given in supporting documentation that copying and distribution is by
  1567. Xpermission of Harvard University.  Harvard University makes no
  1568. Xrepresentations about the suitability of this software for any purpose.
  1569. XIt is provided "as is" without express or implied warranty.    */
  1570. X
  1571. X
  1572. X/* optcmp.c - Dan Lanciani '85 */
  1573. X
  1574. X#include <stdio.h>
  1575. X
  1576. Xoptcmp(pat, str)
  1577. Xregister char *pat, *str;
  1578. X{
  1579. X    register int i;
  1580. X
  1581. X    if(pat[i = strlen(pat)-1] == '*')
  1582. X        return(!strncmp(pat, str, i));
  1583. X    else
  1584. X        return(!strcmp(pat, str));
  1585. X}
  1586. END_OF_FILE
  1587. if test 982 -ne `wc -c <'optcmp.c'`; then
  1588.     echo shar: \"'optcmp.c'\" unpacked with wrong size!
  1589. fi
  1590. # end of 'optcmp.c'
  1591. fi
  1592. if test -f 'otroff' -a "${1}" != "-c" ; then 
  1593.   echo shar: Will not clobber existing file \"'otroff'\"
  1594. else
  1595. echo shar: Extracting \"'otroff'\" \(302 characters\)
  1596. sed "s/^X//" >'otroff' <<'END_OF_FILE'
  1597. Xprogram otroff /usr/bin/otroff
  1598. Xqueue wordproc
  1599. Xqmaster harvisr
  1600. Xoption -
  1601. Xoption -o*
  1602. Xoption -n*
  1603. Xoption -s*
  1604. Xoption -m*
  1605. Xoption -r*
  1606. Xoption -i
  1607. Xoption -q
  1608. Xoption -T*
  1609. Xoption -e
  1610. Xoption -h
  1611. Xoption -t
  1612. Xoption -f
  1613. Xoption -w
  1614. Xoption -b
  1615. Xoption -a
  1616. Xoption -p*
  1617. Xoption -F*
  1618. Xoption DEFAULT copyin ARG0
  1619. Xmaxrun 2
  1620. Xmode interactive
  1621. END_OF_FILE
  1622. if test 302 -ne `wc -c <'otroff'`; then
  1623.     echo shar: \"'otroff'\" unpacked with wrong size!
  1624. fi
  1625. # end of 'otroff'
  1626. fi
  1627. if test -f 'qrm.1' -a "${1}" != "-c" ; then 
  1628.   echo shar: Will not clobber existing file \"'qrm.1'\"
  1629. else
  1630. echo shar: Extracting \"'qrm.1'\" \(1230 characters\)
  1631. sed "s/^X//" >'qrm.1' <<'END_OF_FILE'
  1632. X.TH QRM 1 "11 September 1985"
  1633. X.UC 4
  1634. X.SH NAME
  1635. Xqrm  \- remove local and remote queue entries
  1636. X.SH SYNOPSIS
  1637. X.B qrm
  1638. Xprogram pid|user|all
  1639. X.PP
  1640. X.SH DESCRIPTION
  1641. X.I Qrm
  1642. Xremoves an entry from a system execution queue, killing the running
  1643. Xprocess if necessary.  The pid of a job may be obtained from the qs(1)
  1644. Xcommand.  If a user is specified, all jobs owned by that user will
  1645. Xbe removed from the queue.  If the reserved user ``all'' is specified,
  1646. Xall jobs will be removed from the queue.
  1647. XOnly the owner of the job or the super-user may remove a job.
  1648. X.SH "FILES (/usr/lib/queued/)"
  1649. XQUEUES        list of active, local queues
  1650. X.br
  1651. X``program''    configuration file for ``program''
  1652. X.SH "FILES (/usr/spool/queued/)"
  1653. XLOCK            master lock node
  1654. X.br
  1655. X``queue''        current information for ``queue''
  1656. X.br
  1657. X``queue''.lock    lock on ``queue''
  1658. X.br
  1659. X``queue''.tmp    used for rewriting ``queue''
  1660. X.br
  1661. X``pid''        current information for ``pid''
  1662. X.br
  1663. X``pid''.dir    temporary execution directory
  1664. X.br
  1665. X``pid''.batch    output of batch execution process
  1666. X.SH "FILES (Other)"
  1667. X/usr/adm/qacct    queue accounting file
  1668. X.br
  1669. X/etc/hosts.efs    hosts with extended file system
  1670. X.br
  1671. X/etc/hosts.flat    hosts with one-to-one uid mapping
  1672. X.SH "SEE ALSO"
  1673. Xqs(1), queue(1), queued(5), queued(8)
  1674. X.SH AUTHOR
  1675. XDan Lanciani
  1676. END_OF_FILE
  1677. if test 1230 -ne `wc -c <'qrm.1'`; then
  1678.     echo shar: \"'qrm.1'\" unpacked with wrong size!
  1679. fi
  1680. # end of 'qrm.1'
  1681. fi
  1682. if test -f 'qs.1' -a "${1}" != "-c" ; then 
  1683.   echo shar: Will not clobber existing file \"'qs.1'\"
  1684. else
  1685. echo shar: Extracting \"'qs.1'\" \(1385 characters\)
  1686. sed "s/^X//" >'qs.1' <<'END_OF_FILE'
  1687. X.TH QS 1 "11 September 1985"
  1688. X.UC 4
  1689. X.SH NAME
  1690. Xqs  \- display the status of system execution queues
  1691. X.SH SYNOPSIS
  1692. X.B qs
  1693. X[
  1694. X.B program
  1695. X]
  1696. X.PP
  1697. X.SH DESCRIPTION
  1698. X.I Qs
  1699. Xdisplays useful information about running and waiting processes in the
  1700. Xsystem execution queues.  With no arguments, 
  1701. X.I qs
  1702. Xreports on all queues active on the local host.  If the single argument
  1703. X.B program
  1704. Xis supplied, 
  1705. X.I qs
  1706. Xlocates and displays the queue associated with
  1707. X.B program
  1708. Xon any host.
  1709. X.PP
  1710. XFor each job in a queue, 
  1711. X.I qs
  1712. Xprints the control pid (as used by qrm(1)), the current state of the
  1713. Xprocess, the user who owns the entry, and the command itself.  The
  1714. Xdisplay is headed by the queue with which the jobs are associated.
  1715. X.SH "FILES (/usr/lib/queued/)"
  1716. XQUEUES        list of active, local queues
  1717. X.br
  1718. X``program''    configuration file for ``program''
  1719. X.SH "FILES (/usr/spool/queued/)"
  1720. XLOCK            master lock node
  1721. X.br
  1722. X``queue''        current information for ``queue''
  1723. X.br
  1724. X``queue''.lock    lock on ``queue''
  1725. X.br
  1726. X``queue''.tmp    used for rewriting ``queue''
  1727. X.br
  1728. X``pid''        current information for ``pid''
  1729. X.br
  1730. X``pid''.dir    temporary execution directory
  1731. X.br
  1732. X``pid''.batch    output of batch execution process
  1733. X.SH "FILES (Other)"
  1734. X/usr/adm/qacct    queue accounting file
  1735. X.br
  1736. X/etc/hosts.efs    hosts with extended file system
  1737. X.br
  1738. X/etc/hosts.flat    hosts with one-to-one uid mapping
  1739. X.SH "SEE ALSO"
  1740. Xqrm(1), queue(1), queued(5), queued(8)
  1741. X.SH AUTHOR
  1742. XDan Lanciani
  1743. END_OF_FILE
  1744. if test 1385 -ne `wc -c <'qs.1'`; then
  1745.     echo shar: \"'qs.1'\" unpacked with wrong size!
  1746. fi
  1747. # end of 'qs.1'
  1748. fi
  1749. if test -f 'qs.c' -a "${1}" != "-c" ; then 
  1750.   echo shar: Will not clobber existing file \"'qs.c'\"
  1751. else
  1752. echo shar: Extracting \"'qs.c'\" \(2372 characters\)
  1753. sed "s/^X//" >'qs.c' <<'END_OF_FILE'
  1754. X/* Copyright 1990  The President and Fellows of Harvard University
  1755. X
  1756. XPermission to use, copy, modify, and distribute this program for any
  1757. Xpurpose and without fee is hereby granted, provided that this
  1758. Xcopyright and permission notice appear on all copies and supporting
  1759. Xdocumentation, the name of Harvard University not be used in advertising
  1760. Xor publicity pertaining to distribution of the program, or to results
  1761. Xderived from its use, without specific prior written permission, and notice
  1762. Xbe given in supporting documentation that copying and distribution is by
  1763. Xpermission of Harvard University.  Harvard University makes no
  1764. Xrepresentations about the suitability of this software for any purpose.
  1765. XIt is provided "as is" without express or implied warranty.    */
  1766. X
  1767. X
  1768. X/* qs.c - Dan Lanciani '85 */
  1769. X
  1770. X#include <stdio.h>
  1771. X#include <errno.h>
  1772. X#include <sys/types.h>
  1773. X#include <sys/socket.h>
  1774. X#include <netinet/in.h>
  1775. X#include <netdb.h>
  1776. X
  1777. X#include "queue.h"
  1778. X
  1779. Xextern int errno;
  1780. Xstruct servent *sp;
  1781. X
  1782. Xmain(argc, argv)
  1783. Xchar **argv;
  1784. X{
  1785. X    register int i, error = 0;
  1786. X
  1787. X    if(argc < 1 || argc > 2) {
  1788. X        fprintf(stderr, "Usage: %s [program]\n", argv[0]);
  1789. X        exit(1);
  1790. X    }
  1791. X    if(!(sp = getservbyname("queue", "tcp"))) {
  1792. X        fprintf(stderr, "queue: Bad service?!?\n");
  1793. X        exit(1);
  1794. X    }
  1795. X    if(argc == 2) {
  1796. X        if(readconf(argv[1])) {
  1797. X            fprintf(stderr, "Unknown configuration\n");
  1798. X            exit(1);
  1799. X        }
  1800. X        if(*qm) {
  1801. X            if((sp = getservbyname("qmaster", "tcp"))
  1802. X                && !show(qm, queue))
  1803. X                exit(0);
  1804. X            sp = getservbyname("queue", "tcp");
  1805. X        }
  1806. X    }
  1807. X    else {
  1808. X        gethostname(host, sizeof(host));
  1809. X        show(host, "");
  1810. X        exit(0);
  1811. X    }
  1812. X    for(i = 0; i < hcnt; i++)
  1813. X        error |= show(hosts[i], queue);
  1814. X    if(error) {
  1815. X        gethostname(host, sizeof(host));
  1816. X        show(host, queue);
  1817. X    }
  1818. X}
  1819. X
  1820. Xshow(h, p)
  1821. Xchar *h, *p;
  1822. X{
  1823. X    struct sockaddr_in sin;
  1824. X    register struct hostent *hp;
  1825. X    int s, trys, i;
  1826. X
  1827. X    if(!(hp = gethostbyname(h))) {
  1828. X        fprintf(stderr, "%s: Unknown host?!?\n", h);
  1829. X        return(1);
  1830. X    }
  1831. X    trys = 0;
  1832. X    i = IPPORT_RESERVED - 1;
  1833. Xretry:
  1834. X    if((s = rresvport(&i)) < 0) {
  1835. X        perror("rresvport");
  1836. X        return(1);
  1837. X    }
  1838. X    sin.sin_family = hp->h_addrtype;
  1839. X    sin.sin_port = sp->s_port;
  1840. X    bcopy(hp->h_addr, &sin.sin_addr, hp->h_length);
  1841. X    if(connect(s, &sin, sizeof(sin))) {
  1842. X        close(s);
  1843. X        if(trys++ < 5) {
  1844. X            sleep(trys);
  1845. X            i--;
  1846. X            goto retry;
  1847. X        }
  1848. X        perror("connect");
  1849. X        return(1);
  1850. X    }
  1851. X    write(s, "\1", 1);
  1852. X    write(s, p, strlen(p)+1);
  1853. X    mode = QM_BACKGROUND;
  1854. X    com(s, -1);
  1855. X    close(s);
  1856. X    return(0);
  1857. X}
  1858. END_OF_FILE
  1859. if test 2372 -ne `wc -c <'qs.c'`; then
  1860.     echo shar: \"'qs.c'\" unpacked with wrong size!
  1861. fi
  1862. # end of 'qs.c'
  1863. fi
  1864. if test -f 'queue.h' -a "${1}" != "-c" ; then 
  1865.   echo shar: Will not clobber existing file \"'queue.h'\"
  1866. else
  1867. echo shar: Extracting \"'queue.h'\" \(1251 characters\)
  1868. sed "s/^X//" >'queue.h' <<'END_OF_FILE'
  1869. X/* queue.h - Dan Lanciani '85 '89 */
  1870. X
  1871. X#define LIBDIR "/usr/lib/queued"
  1872. X#define QUEUES "/usr/lib/queued/QUEUES"
  1873. X
  1874. X#define SPOOLDIR "/usr/spool/queued"
  1875. X#define LOCKNODE "/usr/spool/queued/LOCK"
  1876. X#define UNID "/usr/spool/queued/UNID"
  1877. X
  1878. X#define QACCT "/usr/adm/qacct"
  1879. X
  1880. X#define FLATFILE "/etc/hosts.flat"
  1881. X#define EFSFILE "/etc/hosts.efs"
  1882. X#define EQUIVFILE "/etc/hosts.equiv"
  1883. X
  1884. X#define QUEUEGROUP "queued"
  1885. X
  1886. X#define NOBODY -2
  1887. X#define XGROUPS 32
  1888. X#define MAXUQ 4
  1889. X#define MAXHCNT 50
  1890. X
  1891. Xstruct optent {
  1892. X    struct optent *op_next;
  1893. X    char *op_name;
  1894. X    int op_action;
  1895. X    char *op_arg;
  1896. X};
  1897. X
  1898. X#define OPA_IGNORE 0
  1899. X#define OPA_COPYIN 1
  1900. X#define OPA_COPYOUT 2
  1901. X
  1902. X#define QM_BATCH 0
  1903. X#define QM_BACKGROUND 1
  1904. X#define QM_INTERACTIVE 2
  1905. X
  1906. Xextern char prog[BUFSIZ], host[BUFSIZ], qm[BUFSIZ], queue[BUFSIZ], *hosts[];
  1907. Xextern int maxcpu, minnice, maxrun, maxload, minload, mode, priv, efs, restart;
  1908. Xextern int hcnt, maxtime, nolocal, maxperu;
  1909. Xextern struct optent *copyin;
  1910. Xextern struct optent *copyout;
  1911. Xextern struct optent *option;
  1912. X
  1913. X#define malloc xmalloc
  1914. X#define FIRSTUNID (256L * 65536L)
  1915. X#define LASTUNID (32767L * 65536L)
  1916. X#define isunid(p) ((p) >= FIRSTUNID && (p) <= LASTUNID)
  1917. X
  1918. Xchar *getenv();
  1919. Xchar *malloc(), *index(), *rindex();
  1920. Xchar *newstring();
  1921. Xchar *getstr(), *fgetstr();
  1922. Xlong atol();
  1923. END_OF_FILE
  1924. if test 1251 -ne `wc -c <'queue.h'`; then
  1925.     echo shar: \"'queue.h'\" unpacked with wrong size!
  1926. fi
  1927. # end of 'queue.h'
  1928. fi
  1929. if test -f 'queued.8' -a "${1}" != "-c" ; then 
  1930.   echo shar: Will not clobber existing file \"'queued.8'\"
  1931. else
  1932. echo shar: Extracting \"'queued.8'\" \(1790 characters\)
  1933. sed "s/^X//" >'queued.8' <<'END_OF_FILE'
  1934. X.TH QUEUED 8 "19 January 1986"
  1935. X.UC 4
  1936. X.SH NAME
  1937. Xqueued  \- transparently execute remote and local queue processes
  1938. X.SH SYNOPSIS
  1939. X/etc/queued
  1940. X.PP
  1941. X.SH DESCRIPTION
  1942. X.I Queued
  1943. Xaccepts virtual connections from
  1944. X.B queue
  1945. Xand creates a server process to run a remote or local job.  When the
  1946. Xjob eventually finishes,
  1947. X.B queued
  1948. Xcleans up any files and awakens any other servers waiting for access
  1949. Xto the queue.  For these reasons,
  1950. X.B queued
  1951. Xmust not be invoked by the inet daemon.  Information necessary to run
  1952. Xprocesses is found in the queue configuration file.
  1953. X.PP
  1954. XIf the file /usr/adm/qacct exists and is writable by the
  1955. X.B queued
  1956. Xprocess, an accounting record will be written for every program run
  1957. Xon the local machine.  An accounting record consists of a single line
  1958. Xwith tab\-separated fields.  The fields are the user and system cpu time,
  1959. Xthe program run, and the user/group/host identification of the person
  1960. Xwho requested that the program be run.
  1961. X.PP
  1962. X.B Queued
  1963. Xalso accepts requests to display the current queues and to
  1964. Xremove entries from a queue.  These functions are used by qs(1) and
  1965. Xqrm(1) respectively.
  1966. X.SH "FILES (/usr/lib/queued/)"
  1967. XQUEUES        list of active, local queues
  1968. X.br
  1969. X``program''    configuration file for ``program''
  1970. X.SH "FILES (/usr/spool/queued/)"
  1971. XLOCK            master lock node
  1972. X.br
  1973. X``queue''        current information for ``queue''
  1974. X.br
  1975. X``queue''.lock    lock on ``queue''
  1976. X.br
  1977. X``queue''.tmp    used for rewriting ``queue''
  1978. X.br
  1979. X``pid''        current information for ``pid''
  1980. X.br
  1981. X``pid''.dir    temporary execution directory
  1982. X.br
  1983. X``pid''.batch    output of batch execution process
  1984. X.SH "FILES (Other)"
  1985. X/usr/adm/qacct    queue accounting file
  1986. X.br
  1987. X/etc/hosts.efs    hosts with extended file system
  1988. X.br
  1989. X/etc/hosts.flat    hosts with one-to-one uid mapping
  1990. X.SH "SEE ALSO"
  1991. Xqrm(1), qs(1), queue(1), queued(5)
  1992. X.SH AUTHOR
  1993. XDan Lanciani
  1994. END_OF_FILE
  1995. if test 1790 -ne `wc -c <'queued.8'`; then
  1996.     echo shar: \"'queued.8'\" unpacked with wrong size!
  1997. fi
  1998. # end of 'queued.8'
  1999. fi
  2000. if test -f 'spell' -a "${1}" != "-c" ; then 
  2001.   echo shar: Will not clobber existing file \"'spell'\"
  2002. else
  2003. echo shar: Extracting \"'spell'\" \(233 characters\)
  2004. sed "s/^X//" >'spell' <<'END_OF_FILE'
  2005. Xprogram spell /usr/bin/spell
  2006. Xqueue wordproc
  2007. Xqmaster harvisr
  2008. Xhost /etc/cluster
  2009. Xoption -v
  2010. Xoption -b
  2011. Xoption -x
  2012. Xoption -d ignore ARG1
  2013. Xoption -s ignore ARG1
  2014. Xoption -h ignore ARG1
  2015. Xoption DEFAULT copyin ARG0
  2016. Xmaxrun 2
  2017. Xmagic
  2018. Xmode interactive
  2019. END_OF_FILE
  2020. if test 233 -ne `wc -c <'spell'`; then
  2021.     echo shar: \"'spell'\" unpacked with wrong size!
  2022. fi
  2023. # end of 'spell'
  2024. fi
  2025. if test -f 'stat' -a "${1}" != "-c" ; then 
  2026.   echo shar: Will not clobber existing file \"'stat'\"
  2027. else
  2028. echo shar: Extracting \"'stat'\" \(238 characters\)
  2029. sed "s/^X//" >'stat' <<'END_OF_FILE'
  2030. Xprogram stat /usr/lib/queued/statjob
  2031. Xhost burrhus
  2032. Xoption -F ignore ARG1
  2033. Xoption -T ignore ARG1
  2034. Xoption -b ignore ARG1
  2035. Xoption -o ignore ARG1
  2036. Xoption -n
  2037. Xoption -B
  2038. Xoption -s
  2039. Xoption DEFAULT copyin ARG0
  2040. Xefs
  2041. Xmaxcpu 900
  2042. Xmode interactive
  2043. Xqueue stat
  2044. END_OF_FILE
  2045. if test 238 -ne `wc -c <'stat'`; then
  2046.     echo shar: \"'stat'\" unpacked with wrong size!
  2047. fi
  2048. # end of 'stat'
  2049. fi
  2050. if test -f 'stat.check' -a "${1}" != "-c" ; then 
  2051.   echo shar: Will not clobber existing file \"'stat.check'\"
  2052. else
  2053. echo shar: Extracting \"'stat.check'\" \(264 characters\)
  2054. sed "s/^X//" >'stat.check' <<'END_OF_FILE'
  2055. Xprogram stat.check /usr/lib/queued/statjob
  2056. Xhost burrhus
  2057. Xhost generali
  2058. Xoption -F ignore ARG1
  2059. Xoption -T ignore ARG1
  2060. Xoption -b ignore ARG1
  2061. Xoption -o ignore ARG1
  2062. Xoption -n
  2063. Xoption -B
  2064. Xoption -s
  2065. Xoption DEFAULT copyin ARG0
  2066. Xefs
  2067. Xmaxcpu 180
  2068. Xmode interactive
  2069. Xqueue stat.check
  2070. END_OF_FILE
  2071. if test 264 -ne `wc -c <'stat.check'`; then
  2072.     echo shar: \"'stat.check'\" unpacked with wrong size!
  2073. fi
  2074. # end of 'stat.check'
  2075. fi
  2076. if test -f 'stat.long' -a "${1}" != "-c" ; then 
  2077.   echo shar: Will not clobber existing file \"'stat.long'\"
  2078. else
  2079. echo shar: Extracting \"'stat.long'\" \(250 characters\)
  2080. sed "s/^X//" >'stat.long' <<'END_OF_FILE'
  2081. Xprogram stat.long /usr/lib/queued/statjob
  2082. Xhost burrhus
  2083. Xoption -F ignore ARG1
  2084. Xoption -T ignore ARG1
  2085. Xoption -b ignore ARG1
  2086. Xoption -o ignore ARG1
  2087. Xoption -n
  2088. Xoption -B
  2089. Xoption -s
  2090. Xoption DEFAULT copyin ARG0
  2091. Xefs
  2092. Xmaxcpu 14400
  2093. Xmode interactive
  2094. Xqueue stat.long
  2095. END_OF_FILE
  2096. if test 250 -ne `wc -c <'stat.long'`; then
  2097.     echo shar: \"'stat.long'\" unpacked with wrong size!
  2098. fi
  2099. # end of 'stat.long'
  2100. fi
  2101. if test -f 'test' -a "${1}" != "-c" ; then 
  2102.   echo shar: Will not clobber existing file \"'test'\"
  2103. else
  2104. echo shar: Extracting \"'test'\" \(114 characters\)
  2105. sed "s/^X//" >'test' <<'END_OF_FILE'
  2106. Xprogram test /usr/lib/queued/loop
  2107. Xqueue test
  2108. Xoption DEFAULT copyin ARG0
  2109. Xmode interactive
  2110. Xqmaster harvisr
  2111. Xmaxcpu 1
  2112. END_OF_FILE
  2113. if test 114 -ne `wc -c <'test'`; then
  2114.     echo shar: \"'test'\" unpacked with wrong size!
  2115. fi
  2116. # end of 'test'
  2117. fi
  2118. if test -f 'titroff' -a "${1}" != "-c" ; then 
  2119.   echo shar: Will not clobber existing file \"'titroff'\"
  2120. else
  2121. echo shar: Extracting \"'titroff'\" \(329 characters\)
  2122. sed "s/^X//" >'titroff' <<'END_OF_FILE'
  2123. Xprogram titroff /usr/vendor/bin/titroff
  2124. Xqueue wordproc
  2125. Xqmaster harvisr
  2126. Xhost /etc/cluster
  2127. Xoption -
  2128. Xoption -o*
  2129. Xoption -n*
  2130. Xoption -s*
  2131. Xoption -m*
  2132. Xoption -r*
  2133. Xoption -i
  2134. Xoption -q
  2135. Xoption -T*
  2136. Xoption -e
  2137. Xoption -h
  2138. Xoption -t
  2139. Xoption -f
  2140. Xoption -w
  2141. Xoption -b
  2142. Xoption -a
  2143. Xoption -p*
  2144. Xoption -F*
  2145. Xoption DEFAULT copyin ARG0
  2146. Xmaxrun 2
  2147. Xmode interactive
  2148. END_OF_FILE
  2149. if test 329 -ne `wc -c <'titroff'`; then
  2150.     echo shar: \"'titroff'\" unpacked with wrong size!
  2151. fi
  2152. # end of 'titroff'
  2153. fi
  2154. if test -f 'tp.troff' -a "${1}" != "-c" ; then 
  2155.   echo shar: Will not clobber existing file \"'tp.troff'\"
  2156. else
  2157. echo shar: Extracting \"'tp.troff'\" \(331 characters\)
  2158. sed "s/^X//" >'tp.troff' <<'END_OF_FILE'
  2159. Xprogram tp.troff /usr/vendor/bin/tp.troff
  2160. Xqueue wordproc
  2161. Xqmaster harvisr
  2162. Xhost /etc/cluster
  2163. Xoption -
  2164. Xoption -o*
  2165. Xoption -n*
  2166. Xoption -s*
  2167. Xoption -m*
  2168. Xoption -r*
  2169. Xoption -i
  2170. Xoption -q
  2171. Xoption -T*
  2172. Xoption -e
  2173. Xoption -h
  2174. Xoption -t
  2175. Xoption -f
  2176. Xoption -w
  2177. Xoption -b
  2178. Xoption -a
  2179. Xoption -p*
  2180. Xoption -F*
  2181. Xoption DEFAULT copyin ARG0
  2182. Xmaxrun 2
  2183. Xmode interactive
  2184. END_OF_FILE
  2185. if test 331 -ne `wc -c <'tp.troff'`; then
  2186.     echo shar: \"'tp.troff'\" unpacked with wrong size!
  2187. fi
  2188. # end of 'tp.troff'
  2189. fi
  2190. if test -f 'usr.lib.queued.shar' -a "${1}" != "-c" ; then 
  2191.   echo shar: Will not clobber existing file \"'usr.lib.queued.shar'\"
  2192. else
  2193. echo shar: Extracting \"'usr.lib.queued.shar'\" \(1078 characters\)
  2194. sed "s/^X//" >'usr.lib.queued.shar' <<'END_OF_FILE'
  2195. X#! /bin/sh
  2196. X# This is a shell archive, meaning:
  2197. X# 1. Remove everything above the #! /bin/sh line.
  2198. X# 2. Save the resulting text in a file.
  2199. X# 3. Execute the file with /bin/sh (not csh) to create the files:
  2200. X#    BGLIM.long
  2201. X#    BGLIM.reg
  2202. X#    BIMED
  2203. X#    BIMED.check
  2204. X#    BIMED.long
  2205. X#    BLIMDEP
  2206. X#    BLIMDEP.long
  2207. X#    DONEMSG
  2208. X#    GGLIM.long
  2209. X#    GGLIM.reg
  2210. X#    GLIMDEP
  2211. X#    GLIMDEP.long
  2212. X#    GSPSSX.check
  2213. X#    GSPSSX.long
  2214. X#    GSPSSX.reg
  2215. X#    QUEUES
  2216. X#    SPSSX.check
  2217. X#    SPSSX.long
  2218. X#    SPSSX.psy1995
  2219. X#    SPSSX.reg
  2220. X#    SPSSX2.check
  2221. X#    SPSSX2.long
  2222. X#    SPSSX2.reg
  2223. X#    STUFF
  2224. X#    bcc
  2225. X#    bcsh
  2226. X#    bcsh.long
  2227. X#    bsh
  2228. X#    bsh.long
  2229. X#    cat
  2230. X#    cc
  2231. X#    compiler
  2232. X#    defer
  2233. X#    defer.long
  2234. X#    f77
  2235. X#    fort
  2236. X#    gistat
  2237. X#    gistat.check
  2238. X#    gistat.long
  2239. X#    ipm
  2240. X#    nroff
  2241. X#    otroff
  2242. X#    spell
  2243. X#    stat
  2244. X#    stat.check
  2245. X#    stat.long
  2246. X#    test
  2247. X#    titroff
  2248. X#    tp.troff
  2249. X#    wordproc
  2250. X# This archive created: Fri Mar  2 00:30:40 1990
  2251. Xexport PATH; PATH=/bin:$PATH
  2252. Xif test -f 'BGLIM.long'
  2253. Xthen
  2254. X    echo shar: will not over-write existing file "'BGLIM.long'"
  2255. Xelse
  2256. Xcat << \SHAR_EOF > 'BGLIM.long'
  2257. Xprogram BGLIM.long /usr/vendor/bin/BGLIM
  2258. Xhost burrhus
  2259. Xoption DEFAULT copyin ARG0
  2260. Xefs
  2261. Xmaxcpu 14400
  2262. Xmode interactive
  2263. Xqueue stat.long
  2264. END_OF_FILE
  2265. if test 1078 -ne `wc -c <'usr.lib.queued.shar'`; then
  2266.     echo shar: \"'usr.lib.queued.shar'\" unpacked with wrong size!
  2267. fi
  2268. # end of 'usr.lib.queued.shar'
  2269. fi
  2270. if test -f 'wordproc' -a "${1}" != "-c" ; then 
  2271.   echo shar: Will not clobber existing file \"'wordproc'\"
  2272. else
  2273. echo shar: Extracting \"'wordproc'\" \(236 characters\)
  2274. sed "s/^X//" >'wordproc' <<'END_OF_FILE'
  2275. Xprogram wordproc /usr/bin/spell
  2276. Xqueue wordproc
  2277. Xqmaster harvisr
  2278. Xhost /etc/cluster
  2279. Xoption -v
  2280. Xoption -b
  2281. Xoption -x
  2282. Xoption -d ignore ARG1
  2283. Xoption -s ignore ARG1
  2284. Xoption -h ignore ARG1
  2285. Xoption DEFAULT copyin ARG0
  2286. Xmaxrun 2
  2287. Xmagic
  2288. Xmode interactive
  2289. END_OF_FILE
  2290. if test 236 -ne `wc -c <'wordproc'`; then
  2291.     echo shar: \"'wordproc'\" unpacked with wrong size!
  2292. fi
  2293. # end of 'wordproc'
  2294. fi
  2295. if test -f 'xfputs.c' -a "${1}" != "-c" ; then 
  2296.   echo shar: Will not clobber existing file \"'xfputs.c'\"
  2297. else
  2298. echo shar: Extracting \"'xfputs.c'\" \(888 characters\)
  2299. sed "s/^X//" >'xfputs.c' <<'END_OF_FILE'
  2300. X/* Copyright 1990  The President and Fellows of Harvard University
  2301. X
  2302. XPermission to use, copy, modify, and distribute this program for any
  2303. Xpurpose and without fee is hereby granted, provided that this
  2304. Xcopyright and permission notice appear on all copies and supporting
  2305. Xdocumentation, the name of Harvard University not be used in advertising
  2306. Xor publicity pertaining to distribution of the program, or to results
  2307. Xderived from its use, without specific prior written permission, and notice
  2308. Xbe given in supporting documentation that copying and distribution is by
  2309. Xpermission of Harvard University.  Harvard University makes no
  2310. Xrepresentations about the suitability of this software for any purpose.
  2311. XIt is provided "as is" without express or implied warranty.    */
  2312. X
  2313. X
  2314. X/* xfputs.c - Dan Lanciani '85 */
  2315. X
  2316. X#include <stdio.h>
  2317. X
  2318. Xxfputs(p, n)
  2319. Xchar *p;
  2320. Xregister FILE *n;
  2321. X{
  2322. X    fputs(p, n);
  2323. X    putc('\0', n);
  2324. X}
  2325. END_OF_FILE
  2326. if test 888 -ne `wc -c <'xfputs.c'`; then
  2327.     echo shar: \"'xfputs.c'\" unpacked with wrong size!
  2328. fi
  2329. # end of 'xfputs.c'
  2330. fi
  2331. echo shar: End of archive 1 \(of 3\).
  2332. cp /dev/null ark1isdone
  2333. MISSING=""
  2334. for I in 1 2 3 ; do
  2335.     if test ! -f ark${I}isdone ; then
  2336.     MISSING="${MISSING} ${I}"
  2337.     fi
  2338. done
  2339. if test "${MISSING}" = "" ; then
  2340.     echo You have unpacked all 3 archives.
  2341.     rm -f ark[1-9]isdone
  2342. else
  2343.     echo You still need to unpack the following archives:
  2344.     echo "        " ${MISSING}
  2345. fi
  2346. ##  End of shell archive.
  2347. exit 0
  2348. exit 0 # Just in case...
  2349.