home *** CD-ROM | disk | FTP | other *** search
view JSON data
|
view as text
|
open on a Mac
|
open on a PC
This file was processed as: SHell self-extracting ARchive
(archive/shar).
You can browse this item here: 9
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news text
| default
| |
99%
| file
| C source, ASCII text
| default
| |
100%
| dexmagic
| PrintFox/Pagefox WEAK
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/329 Shell Archive Format
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/news
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 75 75 | 6e 65 74 21 68 75 73 63 |Path: uu|net!husc|
|00000010| 36 21 74 68 69 6e 6b 21 | 61 6d 65 73 21 6e 65 63 |6!think!|ames!nec|
|00000020| 6e 74 63 21 6e 63 6f 61 | 73 74 21 61 6c 6c 62 65 |ntc!ncoa|st!allbe|
|00000030| 72 79 0a 46 72 6f 6d 3a | 20 6e 65 77 73 40 63 73 |ry.From:| news@cs|
|00000040| 64 5f 76 2e 55 55 43 50 | 20 28 4e 45 57 53 20 4e |d_v.UUCP| (NEWS N|
|00000050| 45 54 29 0a 4e 65 77 73 | 67 72 6f 75 70 73 3a 20 |ET).News|groups: |
|00000060| 63 6f 6d 70 2e 73 6f 75 | 72 63 65 73 2e 6d 69 73 |comp.sou|rces.mis|
|00000070| 63 0a 53 75 62 6a 65 63 | 74 3a 20 76 65 72 73 69 |c.Subjec|t: versi|
|00000080| 6f 6e 20 6f 66 20 75 75 | 70 6f 6c 6c 20 66 6f 72 |on of uu|poll for|
|00000090| 20 73 79 73 74 65 6d 20 | 56 0a 4b 65 79 77 6f 72 | system |V.Keywor|
|000000a0| 64 73 3a 20 75 75 70 6f | 6c 6c 20 75 75 63 69 63 |ds: uupo|ll uucic|
|000000b0| 6f 20 73 79 73 74 65 6d | 5f 56 20 70 6f 6c 6c 0a |o system|_V poll.|
|000000c0| 4d 65 73 73 61 67 65 2d | 49 44 3a 20 3c 36 38 30 |Message-|ID: <680|
|000000d0| 34 40 6e 63 6f 61 73 74 | 2e 55 55 43 50 3e 0a 44 |4@ncoast|.UUCP>.D|
|000000e0| 61 74 65 3a 20 31 37 20 | 44 65 63 20 38 37 20 30 |ate: 17 |Dec 87 0|
|000000f0| 32 3a 33 34 3a 32 37 20 | 47 4d 54 0a 53 65 6e 64 |2:34:27 |GMT.Send|
|00000100| 65 72 3a 20 61 6c 6c 62 | 65 72 79 40 6e 63 6f 61 |er: allb|ery@ncoa|
|00000110| 73 74 2e 55 55 43 50 0a | 4f 72 67 61 6e 69 7a 61 |st.UUCP.|Organiza|
|00000120| 74 69 6f 6e 3a 20 43 6f | 6d 70 75 74 65 72 20 53 |tion: Co|mputer S|
|00000130| 79 73 74 65 6d 73 20 44 | 65 73 69 67 6e 20 2d 2d |ystems D|esign --|
|00000140| 20 53 61 6e 64 79 20 48 | 6f 6f 6b 2c 20 43 74 2e | Sandy H|ook, Ct.|
|00000150| 0a 4c 69 6e 65 73 3a 20 | 36 38 32 0a 41 70 70 72 |.Lines: |682.Appr|
|00000160| 6f 76 65 64 3a 20 61 6c | 6c 62 65 72 79 40 6e 63 |oved: al|lbery@nc|
|00000170| 6f 61 73 74 2e 55 55 43 | 50 0a 58 2d 41 72 63 68 |oast.UUC|P.X-Arch|
|00000180| 69 76 65 3a 20 63 6f 6d | 70 2e 73 6f 75 72 63 65 |ive: com|p.source|
|00000190| 73 2e 6d 69 73 63 2f 38 | 37 31 32 2f 39 0a 0a 54 |s.misc/8|712/9..T|
|000001a0| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 73 68 61 |he follo|wing sha|
|000001b0| 72 20 66 69 6c 65 20 69 | 6d 70 6c 65 6d 65 6e 74 |r file i|mplement|
|000001c0| 73 20 61 20 72 65 6d 6f | 74 65 20 73 69 74 65 20 |s a remo|te site |
|000001d0| 70 6f 6c 6c 69 6e 67 20 | 6d 65 63 68 61 6e 69 73 |polling |mechanis|
|000001e0| 6d 0a 66 6f 72 20 55 53 | 47 20 73 79 73 74 65 6d |m.for US|G system|
|000001f0| 73 20 77 68 69 63 68 20 | 6c 61 63 6b 20 6f 6e 65 |s which |lack one|
|00000200| 2e 0a 0a 2d 2d 2d 2d 2d | 63 75 74 2d 2d 2d 2d 2d |...-----|cut-----|
|00000210| 63 75 74 2d 2d 2d 2d 2d | 63 75 74 2d 2d 2d 2d 2d |cut-----|cut-----|
|00000220| 63 75 74 2d 2d 2d 2d 2d | 63 75 74 2d 2d 2d 2d 2d |cut-----|cut-----|
|00000230| 63 75 74 2d 2d 2d 2d 2d | 63 75 74 2d 2d 2d 2d 2d |cut-----|cut-----|
|00000240| 63 75 74 2d 2d 2d 2d 2d | 63 75 74 2d 2d 2d 2d 2d |cut-----|cut-----|
|00000250| 63 75 74 0a 23 21 20 2f | 62 69 6e 2f 73 68 0a 23 |cut.#! /|bin/sh.#|
|00000260| 20 54 68 69 73 20 69 73 | 20 61 20 73 68 65 6c 6c | This is| a shell|
|00000270| 20 61 72 63 68 69 76 65 | 2c 20 6d 65 61 6e 69 6e | archive|, meanin|
|00000280| 67 3a 0a 23 20 31 2e 20 | 52 65 6d 6f 76 65 20 65 |g:.# 1. |Remove e|
|00000290| 76 65 72 79 74 68 69 6e | 67 20 61 62 6f 76 65 20 |verythin|g above |
|000002a0| 74 68 65 20 23 21 20 2f | 62 69 6e 2f 73 68 20 6c |the #! /|bin/sh l|
|000002b0| 69 6e 65 2e 0a 23 20 32 | 2e 20 53 61 76 65 20 74 |ine..# 2|. Save t|
|000002c0| 68 65 20 72 65 73 75 6c | 74 69 6e 67 20 74 65 78 |he resul|ting tex|
|000002d0| 74 20 69 6e 20 61 20 66 | 69 6c 65 2e 0a 23 20 33 |t in a f|ile..# 3|
|000002e0| 2e 20 45 78 65 63 75 74 | 65 20 74 68 65 20 66 69 |. Execut|e the fi|
|000002f0| 6c 65 20 77 69 74 68 20 | 2f 62 69 6e 2f 73 68 20 |le with |/bin/sh |
|00000300| 28 6e 6f 74 20 63 73 68 | 29 20 74 6f 20 63 72 65 |(not csh|) to cre|
|00000310| 61 74 65 3a 0a 23 0a 23 | 09 20 31 29 20 52 45 41 |ate:.#.#|. 1) REA|
|00000320| 44 4d 45 0a 23 09 20 32 | 29 20 75 75 70 6f 6c 6c |DME.#. 2|) uupoll|
|00000330| 2e 63 0a 23 0a 23 20 54 | 68 69 73 20 61 72 63 68 |.c.#.# T|his arch|
|00000340| 69 76 65 20 63 72 65 61 | 74 65 64 3a 20 53 75 6e |ive crea|ted: Sun|
|00000350| 20 44 65 63 20 31 33 20 | 30 32 3a 34 36 3a 34 36 | Dec 13 |02:46:46|
|00000360| 20 31 39 38 37 0a 0a 65 | 78 70 6f 72 74 20 50 41 | 1987..e|xport PA|
|00000370| 54 48 3b 20 50 41 54 48 | 3d 2f 62 69 6e 3a 2f 75 |TH; PATH|=/bin:/u|
|00000380| 73 72 2f 62 69 6e 3a 24 | 50 41 54 48 0a 0a 23 2d |sr/bin:$|PATH..#-|
|00000390| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000003a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000003b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000003c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000003d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 23 0a 20 |--------|-----#. |
|000003e0| 0a 69 66 20 74 65 73 74 | 20 2d 66 20 27 52 45 41 |.if test| -f 'REA|
|000003f0| 44 4d 45 27 0a 74 68 65 | 6e 0a 09 65 63 68 6f 20 |DME'.the|n..echo |
|00000400| 22 73 68 61 72 3a 20 77 | 69 6c 6c 20 6e 6f 74 20 |"shar: w|ill not |
|00000410| 6f 76 65 72 2d 77 72 69 | 74 65 20 65 78 69 73 74 |over-wri|te exist|
|00000420| 69 6e 67 20 66 69 6c 65 | 20 27 52 45 41 44 4d 45 |ing file| 'README|
|00000430| 27 22 0a 65 6c 73 65 0a | 63 61 74 20 3c 3c 20 53 |'".else.|cat << S|
|00000440| 48 41 52 5f 45 4f 46 20 | 3e 20 27 52 45 41 44 4d |HAR_EOF |> 'READM|
|00000450| 45 27 0a 55 75 70 6f 6c | 6c 20 69 73 20 61 20 70 |E'.Uupol|l is a p|
|00000460| 6f 6c 6c 69 6e 67 20 6d | 65 63 68 61 6e 69 73 6d |olling m|echanism|
|00000470| 20 66 6f 72 20 73 79 73 | 56 20 75 6e 69 78 20 73 | for sys|V unix s|
|00000480| 79 73 74 65 6d 73 20 77 | 68 69 63 68 0a 61 72 65 |ystems w|hich.are|
|00000490| 20 72 75 6e 6e 69 6e 67 | 20 6e 6f 6e 2d 48 4f 4e | running| non-HON|
|000004a0| 45 59 44 41 4e 42 45 52 | 20 75 75 63 70 2e 20 20 |EYDANBER| uucp. |
|000004b0| 54 68 69 73 20 76 65 72 | 73 69 6f 6e 20 6f 66 20 |This ver|sion of |
|000004c0| 75 75 63 70 0a 6c 61 63 | 6b 73 20 73 75 63 68 20 |uucp.lac|ks such |
|000004d0| 61 20 6d 65 63 68 61 6e | 69 73 6d 2e 20 20 4e 6f |a mechan|ism. No|
|000004e0| 20 61 74 74 65 6d 70 74 | 20 68 61 73 20 62 65 65 | attempt| has bee|
|000004f0| 6e 20 6d 61 64 65 20 74 | 6f 20 0a 64 75 70 6c 69 |n made t|o .dupli|
|00000500| 63 61 74 65 20 74 68 65 | 20 66 75 6e 63 74 69 6f |cate the| functio|
|00000510| 6e 61 6c 69 74 79 20 6f | 66 20 65 69 74 68 65 72 |nality o|f either|
|00000520| 20 48 4f 4e 45 59 44 41 | 4e 42 45 52 20 6f 72 0a | HONEYDA|NBER or.|
|00000530| 42 53 44 20 70 6f 6c 6c | 69 6e 67 20 6d 65 63 68 |BSD poll|ing mech|
|00000540| 61 6e 69 73 6d 73 20 73 | 69 6e 63 65 20 74 68 65 |anisms s|ince the|
|00000550| 20 61 75 74 68 6f 72 20 | 64 6f 65 73 20 6e 6f 74 | author |does not|
|00000560| 20 68 61 76 65 0a 65 76 | 65 6e 20 74 68 65 20 73 | have.ev|en the s|
|00000570| 6c 69 67 68 74 65 73 74 | 20 69 64 65 61 20 6f 66 |lightest| idea of|
|00000580| 20 77 68 61 74 20 74 68 | 6f 73 65 20 6d 65 63 68 | what th|ose mech|
|00000590| 61 6e 69 73 6d 73 20 6d | 69 67 68 74 0a 62 65 2e |anisms m|ight.be.|
|000005a0| 0a 0a 54 68 65 20 76 65 | 72 73 69 6f 6e 20 6f 66 |..The ve|rsion of|
|000005b0| 20 75 75 70 6f 6c 6c 20 | 69 6e 63 6c 75 64 65 64 | uupoll |included|
|000005c0| 20 68 65 72 65 20 68 61 | 73 20 74 68 65 20 66 6f | here ha|s the fo|
|000005d0| 6c 6c 6f 77 69 6e 67 0a | 66 65 61 74 75 72 65 73 |llowing.|features|
|000005e0| 3a 0a 0a 31 2e 20 20 5c | 24 20 75 75 70 6f 6c 6c |:..1. \|$ uupoll|
|000005f0| 20 73 79 73 6e 61 6d 65 | 0a 0a 63 72 65 61 74 65 | sysname|..create|
|00000600| 73 20 61 20 66 69 6c 65 | 20 69 6e 20 74 68 65 20 |s a file| in the |
|00000610| 73 70 6f 6f 6c 20 64 69 | 72 65 63 74 6f 72 79 20 |spool di|rectory |
|00000620| 6e 61 6d 65 64 20 50 2e | 73 79 73 6e 61 6d 65 2e |named P.|sysname.|
|00000630| 20 20 4e 6f 20 63 68 65 | 63 6b 20 69 73 20 6d 61 | No che|ck is ma|
|00000640| 64 65 20 74 6f 0a 73 65 | 65 20 69 66 20 73 79 73 |de to.se|e if sys|
|00000650| 6e 61 6d 65 20 69 73 20 | 69 6e 63 6c 75 64 65 64 |name is |included|
|00000660| 20 69 6e 20 4c 2e 73 79 | 73 2e 20 20 54 68 65 20 | in L.sy|s. The |
|00000670| 70 6f 6c 6c 20 66 69 6c | 65 20 61 74 20 70 72 65 |poll fil|e at pre|
|00000680| 73 65 6e 74 20 63 6f 6e | 73 69 73 74 73 20 6f 66 |sent con|sists of|
|00000690| 0a 61 20 73 69 6e 67 6c | 65 20 72 65 63 6f 72 64 |.a singl|e record|
|000006a0| 0a 0a 44 20 6e 6e 0a 0a | 77 68 65 72 65 20 6e 6e |..D nn..|where nn|
|000006b0| 20 69 73 20 74 68 65 20 | 65 78 70 69 72 61 74 69 | is the |expirati|
|000006c0| 6f 6e 20 6e 75 6d 62 65 | 72 20 64 65 73 63 72 69 |on numbe|r descri|
|000006d0| 62 65 64 20 69 6e 20 74 | 68 65 20 2d 64 20 6f 70 |bed in t|he -d op|
|000006e0| 74 69 6f 6e 20 62 65 6c | 6f 77 2e 0a 54 68 65 20 |tion bel|ow..The |
|000006f0| 66 6f 6c 6c 6f 77 69 6e | 67 20 6f 70 74 69 6f 6e |followin|g option|
|00000700| 73 20 61 72 65 20 76 61 | 6c 69 64 20 69 6e 20 74 |s are va|lid in t|
|00000710| 68 69 73 20 66 6f 72 6d | 20 6f 66 20 74 68 65 20 |his form| of the |
|00000720| 63 6f 6d 6d 61 6e 64 2e | 20 20 0a 0a 09 2d 70 20 |command.| ...-p |
|00000730| 70 61 74 68 20 09 53 70 | 65 63 69 66 69 65 73 20 |path .Sp|ecifies |
|00000740| 74 68 65 20 70 61 74 68 | 20 6f 66 20 61 6e 20 61 |the path| of an a|
|00000750| 6c 74 65 72 6e 61 74 65 | 20 73 70 6f 6f 6c 20 64 |lternate| spool d|
|00000760| 69 72 65 63 74 6f 72 79 | 2e 20 20 54 68 65 0a 09 |irectory|. The..|
|00000770| 09 09 09 64 65 66 61 75 | 6c 74 20 64 69 72 65 63 |...defau|lt direc|
|00000780| 74 6f 72 79 20 69 73 20 | 2f 75 73 72 2f 73 70 6f |tory is |/usr/spo|
|00000790| 6f 6c 2f 75 75 63 70 2e | 0a 09 2d 64 20 6e 09 09 |ol/uucp.|..-d n..|
|000007a0| 53 70 65 63 69 66 69 65 | 73 20 74 68 65 20 6e 75 |Specifie|s the nu|
|000007b0| 6d 62 65 72 20 6f 66 20 | 69 6e 76 6f 63 61 74 69 |mber of |invocati|
|000007c0| 6f 6e 73 20 6f 66 20 22 | 75 75 70 6f 6c 6c 20 2d |ons of "|uupoll -|
|000007d0| 63 22 0a 09 09 09 09 72 | 65 71 75 69 72 65 64 20 |c".....r|equired |
|000007e0| 74 6f 20 65 78 70 69 72 | 65 20 74 68 65 20 70 6f |to expir|e the po|
|000007f0| 6c 6c 2e 20 20 54 68 65 | 20 64 65 66 61 75 6c 74 |ll. The| default|
|00000800| 20 69 73 20 33 20 69 6e | 20 74 68 65 0a 09 09 09 | is 3 in| the....|
|00000810| 09 61 62 73 65 6e 63 65 | 20 6f 66 20 74 68 69 73 |.absence| of this|
|00000820| 20 73 77 69 74 63 68 2e | 0a 0a 32 2e 20 20 5c 24 | switch.|..2. \$|
|00000830| 20 75 75 70 6f 6c 6c 20 | 2d 5b 72 7c 6c 5d 20 73 | uupoll |-[r|l] s|
|00000840| 79 73 6e 61 6d 65 0a 0a | 72 65 6d 6f 76 65 73 20 |ysname..|removes |
|00000850| 6f 72 20 6c 69 73 74 73 | 20 74 6f 20 73 74 61 6e |or lists| to stan|
|00000860| 64 61 72 64 20 6f 75 74 | 70 75 74 20 74 68 65 20 |dard out|put the |
|00000870| 70 6f 6c 6c 20 66 69 6c | 65 73 20 61 73 73 6f 63 |poll fil|es assoc|
|00000880| 69 61 74 65 64 20 77 69 | 74 68 0a 74 68 65 20 6e |iated wi|th.the n|
|00000890| 61 6d 65 64 20 73 79 73 | 74 65 6d 73 2e 20 20 54 |amed sys|tems. T|
|000008a0| 68 65 20 73 70 65 63 69 | 61 6c 20 73 79 73 74 65 |he speci|al syste|
|000008b0| 6d 20 6e 61 6d 65 20 22 | 61 6c 6c 22 20 69 73 20 |m name "|all" is |
|000008c0| 76 61 6c 69 64 20 77 69 | 74 68 0a 74 68 69 73 20 |valid wi|th.this |
|000008d0| 66 6f 72 6d 20 6f 66 20 | 74 68 65 20 63 6f 6d 6d |form of |the comm|
|000008e0| 61 6e 64 2e 0a 0a 33 2e | 20 20 5c 24 20 75 75 70 |and...3.| \$ uup|
|000008f0| 6f 6c 6c 20 2d 63 0a 0a | 64 65 63 72 65 6d 65 6e |oll -c..|decremen|
|00000900| 74 73 20 74 68 65 20 76 | 61 6c 75 65 20 6e 20 69 |ts the v|alue n i|
|00000910| 6e 20 74 68 65 20 70 6f | 6c 6c 20 66 69 6c 65 20 |n the po|ll file |
|00000920| 61 6e 64 20 77 68 65 6e | 20 6e 20 72 65 61 63 68 |and when| n reach|
|00000930| 65 73 20 30 2c 20 64 65 | 6c 65 74 65 73 0a 74 68 |es 0, de|letes.th|
|00000940| 65 20 70 6f 6c 6c 20 66 | 69 6c 65 2e 20 20 53 65 |e poll f|ile. Se|
|00000950| 6e 64 73 20 6d 61 69 6c | 20 74 6f 20 74 68 65 20 |nds mail| to the |
|00000960| 6f 77 6e 65 72 20 73 74 | 61 74 69 6e 67 20 74 68 |owner st|ating th|
|00000970| 61 74 20 74 68 65 20 70 | 6f 6c 6c 20 68 61 73 0a |at the p|oll has.|
|00000980| 65 78 70 69 72 65 64 20 | 62 65 66 6f 72 65 20 61 |expired |before a|
|00000990| 20 73 75 63 63 65 73 73 | 66 75 6c 20 63 6f 6e 6e | success|ful conn|
|000009a0| 65 63 74 69 6f 6e 20 77 | 61 73 20 65 73 74 61 62 |ection w|as estab|
|000009b0| 6c 69 73 68 65 64 2e 20 | 20 54 68 69 73 20 63 6f |lished. | This co|
|000009c0| 6d 6d 61 6e 64 20 0a 69 | 73 20 69 6e 74 65 6e 64 |mmand .i|s intend|
|000009d0| 65 64 20 74 6f 20 62 65 | 20 72 75 6e 20 64 61 69 |ed to be| run dai|
|000009e0| 6c 79 2e 0a 0a 34 2e 20 | 20 5c 24 20 75 75 70 6f |ly...4. | \$ uupo|
|000009f0| 6c 6c 0a 0a 69 6e 76 6f | 6b 65 73 20 75 75 63 69 |ll..invo|kes uuci|
|00000a00| 63 6f 20 61 73 20 61 20 | 63 68 69 6c 64 20 70 72 |co as a |child pr|
|00000a10| 6f 63 65 73 73 20 20 66 | 6f 72 20 65 61 63 68 20 |ocess f|or each |
|00000a20| 70 6f 6c 6c 20 66 69 6c | 65 20 69 6e 20 74 68 65 |poll fil|e in the|
|00000a30| 20 73 70 6f 6f 6c 20 64 | 69 72 65 63 74 6f 72 79 | spool d|irectory|
|00000a40| 2e 0a 41 74 20 74 68 65 | 20 63 6f 6d 70 6c 65 74 |..At the| complet|
|00000a50| 69 6f 6e 20 6f 66 20 74 | 68 65 20 63 6f 6e 76 65 |ion of t|he conve|
|00000a60| 72 73 61 74 69 6f 6e 20 | 28 69 66 20 61 6e 79 29 |rsation |(if any)|
|00000a70| 20 75 75 73 74 61 74 20 | 69 73 20 69 6e 76 6f 6b | uustat |is invok|
|00000a80| 65 64 20 74 6f 20 73 65 | 65 0a 69 66 20 74 68 65 |ed to se|e.if the|
|00000a90| 20 63 6f 6e 76 65 72 73 | 61 74 69 6f 6e 20 73 75 | convers|ation su|
|00000aa0| 63 63 65 65 64 65 64 2e | 20 20 49 66 20 73 6f 2c |cceeded.| If so,|
|00000ab0| 20 74 68 65 20 70 6f 6c | 6c 20 66 69 6c 65 20 69 | the pol|l file i|
|00000ac0| 73 20 72 65 6d 6f 76 65 | 64 20 66 72 6f 6d 20 74 |s remove|d from t|
|00000ad0| 68 65 0a 73 70 6f 6f 6c | 20 64 69 72 65 63 74 6f |he.spool| directo|
|00000ae0| 72 79 2e 20 20 54 68 65 | 20 66 6f 6c 6c 6f 77 69 |ry. The| followi|
|00000af0| 6e 67 20 73 77 69 74 63 | 68 65 73 20 61 72 65 20 |ng switc|hes are |
|00000b00| 76 61 6c 69 64 0a 0a 09 | 2d 70 20 70 61 74 68 09 |valid...|-p path.|
|00000b10| 09 53 70 65 63 69 66 69 | 65 73 20 74 68 65 20 70 |.Specifi|es the p|
|00000b20| 61 74 68 20 6f 66 20 61 | 6e 20 61 6c 74 65 72 6e |ath of a|n altern|
|00000b30| 61 74 65 20 73 70 6f 6f | 6c 20 64 69 72 65 63 74 |ate spoo|l direct|
|00000b40| 6f 72 79 2e 0a 09 2d 78 | 20 20 20 20 20 20 20 20 |ory...-x| |
|00000b50| 20 20 43 61 75 73 65 73 | 20 2d 78 39 20 64 65 62 | Causes| -x9 deb|
|00000b60| 75 67 67 69 6e 67 20 6f | 75 74 70 75 74 20 66 72 |ugging o|utput fr|
|00000b70| 6f 6d 20 75 75 63 69 63 | 6f 2e 0a 0a 49 66 20 66 |om uucic|o...If f|
|00000b80| 6f 72 20 61 6e 79 20 72 | 65 61 73 6f 6e 20 74 68 |or any r|eason th|
|00000b90| 65 20 63 6f 6e 76 65 72 | 73 61 74 69 6f 6e 20 77 |e conver|sation w|
|00000ba0| 61 73 20 6e 6f 74 20 73 | 75 63 63 65 73 73 66 75 |as not s|uccessfu|
|00000bb0| 6c 20 74 68 65 20 70 6f | 6c 6c 20 66 69 6c 65 0a |l the po|ll file.|
|00000bc0| 69 73 20 6c 65 66 74 20 | 69 6e 74 61 63 74 20 61 |is left |intact a|
|00000bd0| 6e 64 20 74 68 65 20 70 | 6f 6c 6c 20 69 73 20 72 |nd the p|oll is r|
|00000be0| 65 74 72 69 65 64 20 61 | 74 20 74 68 65 20 6e 65 |etried a|t the ne|
|00000bf0| 78 74 20 69 6e 76 6f 63 | 61 74 69 6f 6e 20 6f 66 |xt invoc|ation of|
|00000c00| 20 74 68 65 0a 75 75 70 | 6f 6c 6c 20 63 6f 6d 6d | the.uup|oll comm|
|00000c10| 61 6e 64 2e 0a 0a 45 58 | 41 4d 50 4c 45 3a 0a 0a |and...EX|AMPLE:..|
|00000c20| 54 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 69 73 |The foll|owing is|
|00000c30| 20 61 6e 20 65 78 61 6d | 70 6c 65 20 6f 66 20 74 | an exam|ple of t|
|00000c40| 68 65 20 69 6e 74 65 6e | 64 65 64 20 75 73 61 67 |he inten|ded usag|
|00000c50| 65 20 6f 66 20 74 68 65 | 20 63 6f 6d 6d 61 6e 64 |e of the| command|
|00000c60| 2e 0a 54 68 65 20 70 6f | 6c 6c 69 6e 67 20 6f 66 |..The po|lling of|
|00000c70| 20 73 79 73 74 65 6d 73 | 20 61 61 61 20 61 6e 64 | systems| aaa and|
|00000c80| 20 62 62 62 20 62 79 20 | 75 73 65 72 20 6a 6f 65 | bbb by |user joe|
|00000c90| 20 61 74 20 34 20 61 2e | 6d 2e 20 64 61 69 6c 79 | at 4 a.|m. daily|
|00000ca0| 20 61 6e 64 0a 6f 66 20 | 73 79 73 74 65 6d 20 63 | and.of |system c|
|00000cb0| 63 63 20 62 79 20 66 72 | 65 64 20 61 74 20 38 20 |cc by fr|ed at 8 |
|00000cc0| 61 6e 64 20 31 31 20 70 | 2e 6d 2e 20 69 73 20 61 |and 11 p|.m. is a|
|00000cd0| 63 63 6f 6d 70 6c 69 73 | 68 65 64 2e 0a 0a 23 20 |ccomplis|hed...# |
|00000ce0| 69 6e 20 6a 6f 65 27 73 | 20 63 72 6f 6e 74 61 62 |in joe's| crontab|
|00000cf0| 20 28 68 61 76 65 20 70 | 6f 6c 6c 20 69 6e 20 70 | (have p|oll in p|
|00000d00| 6c 61 63 65 20 62 65 66 | 6f 72 65 20 74 68 65 20 |lace bef|ore the |
|00000d10| 68 6f 75 72 29 3a 0a 35 | 35 20 33 20 2a 20 2a 20 |hour):.5|5 3 * * |
|00000d20| 2a 20 75 75 70 6f 6c 6c | 20 61 61 61 20 3e 20 2f |* uupoll| aaa > /|
|00000d30| 64 65 76 2f 6e 75 6c 6c | 0a 35 35 20 33 20 2a 20 |dev/null|.55 3 * |
|00000d40| 2a 20 2a 20 75 75 70 6f | 6c 6c 20 62 62 62 20 3e |* * uupo|ll bbb >|
|00000d50| 20 2f 64 65 76 2f 6e 75 | 6c 6c 0a 0a 23 20 69 6e | /dev/nu|ll..# in|
|00000d60| 20 66 72 65 64 27 73 20 | 63 72 6f 6e 74 61 62 20 | fred's |crontab |
|00000d70| 28 68 61 76 65 20 70 6f | 6c 6c 20 69 6e 20 70 6c |(have po|ll in pl|
|00000d80| 61 63 65 20 62 65 66 6f | 72 65 20 74 68 65 20 68 |ace befo|re the h|
|00000d90| 6f 75 72 29 3a 0a 35 35 | 20 31 39 2c 32 32 20 2a |our):.55| 19,22 *|
|00000da0| 20 2a 20 2a 20 75 75 70 | 6f 6c 6c 20 62 62 62 20 | * * uup|oll bbb |
|00000db0| 3e 20 2f 64 65 76 2f 6e | 75 6c 6c 0a 0a 23 20 69 |> /dev/n|ull..# i|
|00000dc0| 6e 20 75 75 63 70 27 73 | 20 63 72 6f 6e 74 61 62 |n uucp's| crontab|
|00000dd0| 20 28 73 65 72 76 69 63 | 65 20 61 6c 6c 20 70 6f | (servic|e all po|
|00000de0| 6c 6c 73 20 68 6f 75 72 | 6c 79 29 3a 0a 30 20 2a |lls hour|ly):.0 *|
|00000df0| 20 2a 20 2a 20 2a 20 75 | 75 70 6f 6c 6c 20 3e 20 | * * * u|upoll > |
|00000e00| 2f 64 65 76 2f 6e 75 6c | 6c 0a 0a 23 20 69 6e 20 |/dev/nul|l..# in |
|00000e10| 72 6f 6f 74 27 73 20 63 | 72 6f 6e 74 61 62 20 28 |root's c|rontab (|
|00000e20| 65 78 70 69 72 65 20 70 | 6f 6c 6c 73 20 64 61 69 |expire p|olls dai|
|00000e30| 6c 79 29 3a 0a 30 20 32 | 20 2a 20 2a 20 2a 20 75 |ly):.0 2| * * * u|
|00000e40| 75 70 6f 6c 6c 20 2d 63 | 20 3e 20 2f 64 65 76 2f |upoll -c| > /dev/|
|00000e50| 6e 75 6c 6c 0a 0a 54 6f | 20 62 75 69 6c 64 20 75 |null..To| build u|
|00000e60| 75 70 6f 6c 6c 20 74 68 | 65 20 73 74 61 6e 64 61 |upoll th|e standa|
|00000e70| 72 64 20 63 6f 6d 70 69 | 6c 61 74 69 6f 6e 20 63 |rd compi|lation c|
|00000e80| 6f 6d 6d 61 6e 64 20 69 | 73 20 73 75 66 66 69 63 |ommand i|s suffic|
|00000e90| 69 65 6e 74 3a 0a 0a 09 | 5c 24 20 63 63 20 2d 4f |ient:...|\$ cc -O|
|00000ea0| 20 2d 6f 20 75 75 70 6f | 6c 6c 20 75 75 70 6f 6c | -o uupo|ll uupol|
|00000eb0| 6c 2e 63 0a 0a 49 20 77 | 6f 75 6c 64 20 6f 66 20 |l.c..I w|ould of |
|00000ec0| 63 6f 75 72 73 65 20 61 | 70 70 72 65 63 69 61 74 |course a|ppreciat|
|00000ed0| 65 20 61 6e 79 20 66 65 | 65 64 62 61 63 6b 2c 20 |e any fe|edback, |
|00000ee0| 73 75 67 67 65 73 74 69 | 6f 6e 73 2c 20 62 75 67 |suggesti|ons, bug|
|00000ef0| 20 72 65 70 6f 72 74 73 | 2c 20 65 74 63 2e 0a 0a | reports|, etc...|
|00000f00| 3d 3a 3d 3a 3d 3a 3d 3a | 3d 3a 3d 3a 3d 3a 3d 3a |=:=:=:=:|=:=:=:=:|
|00000f10| 3d 3a 3d 3a 3d 3a 3d 3a | 3d 3a 3d 3a 3d 3a 3d 3a |=:=:=:=:|=:=:=:=:|
|00000f20| 3d 3a 3d 3a 3d 3a 3d 3a | 3d 3a 3d 3a 3d 3a 3d 3a |=:=:=:=:|=:=:=:=:|
|00000f30| 3d 3a 3d 3a 3d 3a 3d 3a | 3d 3a 3d 3a 3d 3a 3d 3a |=:=:=:=:|=:=:=:=:|
|00000f40| 3d 3a 3d 3a 3d 3a 3d 3a | 3d 3a 3d 3a 3d 3a 0a 7c |=:=:=:=:|=:=:=:.||
|00000f50| 7c 20 42 72 75 63 65 20 | 4b 65 72 6e 20 20 20 20 || Bruce |Kern |
|00000f60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000f70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000f80| 20 20 7c 20 75 75 6e 65 | 74 21 73 77 6c 61 62 73 | | uune|t!swlabs|
|00000f90| 21 63 73 64 5f 76 21 62 | 61 6b 20 7c 7c 0a 7c 7c |!csd_v!b|ak ||.|||
|00000fa0| 20 43 6f 6d 70 75 74 65 | 72 20 53 79 73 74 65 6d | Compute|r System|
|00000fb0| 73 20 44 65 73 69 67 6e | 20 20 20 20 20 20 20 20 |s Design| |
|00000fc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000fd0| 20 7c 20 31 2d 32 30 33 | 2d 32 37 30 2d 30 33 39 | | 1-203|-270-039|
|00000fe0| 39 20 20 20 20 20 20 20 | 20 20 7c 7c 0a 7c 7c 20 |9 | ||.|| |
|00000ff0| 32 39 20 48 69 67 68 20 | 52 6f 63 6b 20 52 64 2e |29 High |Rock Rd.|
|00001000| 2c 20 53 61 6e 64 79 20 | 48 6f 6f 6b 2c 20 43 74 |, Sandy |Hook, Ct|
|00001010| 2e 20 30 36 34 38 32 20 | 20 20 20 20 20 20 20 20 |. 06482 | |
|00001020| 7c 20 54 68 69 73 20 73 | 70 61 63 65 20 66 6f 72 || This s|pace for|
|00001030| 20 72 65 6e 74 2e 20 20 | 20 7c 7c 0a 3d 3a 3d 3a | rent. | ||.=:=:|
|00001040| 3d 3a 3d 3a 3d 3a 3d 3a | 3d 3a 3d 3a 3d 3a 3d 3a |=:=:=:=:|=:=:=:=:|
|00001050| 3d 3a 3d 3a 3d 3a 3d 3a | 3d 3a 3d 3a 3d 3a 3d 3a |=:=:=:=:|=:=:=:=:|
|00001060| 3d 3a 3d 3a 3d 3a 3d 3a | 3d 3a 3d 3a 3d 3a 3d 3a |=:=:=:=:|=:=:=:=:|
|00001070| 3d 3a 3d 3a 3d 3a 3d 3a | 3d 3a 3d 3a 3d 3a 3d 3a |=:=:=:=:|=:=:=:=:|
|00001080| 3d 3a 3d 3a 3d 3a 3d 3a | 3d 3a 0a 53 48 41 52 5f |=:=:=:=:|=:.SHAR_|
|00001090| 45 4f 46 0a 66 69 0a 0a | 0a 23 2d 2d 2d 2d 2d 2d |EOF.fi..|.#------|
|000010a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000010b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000010c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000010d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000010e0| 2d 2d 2d 2d 2d 2d 2d 2d | 23 0a 20 0a 69 66 20 74 |--------|#. .if t|
|000010f0| 65 73 74 20 2d 66 20 27 | 75 75 70 6f 6c 6c 2e 63 |est -f '|uupoll.c|
|00001100| 27 0a 74 68 65 6e 0a 09 | 65 63 68 6f 20 22 73 68 |'.then..|echo "sh|
|00001110| 61 72 3a 20 77 69 6c 6c | 20 6e 6f 74 20 6f 76 65 |ar: will| not ove|
|00001120| 72 2d 77 72 69 74 65 20 | 65 78 69 73 74 69 6e 67 |r-write |existing|
|00001130| 20 66 69 6c 65 20 27 75 | 75 70 6f 6c 6c 2e 63 27 | file 'u|upoll.c'|
|00001140| 22 0a 65 6c 73 65 0a 63 | 61 74 20 3c 3c 20 53 48 |".else.c|at << SH|
|00001150| 41 52 5f 45 4f 46 20 3e | 20 27 75 75 70 6f 6c 6c |AR_EOF >| 'uupoll|
|00001160| 2e 63 27 0a 2f 2a 0a 0a | 4e 41 4d 45 0a 20 20 20 |.c'./*..|NAME. |
|00001170| 20 75 75 70 6f 6c 6c 20 | 2d 2d 20 70 6f 6c 6c 20 | uupoll |-- poll |
|00001180| 61 20 72 65 6d 6f 74 65 | 20 73 79 73 74 65 6d 20 |a remote| system |
|00001190| 66 6f 72 20 69 6e 62 6f | 75 6e 64 20 74 72 61 66 |for inbo|und traf|
|000011a0| 66 69 63 0a 0a 53 59 4e | 4f 50 53 49 53 0a 20 20 |fic..SYN|OPSIS. |
|000011b0| 20 20 75 75 70 6f 6c 6c | 20 5b 2d 70 20 73 70 6f | uupoll| [-p spo|
|000011c0| 6f 6c 5f 70 61 74 68 5d | 20 5b 2d 78 5d 20 20 20 |ol_path]| [-x] |
|000011d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000011e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000011f0| 20 20 20 0a 20 20 20 20 | 75 75 70 6f 6c 6c 20 2d | . |uupoll -|
|00001200| 63 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |c | |
|00001210| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001220| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001230| 20 20 20 20 20 20 20 20 | 20 0a 20 20 20 20 75 75 | | . uu|
|00001240| 70 6f 6c 6c 20 5b 2d 64 | 20 6e 5d 20 5b 2d 72 7c |poll [-d| n] [-r||
|00001250| 6c 5d 20 5b 2d 70 20 73 | 70 6f 6f 6c 5f 70 61 74 |l] [-p s|pool_pat|
|00001260| 68 5d 20 73 79 73 6e 61 | 6d 65 31 20 5b 73 79 73 |h] sysna|me1 [sys|
|00001270| 6e 61 6d 65 32 20 2e 2e | 2e 5d 0a 0a 20 20 20 20 |name2 ..|.].. |
|00001280| 20 20 20 3f 20 20 20 20 | 20 20 20 20 20 20 20 20 | ? | |
|00001290| 20 20 2d 2d 20 20 70 72 | 69 6e 74 20 74 68 69 73 | -- pr|int this|
|000012a0| 20 6d 65 73 73 61 67 65 | 2c 20 20 20 20 20 20 20 | message|, |
|000012b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000012c0| 20 20 20 20 0a 20 20 20 | 20 20 20 20 2d 63 20 20 | . | -c |
|000012d0| 20 20 20 20 20 20 20 20 | 20 20 20 2d 2d 20 20 63 | | -- c|
|000012e0| 6c 65 61 6e 20 75 70 20 | 65 78 70 69 72 65 64 20 |lean up |expired |
|000012f0| 70 6f 6c 6c 20 66 69 6c | 65 73 20 20 20 20 20 20 |poll fil|es |
|00001300| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 0a 20 20 | | . |
|00001310| 20 20 20 20 20 2d 64 20 | 6e 20 20 20 20 20 20 20 | -d |n |
|00001320| 20 20 20 20 2d 2d 20 20 | 65 78 70 69 72 65 20 70 | -- |expire p|
|00001330| 6f 6c 6c 20 66 69 6c 65 | 20 69 6e 20 6e 20 64 61 |oll file| in n da|
|00001340| 79 73 20 28 64 65 66 61 | 75 6c 74 20 69 73 20 37 |ys (defa|ult is 7|
|00001350| 29 2c 20 20 20 20 0a 20 | 20 20 20 20 20 20 2d 72 |), . | -r|
|00001360| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 2d 2d 20 | | -- |
|00001370| 20 72 65 6d 6f 76 65 20 | 70 6f 6c 6c 20 66 69 6c | remove |poll fil|
|00001380| 65 73 20 66 6f 72 20 6e | 61 6d 65 64 20 73 79 73 |es for n|amed sys|
|00001390| 74 65 6d 73 20 20 20 20 | 20 20 20 20 20 20 20 0a |tems | .|
|000013a0| 20 20 20 20 20 20 20 2d | 6c 20 20 20 20 20 20 20 | -|l |
|000013b0| 20 20 20 20 20 20 2d 2d | 20 20 6c 69 73 74 20 70 | --| list p|
|000013c0| 6f 6c 6c 20 66 69 6c 65 | 73 20 66 6f 72 20 6e 61 |oll file|s for na|
|000013d0| 6d 65 64 20 73 79 73 74 | 65 6d 73 20 20 20 20 20 |med syst|ems |
|000013e0| 20 20 20 20 20 20 20 20 | 0a 20 20 20 20 20 20 20 | |. |
|000013f0| 2d 70 20 73 70 6f 6f 6c | 5f 70 61 74 68 20 20 2d |-p spool|_path -|
|00001400| 2d 20 20 6d 61 6b 65 20 | 73 70 6f 6f 6c 5f 64 69 |- make |spool_di|
|00001410| 72 20 61 6c 74 65 72 6e | 61 74 65 20 70 6f 6c 6c |r altern|ate poll|
|00001420| 69 6e 67 20 70 61 74 68 | 20 20 20 20 20 20 20 20 |ing path| |
|00001430| 20 0a 20 20 20 20 20 20 | 20 2d 78 20 20 20 20 20 | . | -x |
|00001440| 20 20 20 20 20 20 20 20 | 2d 2d 20 20 63 61 75 73 | |-- caus|
|00001450| 65 20 75 75 63 69 63 6f | 20 74 6f 20 70 72 6f 64 |e uucico| to prod|
|00001460| 75 63 65 20 64 65 62 75 | 67 20 6f 75 74 70 75 74 |uce debu|g output|
|00001470| 20 28 2d 78 39 29 20 20 | 20 20 0a 0a 44 45 53 43 | (-x9) | ..DESC|
|00001480| 52 49 50 54 49 4f 4e 0a | 20 20 20 20 55 75 70 6f |RIPTION.| Uupo|
|00001490| 6c 6c 20 73 79 73 6e 61 | 6d 65 20 63 72 65 61 74 |ll sysna|me creat|
|000014a0| 65 73 20 61 20 66 69 6c | 65 20 50 2e 73 79 73 6e |es a fil|e P.sysn|
|000014b0| 61 6d 65 20 69 6e 20 74 | 68 65 20 73 70 6f 6f 6c |ame in t|he spool|
|000014c0| 20 64 69 72 65 63 74 6f | 72 79 20 6e 61 6d 65 64 | directo|ry named|
|000014d0| 0a 20 20 20 20 69 6e 20 | 2d 70 20 73 70 6f 6f 6c |. in |-p spool|
|000014e0| 5f 70 61 74 68 20 28 20 | 64 65 66 61 75 6c 74 20 |_path ( |default |
|000014f0| 69 73 20 2f 75 73 72 2f | 73 70 6f 6f 6c 2f 75 75 |is /usr/|spool/uu|
|00001500| 63 70 20 29 2e 0a 0a 20 | 20 20 20 54 68 65 20 63 |cp )... | The c|
|00001510| 6f 6e 74 65 6e 74 73 20 | 6f 66 20 74 68 65 20 70 |ontents |of the p|
|00001520| 6f 6c 6c 20 66 69 6c 65 | 20 61 72 65 20 73 69 6d |oll file| are sim|
|00001530| 70 79 3a 20 44 20 6e 6e | 2e 20 20 48 65 72 65 20 |py: D nn|. Here |
|00001540| 6e 6e 20 69 73 20 74 68 | 65 20 6e 75 6d 62 65 72 |nn is th|e number|
|00001550| 0a 20 20 20 20 6f 66 20 | 69 6e 76 6f 63 61 74 69 |. of |invocati|
|00001560| 6f 6e 20 6f 66 20 75 75 | 70 6f 6c 6c 20 2d 63 20 |on of uu|poll -c |
|00001570| 61 63 72 6f 73 73 20 77 | 68 69 63 68 20 74 68 65 |across w|hich the|
|00001580| 20 70 6f 6c 6c 20 66 69 | 6c 65 20 77 69 6c 6c 20 | poll fi|le will |
|00001590| 73 75 72 76 69 76 65 2e | 0a 20 20 20 20 61 74 20 |survive.|. at |
|000015a0| 70 72 65 73 65 6e 74 20 | 74 68 65 20 64 65 66 61 |present |the defa|
|000015b0| 75 6c 74 20 66 6f 72 20 | 6e 6e 20 69 73 20 30 33 |ult for |nn is 03|
|000015c0| 2e 20 20 41 74 20 65 61 | 63 68 20 63 61 6c 6c 20 |. At ea|ch call |
|000015d0| 6f 66 20 75 75 70 6f 6c | 6c 20 2d 63 2c 20 61 6c |of uupol|l -c, al|
|000015e0| 6c 0a 20 20 20 20 70 6f | 6c 6c 20 66 69 6c 65 73 |l. po|ll files|
|000015f0| 20 68 61 76 65 20 74 68 | 65 20 6e 75 6d 62 65 72 | have th|e number|
|00001600| 20 6e 6e 20 64 65 63 72 | 65 6d 65 6e 74 65 64 20 | nn decr|emented |
|00001610| 62 79 20 6f 6e 65 2e 20 | 20 57 68 65 6e 20 30 20 |by one. | When 0 |
|00001620| 69 73 20 72 65 61 63 68 | 65 64 0a 20 20 20 20 74 |is reach|ed. t|
|00001630| 68 65 20 70 6f 6c 6c 20 | 66 69 6c 65 20 69 73 20 |he poll |file is |
|00001640| 64 65 6c 65 74 65 64 2e | 0a 0a 20 20 20 20 55 75 |deleted.|.. Uu|
|00001650| 70 6f 6c 6c 20 77 69 74 | 68 20 6e 6f 20 61 72 67 |poll wit|h no arg|
|00001660| 75 6d 65 6e 74 73 20 73 | 65 61 72 63 68 65 73 20 |uments s|earches |
|00001670| 74 68 65 20 73 70 6f 6f | 6c 20 64 69 72 65 63 74 |the spoo|l direct|
|00001680| 6f 72 79 20 28 20 2d 70 | 20 73 70 6f 6f 6c 5f 70 |ory ( -p| spool_p|
|00001690| 61 74 68 20 29 0a 20 20 | 20 20 66 6f 72 20 66 69 |ath ). | for fi|
|000016a0| 6c 65 73 20 6f 66 20 74 | 68 65 20 66 6f 72 6d 20 |les of t|he form |
|000016b0| 50 2e 73 79 73 6e 61 6d | 65 20 61 6e 64 20 74 68 |P.sysnam|e and th|
|000016c0| 65 20 69 6e 69 74 69 61 | 74 65 73 20 61 20 70 6f |e initia|tes a po|
|000016d0| 6c 6c 20 74 6f 20 74 68 | 6f 73 65 20 66 69 6c 65 |ll to th|ose file|
|000016e0| 73 0a 20 20 20 20 76 69 | 61 20 75 75 63 69 63 6f |s. vi|a uucico|
|000016f0| 2e 20 20 54 68 65 20 2d | 78 20 73 77 69 74 63 68 |. The -|x switch|
|00001700| 20 63 61 75 73 65 73 20 | 75 75 63 69 63 6f 20 64 | causes |uucico d|
|00001710| 65 62 75 67 20 2d 78 39 | 20 20 6f 75 74 70 75 74 |ebug -x9| output|
|00001720| 20 74 6f 20 67 6f 20 74 | 6f 0a 20 20 20 20 73 74 | to go t|o. st|
|00001730| 61 6e 64 61 72 64 20 6f | 75 74 2e 20 54 68 65 20 |andard o|ut. The |
|00001740| 63 6f 6e 6e 65 63 74 69 | 6f 6e 20 69 73 20 6d 6f |connecti|on is mo|
|00001750| 6e 69 74 6f 72 65 64 20 | 76 69 61 20 74 68 65 20 |nitored |via the |
|00001760| 75 75 73 74 61 74 20 63 | 6f 6d 6d 61 6e 64 20 61 |uustat c|ommand a|
|00001770| 6e 64 0a 20 20 20 20 69 | 66 20 43 4f 4e 56 45 52 |nd. i|f CONVER|
|00001780| 53 41 54 49 4f 4e 20 43 | 4f 4d 50 4c 45 54 45 20 |SATION C|OMPLETE |
|00001790| 69 73 20 72 65 74 75 72 | 6e 65 64 2c 20 74 68 65 |is retur|ned, the|
|000017a0| 20 50 2e 73 79 73 6e 61 | 6d 65 20 66 69 6c 65 20 | P.sysna|me file |
|000017b0| 69 73 20 64 65 6c 65 74 | 65 64 0a 20 20 20 20 66 |is delet|ed. f|
|000017c0| 72 6f 6d 20 74 68 65 20 | 73 70 6f 6f 6c 20 64 69 |rom the |spool di|
|000017d0| 72 65 63 74 6f 72 79 2e | 0a 0a 20 20 20 20 54 68 |rectory.|.. Th|
|000017e0| 65 20 2d 72 20 6f 70 74 | 69 6f 6e 20 72 65 6d 6f |e -r opt|ion remo|
|000017f0| 76 65 73 20 74 68 65 20 | 73 70 6f 6c 6c 20 66 69 |ves the |spoll fi|
|00001800| 6c 65 20 61 6e 64 20 74 | 68 65 20 2d 6c 20 6f 70 |le and t|he -l op|
|00001810| 74 69 6f 6e 20 6c 69 73 | 74 73 20 74 68 65 0a 20 |tion lis|ts the. |
|00001820| 20 20 20 70 6f 6c 6c 20 | 66 69 6c 65 73 2e 20 20 | poll |files. |
|00001830| 45 61 63 68 20 63 61 6e | 20 74 61 6b 65 20 74 68 |Each can| take th|
|00001840| 65 20 61 72 67 75 6d 65 | 6e 74 20 27 61 6c 6c 27 |e argume|nt 'all'|
|00001850| 20 69 6e 73 74 65 61 64 | 20 6f 66 20 27 73 79 73 | instead| of 'sys|
|00001860| 6e 61 6d 65 27 2e 0a 20 | 20 20 20 4e 6f 20 77 69 |name'.. | No wi|
|00001870| 6c 64 20 63 61 72 64 73 | 20 61 72 65 20 70 65 72 |ld cards| are per|
|00001880| 6d 69 74 74 65 64 20 68 | 6f 77 65 76 65 72 2e 0a |mitted h|owever..|
|00001890| 0a 0a 46 49 4c 45 53 0a | 20 20 20 20 50 2e 73 79 |..FILES.| P.sy|
|000018a0| 73 6e 61 6d 65 0a 0a 53 | 45 45 20 41 4c 53 4f 0a |sname..S|EE ALSO.|
|000018b0| 20 20 20 20 75 75 63 69 | 63 6f 28 31 29 0a 0a 42 | uuci|co(1)..B|
|000018c0| 55 47 53 0a 20 20 20 20 | 54 68 65 20 6e 75 6d 62 |UGS. |The numb|
|000018d0| 65 72 20 69 6e 20 74 68 | 65 20 70 6f 6c 6c 20 66 |er in th|e poll f|
|000018e0| 69 6c 65 20 77 68 69 63 | 68 20 72 65 70 72 65 73 |ile whic|h repres|
|000018f0| 65 6e 74 73 20 65 78 70 | 69 72 61 74 69 6f 6e 20 |ents exp|iration |
|00001900| 69 73 0a 20 20 20 20 6e | 6f 74 20 72 65 61 6c 6c |is. n|ot reall|
|00001910| 79 20 69 6e 20 75 6e 69 | 74 73 20 6f 66 20 64 61 |y in uni|ts of da|
|00001920| 79 73 2c 20 62 75 74 20 | 72 61 74 68 65 72 20 69 |ys, but |rather i|
|00001930| 6e 20 75 6e 69 74 73 20 | 6f 66 20 69 6e 76 6f 63 |n units |of invoc|
|00001940| 61 74 69 6f 6e 73 0a 20 | 20 20 20 6f 66 20 22 75 |ations. | of "u|
|00001950| 75 70 6f 6c 6c 20 2d 63 | 22 2e 20 20 49 66 20 68 |upoll -c|". If h|
|00001960| 6f 77 65 76 65 72 2c 20 | 74 68 69 73 20 69 73 20 |owever, |this is |
|00001970| 65 78 65 63 75 74 65 64 | 20 6f 6e 63 65 20 70 65 |executed| once pe|
|00001980| 72 20 64 61 79 20 74 68 | 65 6e 20 74 68 65 0a 20 |r day th|en the. |
|00001990| 20 20 20 6e 75 6d 62 65 | 72 20 6d 61 70 73 20 74 | numbe|r maps t|
|000019a0| 6f 20 64 61 79 73 2e 20 | 0a 0a 45 58 41 4d 50 4c |o days. |..EXAMPL|
|000019b0| 45 0a 20 20 20 20 54 68 | 65 20 66 6f 6c 6c 6f 77 |E. Th|e follow|
|000019c0| 69 6e 67 20 63 72 6f 6e | 74 61 62 20 65 6e 74 72 |ing cron|tab entr|
|000019d0| 69 65 73 20 77 69 6c 6c | 20 63 61 75 73 65 20 73 |ies will| cause s|
|000019e0| 79 73 74 65 6d 20 61 61 | 61 20 74 6f 20 62 65 0a |ystem aa|a to be.|
|000019f0| 20 20 20 20 70 6f 6c 6c | 65 64 20 74 77 69 63 65 | poll|ed twice|
|00001a00| 20 61 20 64 61 79 20 61 | 74 20 38 20 61 2e 6d 2e | a day a|t 8 a.m.|
|00001a10| 20 61 6e 64 20 35 20 70 | 2e 6d 2e 20 61 6e 64 20 | and 5 p|.m. and |
|00001a20| 73 79 73 74 65 6d 20 62 | 62 62 20 74 6f 20 0a 20 |system b|bb to . |
|00001a30| 20 20 20 62 65 20 70 6f | 6c 6c 65 64 20 61 74 20 | be po|lled at |
|00001a40| 31 30 20 61 2e 6d 2e 20 | 61 6e 64 20 33 20 70 2e |10 a.m. |and 3 p.|
|00001a50| 6d 2e 20 20 54 68 65 20 | 73 79 73 74 65 6d 20 73 |m. The |system s|
|00001a60| 70 65 63 69 66 69 63 20 | 65 6e 74 72 69 65 73 0a |pecific |entries.|
|00001a70| 20 20 20 20 63 61 6e 20 | 61 70 70 65 61 72 20 69 | can |appear i|
|00001a80| 6e 20 61 6e 79 20 75 73 | 65 72 27 73 20 63 72 6f |n any us|er's cro|
|00001a90| 6e 74 61 62 2c 20 62 75 | 74 20 74 68 65 20 70 6f |ntab, bu|t the po|
|00001aa0| 6c 6c 69 6e 67 20 65 6e | 74 72 79 20 28 69 2e 65 |lling en|try (i.e|
|00001ab0| 2e 0a 20 20 20 20 74 68 | 65 20 68 6f 75 72 6c 79 |.. th|e hourly|
|00001ac0| 20 70 6f 6c 6c 65 72 20 | 77 69 68 74 20 6e 6f 20 | poller |wiht no |
|00001ad0| 61 72 67 75 6d 65 6e 74 | 73 20 73 68 6f 75 6c 64 |argument|s should|
|00001ae0| 20 62 65 20 69 6e 20 74 | 68 65 20 75 75 63 70 20 | be in t|he uucp |
|00001af0| 63 72 6f 6e 74 61 62 2e | 0a 20 20 20 20 41 6c 73 |crontab.|. Als|
|00001b00| 6f 20 74 68 65 20 74 69 | 6d 65 20 73 68 6f 75 6c |o the ti|me shoul|
|00001b10| 64 20 6e 6f 74 20 63 6f | 6e 66 69 63 74 20 77 69 |d not co|nfict wi|
|00001b20| 74 68 20 74 68 65 20 72 | 65 67 75 6c 61 72 6c 79 |th the r|egularly|
|00001b30| 20 73 63 68 65 64 75 6c | 65 64 20 75 75 63 70 0a | schedul|ed uucp.|
|00001b40| 20 20 20 20 64 65 6d 6f | 6e 20 73 75 63 68 20 61 | demo|n such a|
|00001b50| 73 20 75 75 64 65 6d 6f | 6e 2e 68 72 2e 20 20 54 |s uudemo|n.hr. T|
|00001b60| 68 65 20 63 6c 65 61 6e | 75 70 20 75 75 70 6f 6c |he clean|up uupol|
|00001b70| 6c 20 2d 63 20 73 68 6f | 75 6c 64 20 62 65 20 69 |l -c sho|uld be i|
|00001b80| 6e 20 74 68 65 0a 20 20 | 20 20 72 6f 6f 74 20 63 |n the. | root c|
|00001b90| 72 6f 6e 74 61 62 20 73 | 69 6e 63 65 20 69 74 20 |rontab s|ince it |
|00001ba0| 6d 75 73 74 20 68 61 76 | 65 20 70 65 72 6d 69 73 |must hav|e permis|
|00001bb0| 73 69 6f 6e 20 74 6f 20 | 64 65 6c 65 74 65 20 74 |sion to |delete t|
|00001bc0| 68 65 20 65 78 70 69 72 | 65 64 0a 20 20 20 20 70 |he expir|ed. p|
|00001bd0| 6f 6c 6c 20 66 69 6c 65 | 73 20 6f 66 20 61 6e 79 |oll file|s of any|
|00001be0| 20 75 73 65 72 2e 0a 23 | 0a 23 20 20 20 48 61 76 | user..#|.# Hav|
|00001bf0| 65 20 70 6f 6c 6c 20 66 | 6f 72 20 73 79 73 74 65 |e poll f|or syste|
|00001c00| 6d 20 61 61 61 20 6f 6e | 20 68 61 6e 64 20 61 74 |m aaa on| hand at|
|00001c10| 20 38 20 61 6e 64 20 35 | 20 61 6e 64 0a 23 20 20 | 8 and 5| and.# |
|00001c20| 20 66 6f 72 20 62 62 62 | 20 61 74 20 31 30 20 61 | for bbb| at 10 a|
|00001c30| 6e 64 20 33 2e 0a 23 0a | 35 35 20 37 2c 31 36 20 |nd 3..#.|55 7,16 |
|00001c40| 2a 20 2a 20 30 2d 36 20 | 2f 75 73 72 2f 62 69 6e |* * 0-6 |/usr/bin|
|00001c50| 2f 75 75 70 6f 6c 6c 20 | 61 61 61 20 3e 20 2f 64 |/uupoll |aaa > /d|
|00001c60| 65 76 2f 6e 75 6c 6c 0a | 35 35 20 39 2c 31 34 20 |ev/null.|55 9,14 |
|00001c70| 2a 20 2a 20 30 2d 36 20 | 2f 75 73 72 2f 62 69 6e |* * 0-6 |/usr/bin|
|00001c80| 2f 75 75 70 6f 6c 6c 20 | 62 62 62 20 3e 20 2f 64 |/uupoll |bbb > /d|
|00001c90| 65 76 2f 6e 75 6c 6c 0a | 23 0a 23 20 20 20 43 61 |ev/null.|#.# Ca|
|00001ca0| 75 73 65 20 70 6f 6c 6c | 73 20 74 6f 20 62 65 20 |use poll|s to be |
|00001cb0| 69 73 73 75 65 64 20 6f | 6e 20 74 68 65 20 68 6f |issued o|n the ho|
|00001cc0| 75 72 20 66 6f 72 20 61 | 6c 6c 20 73 79 73 74 65 |ur for a|ll syste|
|00001cd0| 6d 73 20 77 69 74 68 20 | 6f 75 74 73 74 61 6e 64 |ms with |outstand|
|00001ce0| 69 6e 67 0a 23 20 20 20 | 70 6f 6c 6c 20 66 69 6c |ing.# |poll fil|
|00001cf0| 65 73 2e 0a 23 0a 30 30 | 20 2a 20 2a 20 2a 20 30 |es..#.00| * * * 0|
|00001d00| 2d 36 20 2f 75 73 72 2f | 62 69 6e 2f 75 75 70 6f |-6 /usr/|bin/uupo|
|00001d10| 6c 6c 20 3e 20 2f 64 65 | 76 2f 6e 75 6c 6c 0a 23 |ll > /de|v/null.#|
|00001d20| 0a 23 20 20 20 44 65 63 | 72 65 6d 65 6e 74 20 70 |.# Dec|rement p|
|00001d30| 6f 6c 6c 73 20 65 61 63 | 68 20 64 61 79 20 66 6f |olls eac|h day fo|
|00001d40| 72 20 65 78 70 69 72 61 | 74 69 6f 6e 20 70 75 72 |r expira|tion pur|
|00001d50| 70 6f 73 65 73 2e 0a 23 | 0a 30 20 31 30 20 2a 20 |poses..#|.0 10 * |
|00001d60| 2a 20 2a 20 2f 75 73 72 | 2f 62 69 6e 2f 75 75 70 |* * /usr|/bin/uup|
|00001d70| 6f 6c 6c 20 2d 63 20 3e | 20 2f 64 65 76 2f 6e 75 |oll -c >| /dev/nu|
|00001d80| 6c 6c 0a 0a 2a 2f 0a 0c | 0a 0a 23 69 6e 63 6c 75 |ll..*/..|..#inclu|
|00001d90| 64 65 20 3c 73 74 64 69 | 6f 2e 68 3e 0a 23 69 6e |de <stdi|o.h>.#in|
|00001da0| 63 6c 75 64 65 20 3c 66 | 63 6e 74 6c 2e 68 3e 0a |clude <f|cntl.h>.|
|00001db0| 23 69 6e 63 6c 75 64 65 | 20 3c 73 79 73 2f 74 79 |#include| <sys/ty|
|00001dc0| 70 65 73 2e 68 3e 0a 23 | 69 6e 63 6c 75 64 65 20 |pes.h>.#|include |
|00001dd0| 3c 73 79 73 2f 64 69 72 | 2e 68 3e 0a 0a 23 64 65 |<sys/dir|.h>..#de|
|00001de0| 66 69 6e 65 20 54 52 55 | 45 20 20 20 20 20 20 20 |fine TRU|E |
|00001df0| 20 20 20 20 31 3d 3d 31 | 0a 23 64 65 66 69 6e 65 | 1==1|.#define|
|00001e00| 20 46 41 4c 53 45 20 20 | 20 20 20 20 20 20 20 20 | FALSE | |
|00001e10| 21 54 52 55 45 0a 23 64 | 65 66 69 6e 65 20 43 48 |!TRUE.#d|efine CH|
|00001e20| 49 4c 44 20 20 20 20 20 | 20 20 20 20 20 63 61 73 |ILD | cas|
|00001e30| 65 20 30 0a 23 64 65 66 | 69 6e 65 20 50 41 52 45 |e 0.#def|ine PARE|
|00001e40| 4e 54 20 20 20 20 20 20 | 20 20 20 64 65 66 61 75 |NT | defau|
|00001e50| 6c 74 0a 23 64 65 66 69 | 6e 65 20 52 57 5f 52 5f |lt.#defi|ne RW_R_|
|00001e60| 5f 52 5f 5f 20 20 20 20 | 20 20 30 31 33 33 0a 0a |_R__ | 0133..|
|00001e70| 63 68 61 72 20 2a 75 73 | 61 67 65 20 3d 20 22 20 |char *us|age = " |
|00001e80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001e90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001ea0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001eb0| 20 20 20 20 20 20 20 20 | 5c 5c 6e 5c 5c 0a 55 73 | |\\n\\.Us|
|00001ec0| 61 67 65 3a 20 75 75 70 | 6f 6c 6c 20 3f 20 20 20 |age: uup|oll ? |
|00001ed0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001ee0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001ef0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001f00| 20 20 20 20 20 20 5c 5c | 6e 5c 5c 0a 20 20 20 20 | \\|n\\. |
|00001f10| 20 20 20 75 75 70 6f 6c | 6c 20 2d 63 20 20 20 20 | uupol|l -c |
|00001f20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001f30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001f40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001f50| 20 20 20 20 5c 5c 6e 5c | 5c 0a 20 20 20 20 20 20 | \\n\|\. |
|00001f60| 20 75 75 70 6f 6c 6c 20 | 5b 2d 64 20 6e 5d 20 5b | uupoll |[-d n] [|
|00001f70| 2d 72 7c 6c 5d 20 73 79 | 73 6e 61 6d 65 20 20 20 |-r|l] sy|sname |
|00001f80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001f90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001fa0| 20 20 5c 5c 6e 5c 5c 0a | 20 20 20 20 20 20 20 75 | \\n\\.| u|
|00001fb0| 75 70 6f 6c 6c 20 5b 2d | 70 20 73 70 6f 6f 6c 5f |upoll [-|p spool_|
|00001fc0| 70 61 74 68 5d 20 5b 2d | 78 5d 20 20 20 20 20 20 |path] [-|x] |
|00001fd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001fe0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001ff0| 5c 5c 6e 5c 5c 0a 20 20 | 20 20 20 20 20 20 20 20 |\\n\\. | |
|00002000| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002010| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002020| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002030| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 5c 5c | | \\|
|00002040| 6e 5c 5c 0a 20 20 20 20 | 20 20 20 3f 20 20 20 20 |n\\. | ? |
|00002050| 20 20 20 20 20 20 20 20 | 20 20 2d 2d 20 20 70 72 | | -- pr|
|00002060| 69 6e 74 20 74 68 69 73 | 20 6d 65 73 73 61 67 65 |int this| message|
|00002070| 2c 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |, | |
|00002080| 20 20 20 20 20 20 20 20 | 20 20 20 20 5c 5c 6e 5c | | \\n\|
|00002090| 5c 0a 20 20 20 20 20 20 | 20 2d 63 20 20 20 20 20 |\. | -c |
|000020a0| 20 20 20 20 20 20 20 20 | 2d 2d 20 20 63 6c 65 61 | |-- clea|
|000020b0| 6e 20 75 70 20 65 78 70 | 69 72 65 64 20 70 6f 6c |n up exp|ired pol|
|000020c0| 6c 20 66 69 6c 65 73 20 | 20 20 20 20 20 20 20 20 |l files | |
|000020d0| 20 20 20 20 20 20 20 20 | 20 20 5c 5c 6e 5c 5c 0a | | \\n\\.|
|000020e0| 20 20 20 20 20 20 20 2d | 64 20 6e 20 20 20 20 20 | -|d n |
|000020f0| 20 20 20 20 20 20 2d 2d | 20 20 65 78 70 69 72 65 | --| expire|
|00002100| 20 70 6f 6c 6c 20 66 69 | 6c 65 20 69 6e 20 6e 20 | poll fi|le in n |
|00002110| 64 61 79 73 20 28 64 65 | 66 61 75 6c 74 20 69 73 |days (de|fault is|
|00002120| 20 33 29 2c 20 20 20 20 | 5c 5c 6e 5c 5c 0a 20 20 | 3), |\\n\\. |
|00002130| 20 20 20 20 20 2d 72 20 | 20 20 20 20 20 20 20 20 | -r | |
|00002140| 20 20 20 20 2d 2d 20 20 | 72 65 6d 6f 76 65 20 70 | -- |remove p|
|00002150| 6f 6c 6c 20 66 69 6c 65 | 73 20 66 6f 72 20 6e 61 |oll file|s for na|
|00002160| 6d 65 64 20 73 79 73 74 | 65 6d 73 20 20 20 20 20 |med syst|ems |
|00002170| 20 20 20 20 20 20 5c 5c | 6e 5c 5c 0a 20 20 20 20 | \\|n\\. |
|00002180| 20 20 20 2d 6c 20 20 20 | 20 20 20 20 20 20 20 20 | -l | |
|00002190| 20 20 2d 2d 20 20 6c 69 | 73 74 20 70 6f 6c 6c 20 | -- li|st poll |
|000021a0| 66 69 6c 65 73 20 66 6f | 72 20 6e 61 6d 65 64 20 |files fo|r named |
|000021b0| 73 79 73 74 65 6d 73 20 | 20 20 20 20 20 20 20 20 |systems | |
|000021c0| 20 20 20 20 5c 5c 6e 5c | 5c 0a 20 20 20 20 20 20 | \\n\|\. |
|000021d0| 20 2d 70 20 73 70 6f 6f | 6c 5f 70 61 74 68 20 20 | -p spoo|l_path |
|000021e0| 2d 2d 20 20 6d 61 6b 65 | 20 73 70 6f 6f 6c 5f 64 |-- make| spool_d|
|000021f0| 69 72 20 61 6c 74 65 72 | 6e 61 74 65 20 70 6f 6c |ir alter|nate pol|
|00002200| 6c 69 6e 67 20 70 61 74 | 68 20 20 20 20 20 20 20 |ling pat|h |
|00002210| 20 20 5c 5c 6e 5c 5c 0a | 20 20 20 20 20 20 20 2d | \\n\\.| -|
|00002220| 78 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2d 2d |x | --|
|00002230| 20 20 63 61 75 73 65 20 | 75 75 63 69 63 6f 20 74 | cause |uucico t|
|00002240| 6f 20 70 72 6f 64 75 63 | 65 20 64 65 62 75 67 20 |o produc|e debug |
|00002250| 6f 75 74 70 75 74 20 28 | 2d 78 39 29 20 20 20 20 |output (|-x9) |
|00002260| 5c 5c 6e 5c 5c 0a 22 3b | 0a 0a 63 68 61 72 0a 20 |\\n\\.";|..char. |
|00002270| 20 20 20 2a 67 65 74 70 | 6f 6c 6c 28 29 2c 20 20 | *getp|oll(), |
|00002280| 20 20 20 20 20 20 20 2f | 2a 20 72 65 74 75 72 6e | /|* return|
|00002290| 73 20 63 6f 6e 73 65 63 | 75 74 69 76 65 20 70 6f |s consec|utive po|
|000022a0| 6c 6c 20 66 69 6c 65 20 | 6e 61 6d 65 73 20 66 72 |ll file |names fr|
|000022b0| 6f 6d 20 73 70 6f 6f 6c | 64 69 72 20 2a 2f 0a 20 |om spool|dir */. |
|000022c0| 20 20 20 2a 63 75 73 65 | 72 69 64 28 29 3b 20 20 | *cuse|rid(); |
|000022d0| 20 20 20 20 20 20 20 2f | 2a 20 72 65 74 75 72 6e | /|* return|
|000022e0| 73 20 74 68 65 20 6c 6f | 67 69 6e 20 6e 61 6d 65 |s the lo|gin name|
|000022f0| 20 6f 66 20 70 72 6f 63 | 65 73 73 20 6f 77 6e 65 | of proc|ess owne|
|00002300| 72 20 2a 2f 0a 0a 46 49 | 4c 45 0a 20 20 20 20 2a |r */..FI|LE. *|
|00002310| 66 6f 70 65 6e 28 29 2c | 0a 20 20 20 20 2a 6d 6b |fopen(),|. *mk|
|00002320| 5f 70 6f 6c 6c 28 29 3b | 20 20 20 20 20 20 20 20 |_poll();| |
|00002330| 20 2f 2a 20 63 72 65 61 | 74 65 20 61 20 70 6f 6c | /* crea|te a pol|
|00002340| 6c 20 66 69 6c 65 20 50 | 2e 73 79 73 6e 61 6d 65 |l file P|.sysname|
|00002350| 20 2a 2f 0a 0a 6c 6f 6e | 67 0a 20 20 20 20 66 73 | */..lon|g. fs|
|00002360| 65 65 6b 28 29 3b 0a 0a | 69 6e 74 0a 20 20 20 20 |eek();..|int. |
|00002370| 69 73 5f 70 6f 6c 6c 28 | 29 3b 20 20 20 20 20 20 |is_poll(|); |
|00002380| 20 20 20 20 2f 2a 20 64 | 65 74 65 72 6d 69 6e 65 | /* d|etermine|
|00002390| 73 20 77 68 65 74 68 65 | 72 20 6f 72 20 6e 6f 74 |s whethe|r or not|
|000023a0| 20 70 6f 6c 6c 20 69 73 | 20 6f 75 74 73 74 61 6e | poll is| outstan|
|000023b0| 64 69 6e 67 20 2a 2f 0a | 0a 76 6f 69 64 0a 20 20 |ding */.|.void. |
|000023c0| 20 20 75 70 72 69 6e 74 | 28 29 2c 20 20 20 20 20 | uprint|(), |
|000023d0| 20 20 20 20 20 20 2f 2a | 20 6f 75 74 70 75 74 20 | /*| output |
|000023e0| 73 79 73 74 65 6d 20 6e | 61 6d 65 73 20 66 6f 72 |system n|ames for|
|000023f0| 20 70 6f 6c 6c 20 66 69 | 6c 65 73 20 2a 2f 0a 20 | poll fi|les */. |
|00002400| 20 20 20 75 75 6e 6c 69 | 6e 6b 28 29 2c 20 20 20 | uunli|nk(), |
|00002410| 20 20 20 20 20 20 20 2f | 2a 20 75 6e 6c 69 6e 6b | /|* unlink|
|00002420| 20 70 6f 6c 6c 20 66 69 | 6c 65 73 20 2a 2f 0a 20 | poll fi|les */. |
|00002430| 20 20 20 63 6c 65 61 6e | 5f 75 70 28 29 2c 20 20 | clean|_up(), |
|00002440| 20 20 20 20 20 20 20 2f | 2a 20 72 65 6d 6f 76 65 | /|* remove|
|00002450| 73 20 65 78 70 69 72 65 | 64 20 70 6f 6c 6c 73 20 |s expire|d polls |
|00002460| 66 72 6f 6d 20 73 70 6f | 6f 6c 20 64 69 72 20 2a |from spo|ol dir *|
|00002470| 2f 0a 20 20 20 20 70 6f | 6c 6c 28 29 3b 20 20 20 |/. po|ll(); |
|00002480| 20 20 20 20 20 20 20 20 | 20 20 2f 2a 20 70 6f 6c | | /* pol|
|00002490| 6c 73 20 74 68 65 20 6e | 61 6d 65 64 20 66 69 6c |ls the n|amed fil|
|000024a0| 65 20 66 6f 72 20 75 75 | 63 70 20 74 72 61 66 66 |e for uu|cp traff|
|000024b0| 69 63 20 20 2a 2f 0a 0a | 75 6e 73 69 67 6e 65 64 |ic */..|unsigned|
|000024c0| 20 69 6e 74 20 0a 20 20 | 20 20 64 61 79 73 20 3d | int . | days =|
|000024d0| 20 33 3b 20 20 20 20 20 | 20 20 20 20 20 20 2f 2a | 3; | /*|
|000024e0| 20 6e 75 6d 62 65 72 20 | 6f 66 20 64 61 79 73 20 | number |of days |
|000024f0| 69 6e 20 77 68 69 63 68 | 20 70 6f 6c 6c 20 65 78 |in which| poll ex|
|00002500| 70 69 72 65 73 20 2a 2f | 0a 20 20 20 20 63 6c 65 |pires */|. cle|
|00002510| 61 6e 20 3d 20 46 41 4c | 53 45 2c 20 20 20 20 20 |an = FAL|SE, |
|00002520| 20 2f 2a 20 63 6c 65 61 | 6e 20 75 70 20 65 78 70 | /* clea|n up exp|
|00002530| 69 72 65 64 20 70 6f 6c | 6c 73 20 2a 2f 0a 20 20 |ired pol|ls */. |
|00002540| 20 20 72 65 6d 6f 76 65 | 20 3d 20 46 41 4c 53 45 | remove| = FALSE|
|00002550| 2c 20 20 20 20 20 2f 2a | 20 43 61 6e 63 65 6c 20 |, /*| Cancel |
|00002560| 6f 75 74 73 74 61 6e 64 | 69 6e 67 20 70 6f 6c 6c |outstand|ing poll|
|00002570| 73 20 2a 2f 0a 20 20 20 | 20 75 64 62 67 20 3d 20 |s */. | udbg = |
|00002580| 46 41 4c 53 45 2c 20 20 | 20 20 20 20 20 2f 2a 20 |FALSE, | /* |
|00002590| 73 65 74 20 64 65 62 75 | 67 20 66 6c 61 67 20 28 |set debu|g flag (|
|000025a0| 2d 78 39 29 20 69 6e 20 | 75 75 63 69 63 6f 20 63 |-x9) in |uucico c|
|000025b0| 61 6c 6c 20 2a 2f 0a 20 | 20 20 20 6c 69 73 74 20 |all */. | list |
|000025c0| 3d 20 46 41 4c 53 45 3b | 20 20 20 20 20 20 20 2f |= FALSE;| /|
|000025d0| 2a 20 6c 69 73 74 20 6f | 75 74 73 74 61 6e 64 69 |* list o|utstandi|
|000025e0| 6e 67 20 70 6f 6c 6c 73 | 20 20 20 2a 2f 0a 0a 63 |ng polls| */..c|
|000025f0| 68 61 72 20 0a 20 20 20 | 20 73 70 6f 6f 6c 70 61 |har . | spoolpa|
|00002600| 74 68 5b 33 30 5d 20 3d | 20 22 2f 75 73 72 2f 73 |th[30] =| "/usr/s|
|00002610| 70 6f 6f 6c 2f 75 75 63 | 70 22 3b 20 20 2f 2a 20 |pool/uuc|p"; /* |
|00002620| 64 69 72 65 63 74 6f 72 | 79 20 74 6f 20 70 6c 61 |director|y to pla|
|00002630| 63 65 20 70 6f 6c 6c 20 | 66 69 6c 65 73 20 2a 2f |ce poll |files */|
|00002640| 0a 0a 6d 61 69 6e 28 20 | 61 72 67 63 2c 20 61 72 |..main( |argc, ar|
|00002650| 67 76 20 29 0a 69 6e 74 | 20 61 72 67 63 3b 20 63 |gv ).int| argc; c|
|00002660| 68 61 72 20 2a 2a 61 72 | 67 76 3b 0a 20 20 20 20 |har **ar|gv;. |
|00002670| 7b 0a 20 20 20 20 65 78 | 74 65 72 6e 20 69 6e 74 |{. ex|tern int|
|00002680| 20 6f 70 74 69 6e 64 3b | 0a 20 20 20 20 65 78 74 | optind;|. ext|
|00002690| 65 72 6e 20 63 68 61 72 | 20 2a 6f 70 74 61 72 67 |ern char| *optarg|
|000026a0| 3b 0a 20 20 20 20 69 6e | 74 20 6f 70 74 2c 20 67 |;. in|t opt, g|
|000026b0| 65 74 6f 70 74 28 29 2c | 20 69 3b 0a 20 20 20 20 |etopt(),| i;. |
|000026c0| 75 6e 73 69 67 6e 65 64 | 20 69 6e 74 20 74 6f 5f |unsigned| int to_|
|000026d0| 70 6f 6c 6c 3d 54 52 55 | 45 3b 0a 0a 20 20 20 20 |poll=TRU|E;.. |
|000026e0| 2f 2a 0a 20 20 20 20 2a | 2a 20 20 20 20 20 20 49 |/*. *|* I|
|000026f0| 73 20 68 65 6c 70 20 62 | 65 69 6e 67 20 72 65 71 |s help b|eing req|
|00002700| 75 65 73 74 65 64 3f 3f | 0a 20 20 20 20 2a 2f 0a |uested??|. */.|
|00002710| 20 20 20 20 69 66 28 20 | 61 72 67 76 5b 31 5d 5b | if( |argv[1][|
|00002720| 30 5d 20 3d 3d 20 27 3f | 27 20 29 0a 20 20 20 20 |0] == '?|' ). |
|00002730| 20 20 20 20 7b 0a 20 20 | 20 20 20 20 20 20 66 70 | {. | fp|
|00002740| 72 69 6e 74 66 28 20 73 | 74 64 65 72 72 2c 20 75 |rintf( s|tderr, u|
|00002750| 73 61 67 65 20 29 3b 0a | 20 20 20 20 20 20 20 20 |sage );.| |
|00002760| 65 78 69 74 28 30 29 3b | 0a 20 20 20 20 20 20 20 |exit(0);|. |
|00002770| 20 7d 0a 0a 20 20 20 20 | 2f 2a 0a 20 20 20 20 2a | }.. |/*. *|
|00002780| 2a 20 20 20 20 20 20 45 | 78 61 6d 69 6e 65 20 74 |* E|xamine t|
|00002790| 68 65 20 63 6f 6d 6d 61 | 6e 64 20 6c 69 6e 65 20 |he comma|nd line |
|000027a0| 6f 70 74 69 6f 6e 73 2e | 0a 20 20 20 20 2a 2f 0a |options.|. */.|
|000027b0| 20 20 20 20 77 68 69 6c | 65 28 20 28 20 6f 70 74 | whil|e( ( opt|
|000027c0| 20 3d 20 67 65 74 6f 70 | 74 28 20 61 72 67 63 2c | = getop|t( argc,|
|000027d0| 20 61 72 67 76 2c 20 22 | 63 78 64 3a 6c 70 3a 72 | argv, "|cxd:lp:r|
|000027e0| 22 20 29 20 20 29 20 21 | 3d 20 45 4f 46 20 29 0a |" ) ) !|= EOF ).|
|000027f0| 20 20 20 20 20 20 20 20 | 7b 0a 20 20 20 20 20 20 | |{. |
|00002800| 20 20 73 77 69 74 63 68 | 20 28 20 6f 70 74 20 29 | switch| ( opt )|
|00002810| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 7b 0a 20 |. | {. |
|00002820| 20 20 20 20 20 20 20 20 | 20 20 20 63 61 73 65 20 | | case |
|00002830| 27 63 27 3a 0a 20 20 20 | 20 20 20 20 20 20 20 20 |'c':. | |
|00002840| 20 69 66 28 20 6c 69 73 | 74 20 7c 7c 20 72 65 6d | if( lis|t || rem|
|00002850| 6f 76 65 20 29 0a 20 20 | 20 20 20 20 20 20 20 20 |ove ). | |
|00002860| 20 20 20 20 20 20 7b 0a | 20 20 20 20 20 20 20 20 | {.| |
|00002870| 20 20 20 20 20 20 20 20 | 66 70 72 69 6e 74 66 28 | |fprintf(|
|00002880| 20 73 74 64 65 72 72 2c | 0a 20 20 20 20 20 20 20 | stderr,|. |
|00002890| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000028a0| 20 20 22 75 75 70 6f 6c | 6c 3a 20 69 6e 63 6f 6e | "uupol|l: incon|
|000028b0| 73 69 73 74 61 6e 74 20 | 73 77 69 74 63 68 20 73 |sistant |switch s|
|000028c0| 70 65 63 69 66 69 63 61 | 74 69 6f 6e 5c 5c 6e 22 |pecifica|tion\\n"|
|000028d0| 20 29 3b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 | );. | |
|000028e0| 20 20 20 20 67 6f 74 6f | 20 64 65 66 61 75 6c 74 | goto| default|
|000028f0| 5f 63 61 73 65 3b 0a 20 | 20 20 20 20 20 20 20 20 |_case;. | |
|00002900| 20 20 20 20 20 20 20 7d | 0a 0a 20 20 20 20 20 20 | }|.. |
|00002910| 20 20 20 20 20 20 63 6c | 65 61 6e 20 3d 20 54 52 | cl|ean = TR|
|00002920| 55 45 3b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |UE;. | |
|00002930| 74 6f 5f 70 6f 6c 6c 20 | 3d 20 46 41 4c 53 45 3b |to_poll |= FALSE;|
|00002940| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 62 72 65 |. | bre|
|00002950| 61 6b 3b 0a 0a 20 20 20 | 20 20 20 20 20 20 20 20 |ak;.. | |
|00002960| 20 63 61 73 65 20 27 64 | 27 3a 0a 20 20 20 20 20 | case 'd|':. |
|00002970| 20 20 20 20 20 20 20 69 | 66 28 20 73 73 63 61 6e | i|f( sscan|
|00002980| 66 28 20 6f 70 74 61 72 | 67 2c 20 22 25 64 22 2c |f( optar|g, "%d",|
|00002990| 20 26 64 61 79 73 20 29 | 20 3d 3d 20 30 20 29 20 | &days )| == 0 ) |
|000029a0| 67 6f 74 6f 20 64 65 66 | 61 75 6c 74 5f 63 61 73 |goto def|ault_cas|
|000029b0| 65 3b 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 62 |e;. | b|
|000029c0| 72 65 61 6b 3b 0a 0a 20 | 20 20 20 20 20 20 20 20 |reak;.. | |
|000029d0| 20 20 20 63 61 73 65 20 | 27 6c 27 3a 20 20 20 20 | case |'l': |
|000029e0| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2a 20 6c 69 | | /* li|
|000029f0| 73 74 20 6f 75 74 73 74 | 61 6e 64 69 6e 67 20 70 |st outst|anding p|
|00002a00| 6f 6c 6c 73 20 2a 2f 0a | 20 20 20 20 20 20 20 20 |olls */.| |
|00002a10| 20 20 20 20 69 66 28 20 | 63 6c 65 61 6e 20 7c 7c | if( |clean |||
|00002a20| 20 72 65 6d 6f 76 65 20 | 29 0a 20 20 20 20 20 20 | remove |). |
|00002a30| 20 20 20 20 20 20 20 20 | 20 20 7b 0a 20 20 20 20 | | {. |
|00002a40| 20 20 20 20 20 20 20 20 | 20 20 20 20 66 70 72 69 | | fpri|
|00002a50| 6e 74 66 28 20 73 74 64 | 65 72 72 2c 0a 20 20 20 |ntf( std|err,. |
|00002a60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002a70| 20 20 20 20 20 20 22 75 | 75 70 6f 6c 6c 3a 20 69 | "u|upoll: i|
|00002a80| 6e 63 6f 6e 73 69 73 74 | 61 6e 74 20 73 77 69 74 |nconsist|ant swit|
|00002a90| 63 68 20 73 70 65 63 69 | 66 69 63 61 74 69 6f 6e |ch speci|fication|
|00002aa0| 5c 5c 6e 22 20 29 3b 0a | 20 20 20 20 20 20 20 20 |\\n" );.| |
|00002ab0| 20 20 20 20 20 20 20 20 | 67 6f 74 6f 20 64 65 66 | |goto def|
|00002ac0| 61 75 6c 74 5f 63 61 73 | 65 3b 0a 20 20 20 20 20 |ault_cas|e;. |
|00002ad0| 20 20 20 20 20 20 20 20 | 20 20 20 7d 0a 0a 20 20 | | }.. |
|00002ae0| 20 20 20 20 20 20 20 20 | 20 20 6c 69 73 74 20 3d | | list =|
|00002af0| 20 54 52 55 45 3b 0a 20 | 20 20 20 20 20 20 20 20 | TRUE;. | |
|00002b00| 20 20 20 74 6f 5f 70 6f | 6c 6c 20 3d 20 46 41 4c | to_po|ll = FAL|
|00002b10| 53 45 3b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |SE;. | |
|00002b20| 62 72 65 61 6b 3b 0a 0a | 20 20 20 20 20 20 20 20 |break;..| |
|00002b30| 20 20 20 20 63 61 73 65 | 20 27 70 27 3a 20 20 20 | case| 'p': |
|00002b40| 20 20 20 20 20 20 20 20 | 20 20 20 20 2f 2a 20 63 | | /* c|
|00002b50| 68 61 6e 67 65 20 74 68 | 65 20 73 70 6f 6f 6c 20 |hange th|e spool |
|00002b60| 66 69 6c 65 20 70 61 74 | 68 20 2a 2f 0a 20 20 20 |file pat|h */. |
|00002b70| 20 20 20 20 20 20 20 20 | 20 73 74 72 63 70 79 28 | | strcpy(|
|00002b80| 20 73 70 6f 6f 6c 70 61 | 74 68 2c 20 6f 70 74 61 | spoolpa|th, opta|
|00002b90| 72 67 20 29 3b 0a 23 20 | 20 20 20 20 20 20 20 20 |rg );.# | |
|00002ba0| 20 20 69 66 64 65 66 20 | 44 45 42 55 47 0a 20 20 | ifdef |DEBUG. |
|00002bb0| 20 20 20 20 20 20 20 20 | 20 20 66 70 72 69 6e 74 | | fprint|
|00002bc0| 66 28 20 73 74 64 65 72 | 72 2c 20 22 75 75 70 6f |f( stder|r, "uupo|
|00002bd0| 6c 6c 3a 20 73 70 6f 6f | 6c 20 64 69 72 65 63 74 |ll: spoo|l direct|
|00002be0| 6f 72 79 20 69 73 20 25 | 73 5c 5c 6e 22 2c 20 20 |ory is %|s\\n", |
|00002bf0| 73 70 6f 6f 6c 70 61 74 | 68 20 29 3b 0a 23 20 20 |spoolpat|h );.# |
|00002c00| 20 20 20 20 20 20 20 20 | 20 65 6e 64 69 66 0a 20 | | endif. |
|00002c10| 20 20 20 20 20 20 20 20 | 20 20 20 62 72 65 61 6b | | break|
|00002c20| 3b 0a 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 63 |;.. | c|
|00002c30| 61 73 65 20 27 72 27 3a | 20 20 20 20 20 20 20 20 |ase 'r':| |
|00002c40| 20 20 20 20 20 20 20 2f | 2a 20 72 65 6d 6f 76 65 | /|* remove|
|00002c50| 20 6f 75 74 73 74 61 6e | 64 69 6e 67 20 70 6f 6c | outstan|ding pol|
|00002c60| 6c 73 20 2a 2f 0a 20 20 | 20 20 20 20 20 20 20 20 |ls */. | |
|00002c70| 20 20 69 66 28 20 63 6c | 65 61 6e 20 7c 7c 20 6c | if( cl|ean || l|
|00002c80| 69 73 74 20 29 0a 20 20 | 20 20 20 20 20 20 20 20 |ist ). | |
|00002c90| 20 20 20 20 20 20 7b 0a | 20 20 20 20 20 20 20 20 | {.| |
|00002ca0| 20 20 20 20 20 20 20 20 | 66 70 72 69 6e 74 66 28 | |fprintf(|
|00002cb0| 20 73 74 64 65 72 72 2c | 0a 20 20 20 20 20 20 20 | stderr,|. |
|00002cc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002cd0| 20 20 22 75 75 70 6f 6c | 6c 3a 20 69 6e 63 6f 6e | "uupol|l: incon|
|00002ce0| 73 69 73 74 61 6e 74 20 | 73 77 69 74 63 68 20 73 |sistant |switch s|
|00002cf0| 70 65 63 69 66 69 63 61 | 74 69 6f 6e 5c 5c 6e 22 |pecifica|tion\\n"|
|00002d00| 20 29 3b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 | );. | |
|00002d10| 20 20 20 20 67 6f 74 6f | 20 64 65 66 61 75 6c 74 | goto| default|
|00002d20| 5f 63 61 73 65 3b 0a 20 | 20 20 20 20 20 20 20 20 |_case;. | |
|00002d30| 20 20 20 20 20 20 20 7d | 0a 0a 20 20 20 20 20 20 | }|.. |
|00002d40| 20 20 20 20 20 20 72 65 | 6d 6f 76 65 20 3d 20 54 | re|move = T|
|00002d50| 52 55 45 3b 0a 20 20 20 | 20 20 20 20 20 20 20 20 |RUE;. | |
|00002d60| 20 74 6f 5f 70 6f 6c 6c | 20 3d 20 46 41 4c 53 45 | to_poll| = FALSE|
|00002d70| 3b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 62 72 |;. | br|
|00002d80| 65 61 6b 3b 0a 0a 20 20 | 20 20 20 20 20 20 20 20 |eak;.. | |
|00002d90| 20 20 63 61 73 65 20 27 | 78 27 3a 0a 20 20 20 20 | case '|x':. |
|00002da0| 20 20 20 20 20 20 20 20 | 75 64 62 67 20 3d 20 54 | |udbg = T|
|00002db0| 52 55 45 3b 0a 20 20 20 | 20 20 20 20 20 20 20 20 |RUE;. | |
|00002dc0| 20 62 72 65 61 6b 3b 0a | 0a 20 20 20 20 20 20 20 | break;.|. |
|00002dd0| 20 20 20 20 20 64 65 66 | 61 75 6c 74 5f 63 61 73 | def|ault_cas|
|00002de0| 65 3a 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 64 |e:. | d|
|00002df0| 65 66 61 75 6c 74 3a 20 | 20 20 20 20 20 20 20 20 |efault: | |
|00002e00| 20 20 20 20 20 20 20 2f | 2a 20 69 6e 76 61 6c 69 | /|* invali|
|00002e10| 64 20 6f 70 74 69 6f 6e | 20 2a 2f 0a 20 20 20 20 |d option| */. |
|00002e20| 20 20 20 20 20 20 20 20 | 66 70 72 69 6e 74 66 28 | |fprintf(|
|00002e30| 20 73 74 64 65 72 72 2c | 20 75 73 61 67 65 20 29 | stderr,| usage )|
|00002e40| 3b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 65 78 |;. | ex|
|00002e50| 69 74 28 20 32 20 29 3b | 0a 20 20 20 20 20 20 20 |it( 2 );|. |
|00002e60| 20 20 20 20 20 62 72 65 | 61 6b 3b 0a 20 20 20 20 | bre|ak;. |
|00002e70| 20 20 20 20 20 20 20 20 | 7d 0a 20 20 20 20 20 20 | |}. |
|00002e80| 20 20 7d 0a 20 20 20 20 | 63 68 64 69 72 28 20 73 | }. |chdir( s|
|00002e90| 70 6f 6f 6c 70 61 74 68 | 20 29 3b 0a 0a 0a 20 20 |poolpath| );... |
|00002ea0| 20 20 2f 2a 0a 20 20 20 | 20 2a 2a 20 20 20 20 20 | /*. | ** |
|00002eb0| 20 49 66 20 63 6c 65 61 | 6e 20 74 68 65 6e 20 63 | If clea|n then c|
|00002ec0| 68 65 63 6b 20 61 6c 6c | 20 70 6f 6c 6c 20 66 69 |heck all| poll fi|
|00002ed0| 6c 65 73 20 66 6f 72 20 | 65 78 70 69 72 61 74 69 |les for |expirati|
|00002ee0| 6f 6e 0a 20 20 20 20 2a | 2a 20 20 20 20 20 20 61 |on. *|* a|
|00002ef0| 6e 64 20 65 78 69 74 2e | 0a 20 20 20 20 2a 2a 0a |nd exit.|. **.|
|00002f00| 20 20 20 20 2a 2a 20 20 | 20 20 20 20 49 66 20 74 | ** | If t|
|00002f10| 68 69 73 20 69 73 20 61 | 20 72 65 71 75 65 73 74 |his is a| request|
|00002f20| 20 74 6f 20 70 6f 6c 6c | 0a 20 20 20 20 2a 2a 20 | to poll|. ** |
|00002f30| 20 20 20 20 20 64 6f 20 | 73 6f 20 61 6e 64 20 65 | do |so and e|
|00002f40| 78 69 74 2e 0a 20 20 20 | 20 2a 2f 0a 20 20 20 20 |xit.. | */. |
|00002f50| 69 66 28 20 63 6c 65 61 | 6e 20 29 0a 20 20 20 20 |if( clea|n ). |
|00002f60| 20 20 20 20 7b 0a 20 20 | 20 20 20 20 20 20 63 6c | {. | cl|
|00002f70| 65 61 6e 5f 75 70 28 29 | 3b 0a 20 20 20 20 20 20 |ean_up()|;. |
|00002f80| 20 20 65 78 69 74 28 20 | 30 20 29 3b 0a 20 20 20 | exit( |0 );. |
|00002f90| 20 20 20 20 20 7d 0a 0a | 20 20 20 20 69 66 28 20 | }..| if( |
|00002fa0| 6f 70 74 69 6e 64 20 3d | 3d 20 61 72 67 63 20 29 |optind =|= argc )|
|00002fb0| 20 20 20 20 20 20 20 20 | 2f 2a 20 74 68 65 6e 20 | |/* then |
|00002fc0| 74 68 69 73 20 69 73 20 | 61 20 70 6f 6c 6c 20 72 |this is |a poll r|
|00002fd0| 65 71 75 65 73 74 20 2a | 2f 0a 20 20 20 20 20 20 |equest *|/. |
|00002fe0| 20 20 7b 0a 20 20 20 20 | 20 20 20 20 70 6f 6c 6c | {. | poll|
|00002ff0| 28 29 3b 0a 20 20 20 20 | 20 20 20 20 65 78 69 74 |();. | exit|
|00003000| 28 20 30 20 29 3b 0a 20 | 20 20 20 20 20 20 20 7d |( 0 );. | }|
|00003010| 0a 20 20 20 20 20 20 20 | 20 0a 0a 20 20 20 20 2f |. | .. /|
|00003020| 2a 0a 20 20 20 20 2a 2a | 20 20 20 20 20 20 46 6f |*. **| Fo|
|00003030| 72 20 65 61 63 68 20 73 | 79 73 74 65 6d 20 6e 61 |r each s|ystem na|
|00003040| 6d 65 20 6f 6e 20 74 68 | 65 20 63 6f 6d 6d 61 6e |me on th|e comman|
|00003050| 64 20 6c 69 6e 65 0a 20 | 20 20 20 2a 2a 20 20 20 |d line. | ** |
|00003060| 20 20 20 63 72 65 61 74 | 65 20 61 20 70 6f 6c 6c | creat|e a poll|
|00003070| 20 66 69 6c 65 20 6e 61 | 6d 65 20 50 2e 73 79 73 | file na|me P.sys|
|00003080| 6e 61 6d 65 2e 0a 20 20 | 20 20 2a 2a 0a 20 20 20 |name.. | **. |
|00003090| 20 2a 2a 20 20 20 20 20 | 20 49 66 20 6c 69 73 74 | ** | If list|
|000030a0| 20 69 73 20 72 65 71 75 | 65 73 74 65 64 20 74 68 | is requ|ested th|
|000030b0| 65 6e 20 6f 75 74 70 75 | 74 20 74 68 65 20 73 79 |en outpu|t the sy|
|000030c0| 73 74 65 6d 20 6e 61 6d | 65 73 20 6f 66 0a 20 20 |stem nam|es of. |
|000030d0| 20 20 2a 2a 20 20 20 20 | 20 20 61 6c 6c 20 73 79 | ** | all sy|
|000030e0| 73 74 65 6d 73 20 77 69 | 74 68 20 70 6f 6c 6c 20 |stems wi|th poll |
|000030f0| 66 69 6c 65 73 2e 0a 20 | 20 20 20 2a 2a 0a 20 20 |files.. | **. |
|00003100| 20 20 2a 2a 20 20 20 20 | 20 20 49 66 20 72 65 6d | ** | If rem|
|00003110| 6f 76 65 20 74 68 65 6e | 20 64 65 6c 65 74 65 20 |ove then| delete |
|00003120| 70 6f 6c 6c 20 66 69 6c | 65 73 20 66 6f 72 20 6e |poll fil|es for n|
|00003130| 61 6d 65 64 20 73 79 73 | 74 65 6d 73 2e 0a 20 20 |amed sys|tems.. |
|00003140| 20 20 2a 2a 0a 20 20 20 | 20 2a 2a 20 20 20 20 20 | **. | ** |
|00003150| 20 4f 74 68 65 72 77 69 | 73 65 20 63 72 65 61 74 | Otherwi|se creat|
|00003160| 65 20 70 6f 6c 6c 20 66 | 69 6c 65 73 20 66 6f 72 |e poll f|iles for|
|00003170| 20 61 6c 6c 20 73 79 73 | 74 65 6d 73 20 77 68 69 | all sys|tems whi|
|00003180| 63 68 20 64 6f 0a 20 20 | 20 20 2a 2a 20 20 20 20 |ch do. | ** |
|00003190| 20 20 6e 6f 74 20 68 61 | 76 65 20 74 68 65 6d 2e | not ha|ve them.|
|000031a0| 0a 20 20 20 20 2a 2f 0a | 20 20 20 20 66 6f 72 28 |. */.| for(|
|000031b0| 20 69 3d 6f 70 74 69 6e | 64 3b 20 69 3c 61 72 67 | i=optin|d; i<arg|
|000031c0| 63 3b 20 2b 2b 69 20 29 | 0a 20 20 20 20 20 20 20 |c; ++i )|. |
|000031d0| 20 7b 0a 20 20 20 20 20 | 20 20 20 63 68 61 72 20 | {. | char |
|000031e0| 70 5f 73 79 73 6e 61 6d | 65 5b 31 35 5d 3b 0a 20 |p_sysnam|e[15];. |
|000031f0| 20 20 20 20 20 20 20 75 | 6e 73 69 67 6e 65 64 20 | u|nsigned |
|00003200| 69 73 70 3b 0a 0a 20 20 | 20 20 20 20 20 20 73 70 |isp;.. | sp|
|00003210| 72 69 6e 74 66 28 20 70 | 5f 73 79 73 6e 61 6d 65 |rintf( p|_sysname|
|00003220| 2c 20 22 50 2e 25 73 22 | 2c 20 61 72 67 76 5b 69 |, "P.%s"|, argv[i|
|00003230| 5d 20 29 3b 0a 20 20 20 | 20 20 20 20 20 69 73 70 |] );. | isp|
|00003240| 20 3d 20 69 73 5f 70 6f | 6c 6c 28 20 70 5f 73 79 | = is_po|ll( p_sy|
|00003250| 73 6e 61 6d 65 20 29 3b | 0a 0a 20 20 20 20 20 20 |sname );|.. |
|00003260| 20 20 69 66 28 20 6c 69 | 73 74 20 26 26 20 69 73 | if( li|st && is|
|00003270| 70 20 29 20 20 20 75 70 | 72 69 6e 74 28 20 61 72 |p ) up|rint( ar|
|00003280| 67 76 5b 69 5d 20 29 3b | 0a 0a 20 20 20 20 20 20 |gv[i] );|.. |
|00003290| 20 20 69 66 28 20 72 65 | 6d 6f 76 65 20 29 0a 20 | if( re|move ). |
|000032a0| 20 20 20 20 20 20 20 20 | 20 20 20 7b 0a 20 20 20 | | {. |
|000032b0| 20 20 20 20 20 20 20 20 | 20 69 66 28 20 69 73 70 | | if( isp|
|000032c0| 20 29 20 20 20 75 75 6e | 6c 69 6e 6b 28 20 70 5f | ) uun|link( p_|
|000032d0| 73 79 73 6e 61 6d 65 20 | 29 3b 0a 20 20 20 20 20 |sysname |);. |
|000032e0| 20 20 20 20 20 20 20 65 | 6c 73 65 20 20 20 20 20 | e|lse |
|000032f0| 20 20 20 66 70 72 69 6e | 74 66 28 20 73 74 64 65 | fprin|tf( stde|
|00003300| 72 72 2c 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |rr,. | |
|00003310| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003320| 22 75 75 70 6f 6c 6c 3a | 20 6e 6f 20 70 6f 6c 6c |"uupoll:| no poll|
|00003330| 20 6f 75 74 73 74 61 6e | 64 69 6e 67 20 66 6f 72 | outstan|ding for|
|00003340| 20 25 73 5c 5c 6e 22 2c | 20 61 72 67 76 5b 31 5d | %s\\n",| argv[1]|
|00003350| 20 29 3b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 | );. | |
|00003360| 7d 0a 0a 20 20 20 20 20 | 20 20 20 69 66 28 20 74 |}.. | if( t|
|00003370| 6f 5f 70 6f 6c 6c 20 26 | 26 20 21 69 73 70 20 29 |o_poll &|& !isp )|
|00003380| 20 6d 6b 5f 70 6f 6c 6c | 28 20 61 72 67 76 5b 69 | mk_poll|( argv[i|
|00003390| 5d 2c 20 70 5f 73 79 73 | 6e 61 6d 65 20 29 3b 0a |], p_sys|name );.|
|000033a0| 20 20 20 20 20 20 20 20 | 7d 0a 7d 0a 0a 0a 69 6e | |}.}...in|
|000033b0| 74 20 69 73 5f 70 6f 6c | 6c 28 20 70 5f 73 79 73 |t is_pol|l( p_sys|
|000033c0| 6e 61 6d 65 20 29 20 20 | 20 20 20 20 20 20 2f 2a |name ) | /*|
|000033d0| 20 63 68 65 63 6b 20 69 | 66 20 70 6f 6c 6c 20 66 | check i|f poll f|
|000033e0| 69 6c 65 20 65 78 69 73 | 74 73 20 66 6f 72 20 70 |ile exis|ts for p|
|000033f0| 5f 73 79 73 6e 61 6d 65 | 20 2a 2f 0a 63 68 61 72 |_sysname| */.char|
|00003400| 20 2a 70 5f 73 79 73 6e | 61 6d 65 3b 20 20 20 20 | *p_sysn|ame; |
|00003410| 20 20 20 20 20 20 20 20 | 20 20 20 20 2f 2a 20 72 | | /* r|
|00003420| 65 74 75 72 6e 20 74 72 | 75 65 20 69 66 20 70 5f |eturn tr|ue if p_|
|00003430| 6e 61 6d 65 20 69 73 20 | 22 61 6c 6c 22 20 2a 2f |name is |"all" */|
|00003440| 0a 20 20 20 20 7b 0a 20 | 20 20 20 69 6e 74 20 72 |. {. | int r|
|00003450| 63 3b 0a 0a 20 20 20 20 | 72 63 20 3d 20 46 41 4c |c;.. |rc = FAL|
|00003460| 53 45 3b 0a 20 20 20 20 | 69 66 28 20 73 74 72 63 |SE;. |if( strc|
|00003470| 6d 70 28 20 70 5f 73 79 | 73 6e 61 6d 65 2c 20 22 |mp( p_sy|sname, "|
|00003480| 50 2e 61 6c 6c 22 20 29 | 20 3d 3d 20 30 20 29 20 |P.all" )| == 0 ) |
|00003490| 72 63 20 3d 20 54 52 55 | 45 3b 0a 20 20 20 20 69 |rc = TRU|E;. i|
|000034a0| 66 28 20 61 63 63 65 73 | 73 28 20 70 5f 73 79 73 |f( acces|s( p_sys|
|000034b0| 6e 61 6d 65 2c 20 30 20 | 29 20 3d 3d 20 30 20 29 |name, 0 |) == 0 )|
|000034c0| 20 20 20 20 20 20 20 72 | 63 20 3d 20 54 52 55 45 | r|c = TRUE|
|000034d0| 3b 0a 0a 23 20 20 20 69 | 66 64 65 66 20 44 45 42 |;..# i|fdef DEB|
|000034e0| 55 47 0a 20 20 20 20 66 | 70 72 69 6e 74 66 28 20 |UG. f|printf( |
|000034f0| 73 74 64 65 72 72 2c 20 | 22 75 75 70 6f 6c 6c 3a |stderr, |"uupoll:|
|00003500| 20 70 6f 6c 6c 20 66 69 | 6c 65 20 25 73 25 73 20 | poll fi|le %s%s |
|00003510| 66 6f 75 6e 64 5c 5c 6e | 22 2c 20 70 5f 73 79 73 |found\\n|", p_sys|
|00003520| 6e 61 6d 65 2c 20 0a 20 | 20 20 20 20 20 20 20 28 |name, . | (|
|00003530| 20 72 63 20 3f 20 22 22 | 20 3a 20 22 20 6e 6f 74 | rc ? ""| : " not|
|00003540| 22 20 29 20 29 3b 0a 23 | 20 20 20 65 6e 64 69 66 |" ) );.#| endif|
|00003550| 0a 0a 20 20 20 20 72 65 | 74 75 72 6e 20 72 63 3b |.. re|turn rc;|
|00003560| 0a 20 20 20 20 7d 0a 0a | 0a 46 49 4c 45 20 2a 6d |. }..|.FILE *m|
|00003570| 6b 5f 70 6f 6c 6c 28 20 | 73 79 73 6e 61 6d 65 2c |k_poll( |sysname,|
|00003580| 20 70 5f 73 79 73 6e 61 | 6d 65 20 29 20 20 20 20 | p_sysna|me ) |
|00003590| 20 2f 2a 20 63 72 65 61 | 74 65 20 61 20 70 6f 6c | /* crea|te a pol|
|000035a0| 6c 20 66 69 6c 65 20 50 | 2e 73 79 73 6e 61 6d 65 |l file P|.sysname|
|000035b0| 20 2a 2f 0a 63 68 61 72 | 20 2a 73 79 73 6e 61 6d | */.char| *sysnam|
|000035c0| 65 2c 20 2a 70 5f 73 79 | 73 6e 61 6d 65 3b 0a 20 |e, *p_sy|sname;. |
|000035d0| 20 20 20 7b 0a 20 20 20 | 20 46 49 4c 45 20 2a 66 | {. | FILE *f|
|000035e0| 70 3b 0a 20 20 20 20 75 | 6e 73 69 67 6e 65 64 20 |p;. u|nsigned |
|000035f0| 69 6e 74 20 6f 6d 61 73 | 6b 3b 0a 0a 20 20 20 20 |int omas|k;.. |
|00003600| 6f 6d 61 73 6b 20 3d 20 | 75 6d 61 73 6b 28 20 52 |omask = |umask( R|
|00003610| 57 5f 52 5f 5f 52 5f 5f | 20 29 3b 0a 0a 20 20 20 |W_R__R__| );.. |
|00003620| 20 69 66 28 20 28 20 66 | 70 20 3d 20 66 6f 70 65 | if( ( f|p = fope|
|00003630| 6e 28 20 70 5f 73 79 73 | 6e 61 6d 65 2c 20 22 77 |n( p_sys|name, "w|
|00003640| 22 20 29 20 29 20 3d 3d | 20 4e 55 4c 4c 20 29 0a |" ) ) ==| NULL ).|
|00003650| 20 20 20 20 20 20 20 20 | 7b 0a 20 20 20 20 20 20 | |{. |
|00003660| 20 20 66 70 72 69 6e 74 | 66 28 20 73 74 64 65 72 | fprint|f( stder|
|00003670| 72 2c 20 22 75 75 70 6f | 6c 6c 3a 20 63 61 6e 6e |r, "uupo|ll: cann|
|00003680| 6f 74 20 63 72 65 61 74 | 65 20 70 6f 6c 6c 20 66 |ot creat|e poll f|
|00003690| 6f 72 20 25 73 5c 5c 6e | 22 2c 20 73 79 73 6e 61 |or %s\\n|", sysna|
|000036a0| 6d 65 20 29 3b 0a 20 20 | 20 20 20 20 20 20 72 65 |me );. | re|
|000036b0| 74 75 72 6e 20 4e 55 4c | 4c 3b 0a 20 20 20 20 20 |turn NUL|L;. |
|000036c0| 20 20 20 7d 0a 0a 20 20 | 20 20 75 6d 61 73 6b 28 | }.. | umask(|
|000036d0| 20 6f 6d 61 73 6b 20 29 | 3b 0a 0a 20 20 20 20 66 | omask )|;.. f|
|000036e0| 70 72 69 6e 74 66 28 20 | 66 70 2c 20 22 44 20 25 |printf( |fp, "D %|
|000036f0| 30 32 64 5c 5c 6e 22 2c | 20 64 61 79 73 20 29 3b |02d\\n",| days );|
|00003700| 0a 20 20 20 20 66 63 6c | 6f 73 65 28 20 66 70 20 |. fcl|ose( fp |
|00003710| 29 3b 0a 20 20 20 20 72 | 65 74 75 72 6e 20 66 70 |);. r|eturn fp|
|00003720| 3b 0a 20 20 20 20 7d 0a | 0a 0a 76 6f 69 64 20 70 |;. }.|..void p|
|00003730| 6f 6c 6c 28 29 20 20 20 | 20 20 20 20 20 20 2f 2a |oll() | /*|
|00003740| 20 70 6f 6c 6c 20 61 6c | 6c 20 73 79 73 74 65 6d | poll al|l system|
|00003750| 73 20 76 69 61 20 75 75 | 63 69 63 6f 20 77 68 69 |s via uu|cico whi|
|00003760| 63 68 20 68 61 76 65 20 | 2a 2f 0a 20 20 20 20 7b |ch have |*/. {|
|00003770| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2f | | /|
|00003780| 2a 20 6f 75 74 73 74 61 | 6e 64 69 6e 67 20 70 6f |* outsta|nding po|
|00003790| 6c 6c 20 66 69 6c 65 73 | 20 69 6e 20 74 68 65 20 |ll files| in the |
|000037a0| 73 70 6f 6f 6c 20 64 69 | 72 65 63 74 6f 72 79 20 |spool di|rectory |
|000037b0| 2a 2f 0a 20 20 20 20 69 | 6e 74 20 66 64 3b 0a 20 |*/. i|nt fd;. |
|000037c0| 20 20 20 63 68 61 72 20 | 2a 66 6e 61 6d 65 3b 0a | char |*fname;.|
|000037d0| 0a 0a 2f 2a 0a 2a 2a 20 | 20 20 20 20 20 46 6f 72 |../*.** | For|
|000037e0| 20 65 61 63 68 20 70 6f | 6c 6c 20 66 69 6c 65 20 | each po|ll file |
|000037f0| 69 6e 20 74 68 65 20 73 | 70 6f 6f 6c 20 64 69 72 |in the s|pool dir|
|00003800| 65 63 74 6f 72 79 2c 20 | 66 6f 72 6b 20 6f 66 66 |ectory, |fork off|
|00003810| 20 61 20 75 75 63 69 63 | 6f 0a 2a 2a 20 20 20 20 | a uucic|o.** |
|00003820| 20 20 70 72 6f 63 65 73 | 73 20 74 6f 20 70 6f 6c | proces|s to pol|
|00003830| 6c 20 74 68 65 20 73 79 | 73 74 65 6d 2e 20 20 57 |l the sy|stem. W|
|00003840| 68 65 6e 20 74 68 65 20 | 75 75 63 69 63 6f 20 69 |hen the |uucico i|
|00003850| 73 20 66 69 6e 69 73 68 | 65 64 2c 20 0a 2a 2a 20 |s finish|ed, .** |
|00003860| 20 20 20 20 20 75 6e 6c | 69 6e 6b 20 74 68 65 20 | unl|ink the |
|00003870| 70 6f 6c 6c 20 66 69 6c | 65 20 69 66 20 74 68 65 |poll fil|e if the|
|00003880| 20 70 6f 6c 6c 20 73 75 | 63 63 65 64 65 64 2e 20 | poll su|cceded. |
|00003890| 20 49 66 20 74 68 65 20 | 70 6f 6c 6c 20 66 61 69 | If the |poll fai|
|000038a0| 6c 65 64 0a 2a 2a 20 20 | 20 20 20 20 6c 65 61 76 |led.** | leav|
|000038b0| 65 20 74 68 65 20 70 6f | 6c 6c 20 66 69 6c 65 20 |e the po|ll file |
|000038c0| 69 6e 20 70 6c 61 63 65 | 20 66 6f 72 20 74 68 65 |in place| for the|
|000038d0| 20 6e 65 78 74 20 69 6e | 76 6f 63 61 74 69 6f 6e | next in|vocation|
|000038e0| 20 6f 66 20 75 75 70 6f | 6c 6c 2e 0a 2a 2f 0a 20 | of uupo|ll..*/. |
|000038f0| 20 20 20 77 68 69 6c 65 | 28 20 28 20 66 6e 61 6d | while|( ( fnam|
|00003900| 65 20 3d 20 67 65 74 70 | 6f 6c 6c 28 29 20 29 20 |e = getp|oll() ) |
|00003910| 21 3d 20 4e 55 4c 4c 20 | 29 0a 20 20 20 20 20 20 |!= NULL |). |
|00003920| 20 20 7b 0a 20 20 20 20 | 20 20 20 20 69 6e 74 20 | {. | int |
|00003930| 70 69 64 3b 0a 0a 20 20 | 20 20 20 20 20 20 70 69 |pid;.. | pi|
|00003940| 64 20 3d 20 66 6f 72 6b | 28 29 3b 0a 0a 20 20 20 |d = fork|();.. |
|00003950| 20 20 20 20 20 73 77 69 | 74 63 68 28 20 70 69 64 | swi|tch( pid|
|00003960| 20 29 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 7b | ). | {|
|00003970| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 63 68 61 |. | cha|
|00003980| 72 20 70 73 79 73 5b 32 | 30 5d 3b 0a 20 20 20 20 |r psys[2|0];. |
|00003990| 20 20 20 20 20 20 20 20 | 69 6e 74 20 77 73 74 61 | |int wsta|
|000039a0| 74 3b 0a 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |t;.. | |
|000039b0| 50 41 52 45 4e 54 3a 0a | 20 20 20 20 20 20 20 20 |PARENT:.| |
|000039c0| 20 20 20 20 20 20 20 20 | 77 68 69 6c 65 28 20 77 | |while( w|
|000039d0| 61 69 74 28 20 26 77 73 | 74 61 74 20 29 20 21 3d |ait( &ws|tat ) !=|
|000039e0| 20 70 69 64 20 29 0a 23 | 20 20 20 20 20 20 20 20 | pid ).#| |
|000039f0| 20 20 20 20 20 20 20 69 | 66 64 65 66 20 44 45 42 | i|fdef DEB|
|00003a00| 55 47 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |UG. | |
|00003a10| 20 20 20 20 20 20 20 66 | 70 72 69 6e 74 66 28 20 | f|printf( |
|00003a20| 73 74 64 65 72 72 2c 20 | 22 72 65 74 75 72 6e 65 |stderr, |"returne|
|00003a30| 64 20 66 72 6f 6d 20 77 | 61 69 74 20 73 74 61 74 |d from w|ait stat|
|00003a40| 75 73 3a 20 25 78 5c 5c | 6e 22 2c 20 77 73 74 61 |us: %x\\|n", wsta|
|00003a50| 74 29 3b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |t);. | |
|00003a60| 20 20 20 20 66 70 72 69 | 6e 74 66 28 20 73 74 64 | fpri|ntf( std|
|00003a70| 65 72 72 2c 20 22 72 65 | 74 75 72 6e 65 64 20 66 |err, "re|turned f|
|00003a80| 72 6f 6d 20 77 61 69 74 | 20 73 74 61 74 75 73 3a |rom wait| status:|
|00003a90| 20 25 78 5c 5c 6e 22 2c | 20 77 73 74 61 74 29 3b | %x\\n",| wstat);|
|00003aa0| 0a 23 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.# | |
|00003ab0| 20 65 6e 64 69 66 0a 20 | 20 20 20 20 20 20 20 20 | endif. | |
|00003ac0| 20 20 20 20 20 20 20 3b | 0a 20 20 20 20 20 20 20 | ;|. |
|00003ad0| 20 20 20 20 20 20 20 20 | 20 62 72 65 61 6b 3b 0a | | break;.|
|00003ae0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 43 48 49 |. | CHI|
|00003af0| 4c 44 3a 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |LD:. | |
|00003b00| 20 20 20 20 73 70 72 69 | 6e 74 66 28 20 70 73 79 | spri|ntf( psy|
|00003b10| 73 2c 20 22 2d 73 25 73 | 22 2c 20 26 66 6e 61 6d |s, "-s%s|", &fnam|
|00003b20| 65 5b 32 5d 20 29 3b 0a | 0a 20 20 20 20 20 20 20 |e[2] );.|. |
|00003b30| 20 20 20 20 20 20 20 20 | 20 69 66 28 20 75 64 62 | | if( udb|
|00003b40| 67 20 29 20 65 78 65 63 | 6c 28 20 22 2f 75 73 72 |g ) exec|l( "/usr|
|00003b50| 2f 6c 69 62 2f 75 75 63 | 70 2f 75 75 63 69 63 6f |/lib/uuc|p/uucico|
|00003b60| 22 2c 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |",. | |
|00003b70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003b80| 20 20 20 20 20 22 2f 75 | 73 72 2f 6c 69 62 2f 75 | "/u|sr/lib/u|
|00003b90| 75 63 70 2f 75 75 63 69 | 63 6f 22 2c 0a 20 20 20 |ucp/uuci|co",. |
|00003ba0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003bb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 22 | | "|
|00003bc0| 2d 72 31 22 2c 20 70 73 | 79 73 2c 20 22 2d 78 39 |-r1", ps|ys, "-x9|
|00003bd0| 22 2c 20 28 63 68 61 72 | 20 2a 29 20 30 20 29 3b |", (char| *) 0 );|
|00003be0| 0a 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|00003bf0| 20 20 65 6c 73 65 20 20 | 20 20 20 20 20 65 78 65 | else | exe|
|00003c00| 63 6c 28 20 22 2f 75 73 | 72 2f 6c 69 62 2f 75 75 |cl( "/us|r/lib/uu|
|00003c10| 63 70 2f 75 75 63 69 63 | 6f 22 2c 0a 20 20 20 20 |cp/uucic|o",. |
|00003c20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003c30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 22 2f | | "/|
|00003c40| 75 73 72 2f 6c 69 62 2f | 75 75 63 70 2f 75 75 63 |usr/lib/|uucp/uuc|
|00003c50| 69 63 6f 22 2c 0a 20 20 | 20 20 20 20 20 20 20 20 |ico",. | |
|00003c60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003c70| 20 20 20 20 20 20 20 20 | 22 2d 72 31 22 2c 20 70 | |"-r1", p|
|00003c80| 73 79 73 2c 20 28 63 68 | 61 72 20 2a 29 20 30 20 |sys, (ch|ar *) 0 |
|00003c90| 29 3b 0a 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |);.. | |
|00003ca0| 20 20 20 20 65 78 69 74 | 28 31 29 3b 20 20 20 20 | exit|(1); |
|00003cb0| 2f 2a 20 4e 4f 54 20 52 | 45 41 43 48 45 44 20 2a |/* NOT R|EACHED *|
|00003cc0| 2f 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 7d 0a |/. | }.|
|00003cd0| 0a 20 20 20 20 20 20 20 | 20 69 66 28 20 70 6f 6c |. | if( pol|
|00003ce0| 6c 5f 73 75 63 63 65 73 | 73 66 75 6c 28 20 26 66 |l_succes|sful( &f|
|00003cf0| 6e 61 6d 65 5b 32 5d 20 | 29 20 29 0a 20 20 20 20 |name[2] |) ). |
|00003d00| 20 20 20 20 20 20 20 20 | 7b 0a 23 20 20 20 20 20 | |{.# |
|00003d10| 20 20 20 20 20 20 69 66 | 64 65 66 20 44 45 42 55 | if|def DEBU|
|00003d20| 47 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 66 70 |G. | fp|
|00003d30| 72 69 6e 74 66 28 20 73 | 74 64 65 72 72 2c 20 22 |rintf( s|tderr, "|
|00003d40| 75 75 70 6f 6c 6c 3a 20 | 73 79 73 74 65 6d 20 25 |uupoll: |system %|
|00003d50| 73 20 73 75 63 63 65 73 | 73 66 75 6c 6c 79 20 70 |s succes|sfully p|
|00003d60| 6f 6c 6c 65 64 5c 5c 6e | 22 2c 0a 20 20 20 20 20 |olled\\n|",. |
|00003d70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 26 | | &|
|00003d80| 66 6e 61 6d 65 5b 32 5d | 20 29 3b 0a 23 20 20 20 |fname[2]| );.# |
|00003d90| 20 20 20 20 20 20 20 20 | 65 6e 64 69 66 0a 20 20 | |endif. |
|00003da0| 20 20 20 20 20 20 20 20 | 20 20 75 6e 6c 69 6e 6b | | unlink|
|00003db0| 28 20 66 6e 61 6d 65 20 | 29 3b 0a 20 20 20 20 20 |( fname |);. |
|00003dc0| 20 20 20 20 20 20 20 7d | 0a 20 20 20 20 20 20 20 | }|. |
|00003dd0| 20 7d 0a 20 20 20 20 7d | 0a 0a 0a 69 6e 74 20 70 | }. }|...int p|
|00003de0| 6f 6c 6c 5f 73 75 63 63 | 65 73 73 66 75 6c 28 20 |oll_succ|essful( |
|00003df0| 73 79 73 6e 61 6d 65 20 | 29 0a 63 68 61 72 20 2a |sysname |).char *|
|00003e00| 73 79 73 6e 61 6d 65 3b | 0a 20 20 20 20 7b 0a 20 |sysname;|. {. |
|00003e10| 20 20 20 63 68 61 72 20 | 75 73 74 61 74 31 5b 32 | char |ustat1[2|
|00003e20| 30 5d 2c 75 73 74 61 74 | 32 5b 32 30 5d 2c 20 70 |0],ustat|2[20], p|
|00003e30| 6f 6c 6c 5f 63 6d 64 5b | 34 30 5d 3b 0a 20 20 20 |oll_cmd[|40];. |
|00003e40| 20 46 49 4c 45 20 2a 66 | 70 69 70 65 3b 0a 20 20 | FILE *f|pipe;. |
|00003e50| 20 20 69 6e 74 20 72 63 | 3b 0a 0a 20 20 20 20 2f | int rc|;.. /|
|00003e60| 2a 0a 20 20 20 20 2a 2a | 20 20 20 20 20 20 53 65 |*. **| Se|
|00003e70| 74 20 74 68 65 20 64 65 | 66 61 75 6c 74 20 72 65 |t the de|fault re|
|00003e80| 74 75 72 6e 20 76 61 6c | 75 65 20 74 6f 20 46 41 |turn val|ue to FA|
|00003e90| 4c 53 45 2e 0a 20 20 20 | 20 2a 2f 0a 20 20 20 20 |LSE.. | */. |
|00003ea0| 69 6e 74 20 72 65 73 75 | 6c 74 20 3d 20 46 41 4c |int resu|lt = FAL|
|00003eb0| 53 45 3b 0a 0a 20 20 20 | 20 2f 2a 0a 20 20 20 20 |SE;.. | /*. |
|00003ec0| 2a 2a 20 20 20 20 20 20 | 50 72 65 70 61 72 65 20 |** |Prepare |
|00003ed0| 75 75 73 74 61 74 20 63 | 6f 6d 6d 61 6e 64 20 61 |uustat c|ommand a|
|00003ee0| 6e 64 0a 20 20 20 20 2a | 2a 20 20 20 20 20 20 4f |nd. *|* O|
|00003ef0| 70 65 6e 20 61 20 72 65 | 61 64 20 6f 6e 6c 79 20 |pen a re|ad only |
|00003f00| 70 69 70 65 20 74 6f 20 | 75 75 73 74 61 74 2e 0a |pipe to |uustat..|
|00003f10| 20 20 20 20 2a 2f 0a 20 | 20 20 20 73 70 72 69 6e | */. | sprin|
|00003f20| 74 66 28 20 70 6f 6c 6c | 5f 63 6d 64 2c 20 22 75 |tf( poll|_cmd, "u|
|00003f30| 75 73 74 61 74 20 2d 6d | 25 73 5c 5c 6e 22 2c 20 |ustat -m|%s\\n", |
|00003f40| 73 79 73 6e 61 6d 65 20 | 29 3b 0a 20 20 20 20 66 |sysname |);. f|
|00003f50| 70 69 70 65 20 3d 20 70 | 6f 70 65 6e 28 20 70 6f |pipe = p|open( po|
|00003f60| 6c 6c 5f 63 6d 64 2c 20 | 22 72 22 20 29 3b 0a 20 |ll_cmd, |"r" );. |
|00003f70| 20 20 20 69 66 28 20 66 | 70 69 70 65 20 3d 3d 20 | if( f|pipe == |
|00003f80| 4e 55 4c 4c 20 29 0a 20 | 20 20 20 20 20 20 20 7b |NULL ). | {|
|00003f90| 0a 20 20 20 20 20 20 20 | 20 70 65 72 72 6f 72 28 |. | perror(|
|00003fa0| 20 22 75 75 70 6f 6c 6c | 3a 20 70 6f 6c 6c 5f 73 | "uupoll|: poll_s|
|00003fb0| 75 63 63 65 73 73 66 75 | 6c 22 20 29 3b 0a 20 20 |uccessfu|l" );. |
|00003fc0| 20 20 20 20 20 20 65 78 | 69 74 28 20 31 20 29 3b | ex|it( 1 );|
|00003fd0| 0a 20 20 20 20 20 20 20 | 20 7d 0a 0a 20 20 20 20 |. | }.. |
|00003fe0| 2f 2a 0a 20 20 20 20 2a | 2a 20 20 20 20 20 20 52 |/*. *|* R|
|00003ff0| 65 61 64 20 74 68 65 20 | 70 69 70 65 20 61 6e 64 |ead the |pipe and|
|00004000| 20 70 69 63 6b 20 6f 75 | 74 20 74 68 65 20 63 6f | pick ou|t the co|
|00004010| 6d 70 6c 65 74 69 6f 6e | 20 73 74 72 69 6e 67 20 |mpletion| string |
|00004020| 66 72 6f 6d 20 74 68 65 | 0a 20 20 20 20 2a 2a 20 |from the|. ** |
|00004030| 20 20 20 20 20 75 75 73 | 74 61 74 20 6f 75 74 70 | uus|tat outp|
|00004040| 75 74 2e 0a 20 20 20 20 | 2a 2f 0a 20 20 20 20 77 |ut.. |*/. w|
|00004050| 68 69 6c 65 28 20 28 20 | 72 63 20 3d 20 66 73 63 |hile( ( |rc = fsc|
|00004060| 61 6e 66 28 20 66 70 69 | 70 65 2c 20 22 25 2a 73 |anf( fpi|pe, "%*s|
|00004070| 25 2a 73 25 73 25 73 22 | 2c 20 75 73 74 61 74 31 |%*s%s%s"|, ustat1|
|00004080| 2c 20 75 73 74 61 74 32 | 20 29 20 29 20 21 3d 20 |, ustat2| ) ) != |
|00004090| 45 4f 46 20 29 0a 20 20 | 20 20 20 20 20 20 7b 0a |EOF ). | {.|
|000040a0| 23 20 20 20 20 20 20 20 | 69 66 64 65 66 20 44 45 |# |ifdef DE|
|000040b0| 42 55 47 0a 20 20 20 20 | 20 20 20 20 66 70 72 69 |BUG. | fpri|
|000040c0| 6e 74 66 28 20 73 74 64 | 65 72 72 2c 20 22 75 75 |ntf( std|err, "uu|
|000040d0| 70 6f 6c 6c 3a 20 70 6f | 6c 6c 5f 73 75 63 63 65 |poll: po|ll_succe|
|000040e0| 73 73 66 75 6c 3a 20 25 | 73 20 2d 2d 20 25 73 20 |ssful: %|s -- %s |
|000040f0| 25 73 5c 5c 6e 22 2c 0a | 20 20 20 20 20 20 20 20 |%s\\n",.| |
|00004100| 20 20 20 20 73 79 73 6e | 61 6d 65 2c 20 75 73 74 | sysn|ame, ust|
|00004110| 61 74 31 2c 20 75 73 74 | 61 74 32 20 29 3b 0a 23 |at1, ust|at2 );.#|
|00004120| 20 20 20 20 20 20 20 65 | 6e 64 69 66 0a 0a 20 20 | e|ndif.. |
|00004130| 20 20 20 20 20 20 2f 2a | 0a 20 20 20 20 20 20 20 | /*|. |
|00004140| 20 2a 2a 20 20 20 20 20 | 20 49 66 20 74 68 65 20 | ** | If the |
|00004150| 22 43 4f 4e 56 45 52 53 | 41 54 49 4f 4e 20 53 55 |"CONVERS|ATION SU|
|00004160| 43 43 45 44 45 44 22 20 | 73 74 72 69 6e 67 20 69 |CCEDED" |string i|
|00004170| 73 20 72 65 63 6f 67 6e | 69 7a 65 64 0a 20 20 20 |s recogn|ized. |
|00004180| 20 20 20 20 20 2a 2a 20 | 20 20 20 20 20 72 65 74 | ** | ret|
|00004190| 75 72 6e 20 54 52 55 45 | 20 6f 74 68 65 72 77 69 |urn TRUE| otherwi|
|000041a0| 73 65 20 46 41 4c 53 45 | 20 77 69 6c 6c 20 62 65 |se FALSE| will be|
|000041b0| 20 72 65 74 75 72 6e 65 | 64 20 62 79 20 64 65 66 | returne|d by def|
|000041c0| 61 75 6c 74 2e 0a 20 20 | 20 20 20 20 20 20 2a 2f |ault.. | */|
|000041d0| 0a 20 20 20 20 20 20 20 | 20 69 66 28 20 73 74 72 |. | if( str|
|000041e0| 63 6d 70 28 20 75 73 74 | 61 74 31 2c 20 22 43 4f |cmp( ust|at1, "CO|
|000041f0| 4e 56 45 52 53 41 54 49 | 4f 4e 22 20 29 20 3d 3d |NVERSATI|ON" ) ==|
|00004200| 20 30 20 26 26 0a 20 20 | 20 20 20 20 20 20 20 20 | 0 &&. | |
|00004210| 20 20 73 74 72 63 6d 70 | 28 20 75 73 74 61 74 32 | strcmp|( ustat2|
|00004220| 2c 20 22 53 55 43 43 45 | 45 44 45 44 22 20 29 20 |, "SUCCE|EDED" ) |
|00004230| 3d 3d 20 30 20 29 20 20 | 20 20 20 72 65 73 75 6c |== 0 ) | resul|
|00004240| 74 20 3d 20 54 52 55 45 | 3b 0a 20 20 20 20 20 20 |t = TRUE|;. |
|00004250| 20 20 7d 0a 0a 23 20 20 | 20 69 66 64 65 66 20 44 | }..# | ifdef D|
|00004260| 45 42 55 47 0a 20 20 20 | 20 66 70 72 69 6e 74 66 |EBUG. | fprintf|
|00004270| 28 20 73 74 64 65 72 72 | 2c 20 22 75 75 70 6f 6c |( stderr|, "uupol|
|00004280| 6c 3a 20 70 6f 6c 6c 5f | 73 75 63 63 65 73 73 66 |l: poll_|successf|
|00004290| 75 6c 3a 20 72 65 74 75 | 72 6e 69 6e 67 20 2d 2d |ul: retu|rning --|
|000042a0| 20 25 64 5c 5c 6e 22 2c | 20 72 65 73 75 6c 74 20 | %d\\n",| result |
|000042b0| 29 3b 0a 23 20 20 20 65 | 6e 64 69 66 0a 0a 20 20 |);.# e|ndif.. |
|000042c0| 20 20 66 63 6c 6f 73 65 | 28 20 66 70 69 70 65 20 | fclose|( fpipe |
|000042d0| 29 3b 0a 20 20 20 20 72 | 65 74 75 72 6e 20 72 65 |);. r|eturn re|
|000042e0| 73 75 6c 74 3b 0a 20 20 | 20 20 7d 0a 0a 0a 76 6f |sult;. | }...vo|
|000042f0| 69 64 20 63 6c 65 61 6e | 5f 75 70 28 29 0a 20 20 |id clean|_up(). |
|00004300| 20 20 7b 0a 20 20 20 20 | 63 68 61 72 20 2a 66 6e | {. |char *fn|
|00004310| 61 6d 65 3b 0a 0a 20 20 | 20 20 2f 2a 0a 20 20 20 |ame;.. | /*. |
|00004320| 20 2a 2a 20 20 46 6f 72 | 20 65 61 63 68 20 70 6f | ** For| each po|
|00004330| 6c 6c 20 66 69 6c 65 20 | 69 6e 20 74 68 65 20 73 |ll file |in the s|
|00004340| 70 6f 6f 6c 20 64 69 72 | 65 63 74 6f 72 79 20 66 |pool dir|ectory f|
|00004350| 69 6e 64 20 74 68 65 0a | 20 20 20 20 2a 2a 20 20 |ind the.| ** |
|00004360| 64 61 79 20 72 65 63 6f | 72 64 20 28 65 2e 67 2e |day reco|rd (e.g.|
|00004370| 20 44 20 6e 6e 29 2e 20 | 20 49 66 20 6e 6e 20 69 | D nn). | If nn i|
|00004380| 73 20 30 20 74 68 65 20 | 70 6f 6c 6c 20 69 73 0a |s 0 the |poll is.|
|00004390| 20 20 20 20 2a 2a 20 20 | 70 65 72 70 65 74 75 61 | ** |perpetua|
|000043a0| 6c 20 67 6f 20 74 6f 20 | 74 68 65 20 6e 65 78 74 |l go to |the next|
|000043b0| 20 66 69 6c 65 2e 20 20 | 49 66 20 6e 6e 20 69 73 | file. |If nn is|
|000043c0| 20 31 20 74 68 65 20 70 | 6f 6c 6c 0a 20 20 20 20 | 1 the p|oll. |
|000043d0| 2a 2a 20 20 68 61 73 20 | 65 78 70 69 72 65 64 2e |** has |expired.|
|000043e0| 20 20 44 65 6c 65 74 65 | 20 61 6e 64 20 6d 61 69 | Delete| and mai|
|000043f0| 6c 20 74 68 65 20 75 73 | 65 72 20 6e 6f 74 69 66 |l the us|er notif|
|00004400| 69 63 61 74 69 6f 6e 0a | 20 20 20 20 2a 2a 20 20 |ication.| ** |
|00004410| 74 68 61 74 20 74 68 65 | 20 66 69 6c 65 20 68 61 |that the| file ha|
|00004420| 73 20 62 65 65 6e 20 64 | 69 73 63 61 72 64 65 64 |s been d|iscarded|
|00004430| 2e 20 74 68 65 20 66 69 | 6c 65 2e 20 20 4f 74 68 |. the fi|le. Oth|
|00004440| 65 72 77 69 73 65 20 0a | 20 20 20 20 2a 2a 20 20 |erwise .| ** |
|00004450| 64 65 63 72 65 6d 65 6e | 74 20 6e 6e 20 61 6e 64 |decremen|t nn and|
|00004460| 20 77 72 69 74 65 20 74 | 68 65 20 72 65 63 6f 72 | write t|he recor|
|00004470| 64 20 62 61 63 6b 20 74 | 6f 20 74 68 65 20 66 69 |d back t|o the fi|
|00004480| 6c 65 2e 0a 20 20 20 20 | 2a 2f 0a 20 20 20 20 77 |le.. |*/. w|
|00004490| 68 69 6c 65 28 20 28 20 | 66 6e 61 6d 65 20 3d 20 |hile( ( |fname = |
|000044a0| 67 65 74 70 6f 6c 6c 28 | 29 20 29 20 21 3d 20 4e |getpoll(|) ) != N|
|000044b0| 55 4c 4c 20 29 0a 20 20 | 20 20 20 20 20 20 7b 0a |ULL ). | {.|
|000044c0| 20 20 20 20 20 20 20 20 | 46 49 4c 45 20 2a 66 70 | |FILE *fp|
|000044d0| 3b 0a 20 20 20 20 20 20 | 20 20 6c 6f 6e 67 20 66 |;. | long f|
|000044e0| 70 6f 73 3b 0a 20 20 20 | 20 20 20 20 20 69 6e 74 |pos;. | int|
|000044f0| 20 72 63 3b 0a 20 20 20 | 20 20 20 20 20 75 6e 73 | rc;. | uns|
|00004500| 69 67 6e 65 64 20 69 6e | 74 20 64 61 79 73 3b 0a |igned in|t days;.|
|00004510| 0a 20 20 20 20 20 20 20 | 20 69 66 28 20 28 20 66 |. | if( ( f|
|00004520| 70 20 3d 20 66 6f 70 65 | 6e 28 20 66 6e 61 6d 65 |p = fope|n( fname|
|00004530| 2c 20 22 72 2b 22 20 29 | 20 29 20 3d 3d 20 4e 55 |, "r+" )| ) == NU|
|00004540| 4c 4c 20 29 0a 20 20 20 | 20 20 20 20 20 20 20 20 |LL ). | |
|00004550| 20 7b 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 66 | {. | f|
|00004560| 70 72 69 6e 74 66 28 20 | 73 74 64 65 72 72 2c 20 |printf( |stderr, |
|00004570| 22 75 75 70 6f 6c 6c 3a | 20 63 6c 65 61 6e 5f 75 |"uupoll:| clean_u|
|00004580| 70 3a 20 63 61 6e 6e 6f | 74 20 61 63 63 65 73 73 |p: canno|t access|
|00004590| 20 25 73 5c 5c 6e 22 2c | 20 66 6e 61 6d 65 20 29 | %s\\n",| fname )|
|000045a0| 3b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 66 63 |;. | fc|
|000045b0| 6c 6f 73 65 28 20 66 70 | 20 29 3b 0a 20 20 20 20 |lose( fp| );. |
|000045c0| 20 20 20 20 20 20 20 20 | 63 6f 6e 74 69 6e 75 65 | |continue|
|000045d0| 3b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 7d 0a |;. | }.|
|000045e0| 0a 20 20 20 20 20 20 20 | 20 64 6f 20 66 70 6f 73 |. | do fpos|
|000045f0| 20 3d 20 66 73 65 65 6b | 28 20 66 70 2c 20 30 4c | = fseek|( fp, 0L|
|00004600| 2c 20 31 20 29 3b 0a 20 | 20 20 20 20 20 20 20 77 |, 1 );. | w|
|00004610| 68 69 6c 65 28 20 28 20 | 72 63 20 3d 20 66 73 63 |hile( ( |rc = fsc|
|00004620| 61 6e 66 28 20 66 70 2c | 20 22 44 20 25 30 32 64 |anf( fp,| "D %02d|
|00004630| 5c 5c 6e 22 2c 20 26 64 | 61 79 73 20 29 20 29 20 |\\n", &d|ays ) ) |
|00004640| 21 3d 20 31 20 26 26 20 | 72 63 20 21 3d 20 45 4f |!= 1 && |rc != EO|
|00004650| 46 20 29 3b 0a 0a 20 20 | 20 20 20 20 20 20 69 66 |F );.. | if|
|00004660| 28 20 72 63 20 3d 3d 20 | 45 4f 46 20 29 20 0a 20 |( rc == |EOF ) . |
|00004670| 20 20 20 20 20 20 20 20 | 20 20 20 7b 0a 20 20 20 | | {. |
|00004680| 20 20 20 20 20 20 20 20 | 20 66 70 72 69 6e 74 66 | | fprintf|
|00004690| 28 20 73 74 64 65 72 72 | 2c 0a 20 20 20 20 20 20 |( stderr|,. |
|000046a0| 20 20 20 20 20 20 20 20 | 20 20 22 75 75 70 6f 6c | | "uupol|
|000046b0| 6c 3a 20 63 6c 65 61 6e | 5f 75 70 3a 20 63 61 6e |l: clean|_up: can|
|000046c0| 6e 6f 74 20 66 69 6e 64 | 20 64 61 79 73 20 69 6e |not find| days in|
|000046d0| 20 25 73 5c 5c 6e 22 2c | 20 66 6e 61 6d 65 20 29 | %s\\n",| fname )|
|000046e0| 3b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 66 63 |;. | fc|
|000046f0| 6c 6f 73 65 28 20 66 70 | 20 29 3b 0a 20 20 20 20 |lose( fp| );. |
|00004700| 20 20 20 20 20 20 20 20 | 63 6f 6e 74 69 6e 75 65 | |continue|
|00004710| 3b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 7d 0a |;. | }.|
|00004720| 0a 20 20 20 20 20 20 20 | 20 73 77 69 74 63 68 28 |. | switch(|
|00004730| 20 64 61 79 73 20 29 0a | 20 20 20 20 20 20 20 20 | days ).| |
|00004740| 20 20 20 20 7b 0a 20 20 | 20 20 20 20 20 20 20 20 | {. | |
|00004750| 20 20 63 68 61 72 20 6d | 61 69 6c 5f 63 6d 64 5b | char m|ail_cmd[|
|00004760| 38 30 5d 3b 0a 20 20 20 | 20 20 20 20 20 20 20 20 |80];. | |
|00004770| 20 63 68 61 72 20 6c 69 | 6e 65 5b 38 30 5d 3b 0a | char li|ne[80];.|
|00004780| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 63 61 73 |. | cas|
|00004790| 65 20 30 3a 0a 20 20 20 | 20 20 20 20 20 20 20 20 |e 0:. | |
|000047a0| 20 66 63 6c 6f 73 65 28 | 20 66 70 20 29 3b 0a 20 | fclose(| fp );. |
|000047b0| 20 20 20 20 20 20 20 20 | 20 20 20 62 72 65 61 6b | | break|
|000047c0| 3b 0a 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 63 |;.. | c|
|000047d0| 61 73 65 20 31 3a 0a 20 | 20 20 20 20 20 20 20 20 |ase 1:. | |
|000047e0| 20 20 20 66 63 6c 6f 73 | 65 28 20 66 70 20 29 3b | fclos|e( fp );|
|000047f0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 75 6e 6c |. | unl|
|00004800| 69 6e 6b 28 20 66 6e 61 | 6d 65 20 29 3b 0a 20 20 |ink( fna|me );. |
|00004810| 20 20 20 20 20 20 20 20 | 20 20 73 70 72 69 6e 74 | | sprint|
|00004820| 66 28 20 6d 61 69 6c 5f | 63 6d 64 2c 20 0a 20 20 |f( mail_|cmd, . |
|00004830| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 22 65 | | "e|
|00004840| 63 68 6f 20 50 6f 6c 6c | 20 66 69 6c 65 20 25 73 |cho Poll| file %s|
|00004850| 20 65 78 70 69 72 65 64 | 20 2d 2d 20 64 65 6c 65 | expired| -- dele|
|00004860| 74 65 64 20 62 79 20 75 | 75 70 6f 6c 6c 20 7c 20 |ted by u|upoll | |
|00004870| 6d 61 69 6c 20 25 73 5c | 5c 6e 22 2c 0a 20 20 20 |mail %s\|\n",. |
|00004880| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 66 6e 61 | | fna|
|00004890| 6d 65 2c 20 63 75 73 65 | 72 69 64 28 20 4e 55 4c |me, cuse|rid( NUL|
|000048a0| 4c 20 29 20 29 3b 0a 20 | 20 20 20 20 20 20 20 20 |L ) );. | |
|000048b0| 20 20 20 73 79 73 74 65 | 6d 28 20 6d 61 69 6c 5f | syste|m( mail_|
|000048c0| 63 6d 64 20 29 3b 0a 20 | 20 20 20 20 20 20 20 20 |cmd );. | |
|000048d0| 20 20 20 62 72 65 61 6b | 3b 0a 0a 20 20 20 20 20 | break|;.. |
|000048e0| 20 20 20 20 20 20 20 64 | 65 66 61 75 6c 74 3a 0a | d|efault:.|
|000048f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 72 65 77 69 | | rewi|
|00004900| 6e 64 28 20 66 70 20 29 | 3b 0a 20 20 20 20 20 20 |nd( fp )|;. |
|00004910| 20 20 20 20 20 20 66 73 | 65 65 6b 28 20 66 70 2c | fs|eek( fp,|
|00004920| 20 66 70 6f 73 2c 20 30 | 20 29 3b 0a 20 20 20 20 | fpos, 0| );. |
|00004930| 20 20 20 20 20 20 20 20 | 73 70 72 69 6e 74 66 28 | |sprintf(|
|00004940| 20 6c 69 6e 65 2c 20 22 | 44 20 25 30 32 64 5c 5c | line, "|D %02d\\|
|00004950| 6e 22 2c 20 2d 2d 64 61 | 79 73 20 29 3b 0a 20 20 |n", --da|ys );. |
|00004960| 20 20 20 20 20 20 20 20 | 20 20 66 70 75 74 73 28 | | fputs(|
|00004970| 20 6c 69 6e 65 2c 20 66 | 70 20 29 3b 0a 20 20 20 | line, f|p );. |
|00004980| 20 20 20 20 20 20 20 20 | 20 66 73 65 65 6b 28 20 | | fseek( |
|00004990| 66 70 2c 20 30 4c 2c 20 | 32 20 29 3b 0a 20 20 20 |fp, 0L, |2 );. |
|000049a0| 20 20 20 20 20 20 20 20 | 20 72 65 77 69 6e 64 28 | | rewind(|
|000049b0| 20 66 70 20 29 3b 0a 20 | 20 20 20 20 20 20 20 20 | fp );. | |
|000049c0| 20 20 20 66 63 6c 6f 73 | 65 28 20 66 70 20 29 3b | fclos|e( fp );|
|000049d0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 62 72 65 |. | bre|
|000049e0| 61 6b 3b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |ak;. | |
|000049f0| 7d 0a 20 20 20 20 20 20 | 20 20 7d 0a 20 20 20 20 |}. | }. |
|00004a00| 7d 0a 0a 0a 63 68 61 72 | 20 2a 67 65 74 70 6f 6c |}...char| *getpol|
|00004a10| 6c 28 29 0a 20 20 20 20 | 7b 0a 20 20 20 20 73 74 |l(). |{. st|
|00004a20| 61 74 69 63 20 20 69 6e | 74 20 66 64 20 3d 20 2d |atic in|t fd = -|
|00004a30| 31 3b 0a 20 20 20 20 73 | 74 61 74 69 63 20 20 73 |1;. s|tatic s|
|00004a40| 74 72 75 63 74 20 64 69 | 72 65 63 74 78 0a 20 20 |truct di|rectx. |
|00004a50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 7b 0a | | {.|
|00004a60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004a70| 69 6e 6f 5f 74 20 64 5f | 69 6e 6f 3b 0a 20 20 20 |ino_t d_|ino;. |
|00004a80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 63 68 61 | | cha|
|00004a90| 72 20 20 64 5f 6e 61 6d | 65 5b 20 44 49 52 53 49 |r d_nam|e[ DIRSI|
|00004aa0| 5a 2b 31 20 5d 3b 0a 20 | 20 20 20 20 20 20 20 20 |Z+1 ];. | |
|00004ab0| 20 20 20 20 20 20 20 7d | 0a 20 20 20 20 20 20 20 | }|. |
|00004ac0| 20 20 20 20 20 64 69 72 | 5f 65 6e 74 3b 0a 0a 20 | dir|_ent;.. |
|00004ad0| 20 20 20 2f 2a 0a 20 20 | 20 20 2a 2a 20 20 4f 70 | /*. | ** Op|
|00004ae0| 65 6e 20 74 68 65 20 64 | 69 72 65 63 74 6f 72 79 |en the d|irectory|
|00004af0| 20 66 69 6c 65 20 69 6e | 20 6e 6f 74 20 6f 70 65 | file in| not ope|
|00004b00| 6e 65 64 20 6f 6e 20 61 | 20 70 72 65 76 69 6f 75 |ned on a| previou|
|00004b10| 73 20 63 61 6c 6c 2e 0a | 20 20 20 20 2a 2f 0a 20 |s call..| */. |
|00004b20| 20 20 20 69 66 28 20 66 | 64 20 3d 3d 20 2d 31 20 | if( f|d == -1 |
|00004b30| 29 0a 20 20 20 20 20 20 | 20 20 7b 0a 20 20 20 20 |). | {. |
|00004b40| 20 20 20 20 69 66 28 20 | 28 20 66 64 20 3d 20 6f | if( |( fd = o|
|00004b50| 70 65 6e 28 20 22 2e 22 | 2c 20 4f 5f 52 44 4f 4e |pen( "."|, O_RDON|
|00004b60| 4c 59 20 29 20 29 20 3d | 3d 20 2d 31 20 29 0a 20 |LY ) ) =|= -1 ). |
|00004b70| 20 20 20 20 20 20 20 20 | 20 20 20 7b 0a 20 20 20 | | {. |
|00004b80| 20 20 20 20 20 20 20 20 | 20 66 70 72 69 6e 74 66 | | fprintf|
|00004b90| 28 20 73 74 64 65 72 72 | 2c 20 22 75 75 70 6f 6c |( stderr|, "uupol|
|00004ba0| 6c 3a 20 63 61 6e 6e 6f | 74 20 61 63 63 65 73 73 |l: canno|t access|
|00004bb0| 20 73 70 6f 6f 6c 20 64 | 69 72 65 63 74 6f 72 79 | spool d|irectory|
|00004bc0| 5c 5c 6e 22 20 29 3b 0a | 20 20 20 20 20 20 20 20 |\\n" );.| |
|00004bd0| 20 20 20 20 65 78 69 74 | 28 20 31 20 29 3b 0a 20 | exit|( 1 );. |
|00004be0| 20 20 20 20 20 20 20 20 | 20 20 20 7d 0a 20 20 20 | | }. |
|00004bf0| 20 20 20 20 20 64 69 72 | 5f 65 6e 74 2e 64 5f 6e | dir|_ent.d_n|
|00004c00| 61 6d 65 5b 44 49 52 53 | 49 5a 5d 20 3d 20 27 5c |ame[DIRS|IZ] = '\|
|00004c10| 5c 30 27 3b 0a 20 20 20 | 20 20 20 20 20 7d 0a 0a |\0';. | }..|
|00004c20| 20 20 20 20 2f 2a 0a 20 | 20 20 20 2a 2a 20 20 52 | /*. | ** R|
|00004c30| 65 61 64 20 65 6e 74 72 | 69 65 73 20 75 6e 74 69 |ead entr|ies unti|
|00004c40| 6c 20 65 69 74 68 65 72 | 20 61 20 70 6f 6c 6c 20 |l either| a poll |
|00004c50| 66 69 6c 65 20 69 73 20 | 66 6f 75 6e 64 20 28 65 |file is |found (e|
|00004c60| 2e 67 2e 20 50 2e 73 79 | 73 6e 61 6d 65 29 0a 20 |.g. P.sy|sname). |
|00004c70| 20 20 20 2a 2a 20 20 6f | 72 20 45 4f 46 20 69 73 | ** o|r EOF is|
|00004c80| 20 65 6e 63 6f 75 6e 74 | 65 72 65 64 2e 0a 20 20 | encount|ered.. |
|00004c90| 20 20 2a 2f 0a 20 20 20 | 20 64 6f 20 69 66 28 20 | */. | do if( |
|00004ca0| 21 72 65 61 64 28 20 66 | 64 2c 20 26 64 69 72 5f |!read( f|d, &dir_|
|00004cb0| 65 6e 74 2c 20 73 69 7a | 65 6f 66 28 20 73 74 72 |ent, siz|eof( str|
|00004cc0| 75 63 74 20 20 64 69 72 | 65 63 74 20 29 20 29 20 |uct dir|ect ) ) |
|00004cd0| 29 0a 20 20 20 20 20 20 | 20 20 7b 0a 20 20 20 20 |). | {. |
|00004ce0| 20 20 20 20 63 6c 6f 73 | 65 28 20 66 64 20 29 3b | clos|e( fd );|
|00004cf0| 0a 20 20 20 20 20 20 20 | 20 72 65 74 75 72 6e 20 |. | return |
|00004d00| 4e 55 4c 4c 3b 0a 20 20 | 20 20 20 20 20 20 7d 0a |NULL;. | }.|
|00004d10| 20 20 20 20 77 68 69 6c | 65 28 20 64 69 72 5f 65 | whil|e( dir_e|
|00004d20| 6e 74 2e 64 5f 6e 61 6d | 65 5b 30 5d 20 21 3d 20 |nt.d_nam|e[0] != |
|00004d30| 27 50 27 20 7c 7c 0a 20 | 20 20 20 20 20 20 20 20 |'P' ||. | |
|00004d40| 20 20 64 69 72 5f 65 6e | 74 2e 64 5f 6e 61 6d 65 | dir_en|t.d_name|
|00004d50| 5b 31 5d 20 21 3d 20 27 | 2e 27 20 7c 7c 0a 20 20 |[1] != '|.' ||. |
|00004d60| 20 20 20 20 20 20 20 20 | 20 64 69 72 5f 65 6e 74 | | dir_ent|
|00004d70| 2e 64 5f 69 6e 6f 20 3d | 3d 20 30 20 29 3b 0a 0a |.d_ino =|= 0 );..|
|00004d80| 20 20 20 20 72 65 74 75 | 72 6e 20 64 69 72 5f 65 | retu|rn dir_e|
|00004d90| 6e 74 2e 64 5f 6e 61 6d | 65 3b 0a 20 20 20 20 7d |nt.d_nam|e;. }|
|00004da0| 0a 0a 0a 76 6f 69 64 20 | 75 75 6e 6c 69 6e 6b 28 |...void |uunlink(|
|00004db0| 20 70 20 29 20 20 20 20 | 20 20 20 20 20 20 20 2f | p ) | /|
|00004dc0| 2a 20 55 6e 6c 69 6e 6b | 20 74 68 65 20 69 6e 70 |* Unlink| the inp|
|00004dd0| 75 74 20 70 6f 6c 6c 20 | 66 69 6c 65 20 6e 61 6d |ut poll |file nam|
|00004de0| 65 20 6f 72 20 2a 2f 0a | 63 68 61 72 20 2a 70 3b |e or */.|char *p;|
|00004df0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004e00| 20 20 20 20 2f 2a 20 75 | 6e 6c 69 6e 6b 20 22 61 | /* u|nlink "a|
|00004e10| 6c 6c 22 20 70 6f 6c 6c | 20 66 69 6c 65 73 20 2a |ll" poll| files *|
|00004e20| 2f 0a 20 20 20 20 7b 0a | 20 20 20 20 63 68 61 72 |/. {.| char|
|00004e30| 20 2a 70 66 3b 0a 20 20 | 20 20 69 66 28 20 73 74 | *pf;. | if( st|
|00004e40| 72 63 6d 70 28 20 70 2c | 20 22 50 2e 61 6c 6c 22 |rcmp( p,| "P.all"|
|00004e50| 20 29 20 29 0a 20 20 20 | 20 20 20 20 20 7b 0a 20 | ) ). | {. |
|00004e60| 20 20 20 20 20 20 20 75 | 6e 6c 69 6e 6b 28 20 70 | u|nlink( p|
|00004e70| 20 29 3b 0a 20 20 20 20 | 20 20 20 20 72 65 74 75 | );. | retu|
|00004e80| 72 6e 3b 0a 20 20 20 20 | 20 20 20 20 7d 0a 20 20 |rn;. | }. |
|00004e90| 20 20 65 6c 73 65 20 20 | 20 20 77 68 69 6c 65 28 | else | while(|
|00004ea0| 20 28 20 70 66 3d 67 65 | 74 70 6f 6c 6c 28 29 20 | ( pf=ge|tpoll() |
|00004eb0| 29 20 21 3d 20 4e 55 4c | 4c 20 29 20 20 20 75 6e |) != NUL|L ) un|
|00004ec0| 6c 69 6e 6b 28 20 70 66 | 20 29 3b 0a 20 20 20 20 |link( pf| );. |
|00004ed0| 7d 0a 0a 0a 76 6f 69 64 | 20 75 70 72 69 6e 74 28 |}...void| uprint(|
|00004ee0| 20 73 79 73 20 29 20 20 | 20 20 20 20 20 20 20 20 | sys ) | |
|00004ef0| 2f 2a 20 50 72 69 6e 74 | 20 74 68 65 20 70 6f 6c |/* Print| the pol|
|00004f00| 6c 20 73 79 73 74 65 6d | 20 6e 61 6d 65 20 6f 72 |l system| name or|
|00004f10| 20 74 68 65 20 2a 2f 0a | 63 68 61 72 20 2a 73 79 | the */.|char *sy|
|00004f20| 73 3b 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |s; | |
|00004f30| 20 20 20 20 2f 2a 20 6e | 61 6d 65 73 20 6f 66 20 | /* n|ames of |
|00004f40| 22 61 6c 6c 22 20 73 79 | 73 74 65 6d 73 20 77 69 |"all" sy|stems wi|
|00004f50| 74 68 20 70 6f 6c 6c 20 | 66 69 6c 65 73 20 2a 2f |th poll |files */|
|00004f60| 0a 20 20 20 20 7b 0a 20 | 20 20 20 63 68 61 72 20 |. {. | char |
|00004f70| 2a 70 73 79 73 3b 0a 20 | 20 20 20 69 66 28 20 73 |*psys;. | if( s|
|00004f80| 74 72 63 6d 70 28 20 73 | 79 73 2c 20 22 61 6c 6c |trcmp( s|ys, "all|
|00004f90| 22 20 29 20 29 20 20 20 | 20 20 20 20 20 20 20 20 |" ) ) | |
|00004fa0| 20 20 20 20 20 20 20 70 | 72 69 6e 74 66 28 20 22 | p|rintf( "|
|00004fb0| 25 73 5c 5c 6e 22 2c 20 | 73 79 73 20 29 3b 0a 20 |%s\\n", |sys );. |
|00004fc0| 20 20 20 65 6c 73 65 20 | 77 68 69 6c 65 28 20 28 | else |while( (|
|00004fd0| 20 70 73 79 73 3d 67 65 | 74 70 6f 6c 6c 28 29 20 | psys=ge|tpoll() |
|00004fe0| 29 20 21 3d 20 4e 55 4c | 4c 20 29 20 20 20 20 70 |) != NUL|L ) p|
|00004ff0| 72 69 6e 74 66 28 20 22 | 25 73 5c 5c 6e 22 2c 20 |rintf( "|%s\\n", |
|00005000| 26 70 73 79 73 5b 32 5d | 20 29 3b 0a 20 20 20 20 |&psys[2]| );. |
|00005010| 7d 0a 53 48 41 52 5f 45 | 4f 46 0a 66 69 0a 0a 23 |}.SHAR_E|OF.fi..#|
|00005020| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005030| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005040| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005050| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005060| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 23 0a |--------|------#.|
|00005070| 20 0a 65 78 69 74 20 30 | 0a 23 09 45 6e 64 20 6f | .exit 0|.#.End o|
|00005080| 66 20 73 68 65 6c 6c 20 | 61 72 63 68 69 76 65 0a |f shell |archive.|
+--------+-------------------------+-------------------------+--------+--------+