home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / std_unix / mod.std.unix.v4 < prev    next >
Internet Message Format  |  1987-06-30  |  56KB

  1. From jsq  Wed Nov 27 21:15:55 1985
  2. Path: ut-sally!std-unix
  3. From: std-unix@ut-sally.UUCP (Moderator, John Quarterman)
  4. Newsgroups: mod.std.unix
  5. Subject: V4N1; mod.std.unix Volume 4
  6. Message-Id: <3667@ut-sally.UUCP>
  7. Date: 28 Nov 85 03:15:49 GMT
  8. Organization: IEEE/P1003 Portable Operating System Environment Committee
  9. Lines: 37
  10. Approved: jsq@sally.UUCP
  11. Draft-9: mod.std.unix
  12.  
  13. This is the first article in Volume 4 of mod.std.unix/std-unix.
  14. The new volume is strictly for administrative convenience, as
  15. I am about to post information on how to get P1003 Draft 6 and
  16. if that's at the beginning of a volume people will find it more
  17. easily when I tell them to ftp the volume.
  18.  
  19. Feel free to continue any discussions from the previous volume,
  20. or to start new ones.
  21.  
  22.  
  23. The USENET newsgroup mod.std.unix is for discussions of UNIX standards,
  24. particularly the IEEE P1003 draft standard.  It is also distributed
  25. in an ARPA Internet mailing list.  I'm the moderator, which mostly
  26. means I post what you send me.
  27.  
  28. Submissions-To:    ut-sally!std-unix    or std-unix@sally.UTEXAS.EDU
  29. Comments-To: ut-sally!std-unix-request    or std-unix-request@sally.UTEXAS.EDU
  30. UUCP-Routes: {ihnp4,seismo,harvard,gatech}!ut-sally!std-unix
  31.  
  32. Permission to post to the newsgroup is assumed for mail to std-unix.
  33. Permission to post is not assumed for mail to std-unix-request,
  34. unless explicitly granted in the mail.  Mail to my personal addresses
  35. will be treated like mail to std-unix-request if it obviously refers
  36. to the newsgroup.
  37.  
  38. Archives may be found on sally.UTEXAS.EDU.  The current volume may
  39. be retreived by anonymous ftp (login anonymous, password guest)
  40. as ~ftp/pub/mod.std.unix, while the previous volumes may be retrieved
  41. as ~ftp/pub/mod.std.unix.v1 and ~ftp/pub/mod.std.unix.v2.
  42. The volume with the AT&T public domain getopt(3) is ~ftp/pub/mod.std.unix.v3.
  43.  
  44. Finally, remember that any remarks by any committee member (especially
  45. including me) in this newsgroup do not represent any position (including
  46. any draft, proposed or actual, of the standard) of the committee as a
  47. whole, unless explicitly stated otherwise in such remarks.
  48.  
  49. Volume-Number: Volume 4, Number 1
  50.  
  51. From jsq  Wed Nov 27 21:53:42 1985
  52. Path: ut-sally!std-unix
  53. From: std-unix@ut-sally.UUCP (Moderator, John Quarterman)
  54. Newsgroups: mod.std.unix
  55. Subject: V4N2; P1003.D6
  56. Message-Id: <3668@ut-sally.UUCP>
  57. Date: 28 Nov 85 03:53:35 GMT
  58. Organization: IEEE/P1003 Portable Operating System Environment Committee
  59. Lines: 66
  60. Approved: jsq@sally.UUCP
  61. Draft-9: D6.Access
  62.  
  63. An online document which "represents" P1003 Draft 6 is on sally.UTEXAS.EDU,
  64. for retrieval by anonymous ftp (connect with ftp, log in as anonymous
  65. with password guest) over the ARPA Internet.  The files are:
  66.  
  67. -rw-r--r--  1 jsq      bin        419840 Nov 27 21:48 ~ftp/pub/P1003.D6
  68. -rw-r--r--  1 jsq      bin        376814 Nov 27 21:50 ~ftp/pub/P1003.D6.doc
  69. -rw-r--r--  1 uucp     uucp       141981 Nov 22 17:37 ~ftp/pub/P1003.D6.Z
  70. -rw-r--r--  1 uucp     uucp       124055 Nov 24 01:31 ~ftp/pub/P1003.D6.doc.Z
  71.  
  72. P1003.D6 is a tar archive of the source for the document.
  73. P1003.D6.doc is an nroff formatted copy of the document, suitable
  74.     for printing on a line printer (contains form feeds and backspaces).
  75. P1003.D6.Z and P1003.D6.doc.Z are compressed copies of the above files.
  76. They were compressed with compress version 4, a public domain program
  77. which has been distributed over newsgroup net.sources on USENET.
  78. There is a copy on sally.UTEXAS.EDU in ~ftp/pub/compress.shar.
  79.  
  80. The list of hosts which previously made Draft 5 available are
  81. sally.UTEXAS.EDU, as above; on UUCP:  ut-sally (contact ut-sally!jsq),
  82. decvax (contact decvax!jmcg), l5, seismo, ucbvax, munnari, and enea.
  83. Presumably they will all pick up at least the compressed files.
  84.  
  85. Those of you who have asked for copies by UUCP mail:  I've found
  86. a method; please contact me again if you're still interested.
  87. If you're on the ARPA Internet you should use ftp.
  88.  
  89. The rest of this article is a note which appears in the document:
  90.  
  91.  
  92. This online document represents, but IS NOT, the current DRAFT (Draft 6,
  93. produced 15 November 1985) of the IEEE Computer Society's P1003 Working
  94. Group for a "Portable Operating System Environment" based on the UNIX
  95. Operating System (Trademark of AT&T Bell Laboratories).
  96.  
  97. This material is copyright of IEEE, with ALL RIGHTS RESERVED.  Please
  98. respect these restrictions so we can continue to offer on-line access to
  99. the information.
  100.  
  101. If you want to join the Correspondent Group (don't expect to make
  102. meetings), the Working Group, or Balloting group for this standards
  103. effort please contact:
  104.  
  105.      Jim Isaak             decvax!frog!jim
  106.      Charles River Data Systems
  107.      983 Concord Street
  108.      Framingham, MA  01701.
  109.  
  110. (Jim needs your US Mail address to send you information about the effort;
  111. he also needs your IEEE Membership Number if you wish to join the Balloting
  112. Group).
  113.  
  114. Draft 6 was prepared for the Trial Use Balloting now taking place, with
  115. a final use ballot some time near the end of 1986.
  116.  
  117. A moderated USENET group exists for on-line discussion of this effort
  118. under the name: mod.std.unix
  119.  
  120. If you want hard copies of the DRAFT, you can obtain these from:
  121.  
  122.     Beth Cummings
  123.     IEEE Standards Office;
  124.     345 E. 47th Street
  125.     New York, NY  10017
  126.  
  127.  
  128. Volume-Number: Volume 4, Number 2
  129.  
  130. From jsq  Sun Dec  1 17:29:44 1985
  131. Path: ut-sally!std-unix
  132. From: std-unix@ut-sally.UUCP (Moderator, John Quarterman)
  133. Newsgroups: mod.std.unix
  134. Subject: Re: V4N2; V4N3: P1003.D6 run script problem
  135. Message-Id: <3684@ut-sally.UUCP>
  136. Date: 1 Dec 85 17:29:44 GMT
  137. References: <3668@ut-sally.UUCP>
  138. Organization: IEEE/P1003 Portable Operating System Environment Committee
  139. Lines: 33
  140. Summary: run script was broken:  here's a working one
  141. Approved: jsq@sally.UUCP
  142. Draft-9: D6.Access
  143.  
  144. The run script in P1003.D6.Z refers to "$HOME/bin/fixuptbl.sed",
  145. which is used locally at decvax to convince their LN01 to draw
  146. continuous vertical and horizontal rules.  It also uses the file
  147. "respform".  In other words, it was a private script for decvax.
  148. Here is a public version.  It also appears on sally.UTEXAS.EDU as
  149.  
  150. -rw-r--r--  1 jsq      bin           512 Dec  1 11:26 ~ftp/pub/P1003.D6.run
  151.  
  152. #! /bin/csh -f
  153.  
  154. # output/forew.pageno must be created by hand; it looks like
  155. #
  156. #    .nr XP 7 \" FOREWORD BEGINS
  157. #
  158. # where the 7 is the number of the first page following the table of contents
  159. #
  160. if( -e output/forew.pageno ) cat output/forew.pageno >output/tbl.o
  161.  
  162. soelim sect/ch* | tbl >>output/tbl.o
  163.  
  164. csh -c 'nice +1 time ditroff -rZ1 -t -Tln01 mmt ieee.macros output/tbl.o >output/draft6' >& output/index.raw
  165.  
  166. cd output 
  167.  
  168.     ../index.tools/mkindex
  169.  
  170.     lpr -Pln -n -m index.ditroff.o draft6
  171.  
  172.     ../index.tools/updaterefs
  173.  
  174. exit
  175.  
  176. Volume-Number: Volume 4, Number 3
  177.  
  178. From news@im4u.UTEXAS.EDU Tue Dec  3 05:46:04 1985
  179. From: std-unix%ut-sally.UUCP@im4u.UTEXAS.EDU (Moderator, John Quarterman)
  180. Newsgroups: mod.std.unix
  181. Subject: Re: limits; V4N4
  182. Message-Id: <3692@ut-sally.UUCP>
  183. References: <3575@ut-sally.UUCP>
  184. Organization: IEEE/P1003 Portable Operating System Environment Committee
  185. Date: 3 Dec 85 11:22:26 GMT
  186. Draft-9: 2.9
  187.  
  188. Date: Tue, 26 Nov 85 21:47:31 pst
  189. From: topaz!packard!scgvaxd!trwrb!desint!geoff (Geoff Kuenning)
  190.  
  191. In article <3575@ut-sally.UUCP> allegra!jpl (John P. Linderman) writes:
  192.  
  193. >2)  The kernel is a lousy place to store the limits.h information.
  194. >    It is preposterous to have a separate system call for each
  195. >    value.  If you return a structure that includes all the values,
  196. >    you trash existing binaries whenever you make the returned
  197. >    structure larger by adding another value.  If you use an index
  198. >    to return a single value, you can only port to systems that
  199. >    agree with you on the index values.
  200.  
  201. Both of these "problems" are easily solved non-problems;  nevertheless
  202. I think I have been convinced that a file like /etc/limits (or some
  203. such) is a superior solution on the principle of "don't put it in the
  204. kernel unless you have to."
  205.  
  206. Talking about his proposed solution (posted with the article, John writes
  207. that if you try out his
  208. >program, you will recognize one problem.  It's slow.  I claim this is
  209. >a non-problem: look up your values once, and then run nice and fast.
  210.  
  211. Give me a break, John.  Do you seriously expect me to wait for you to
  212. run cc and sed every time I want to start up the editor?  I realize
  213. that your program is a quick hack, but I don't think we can just
  214. cavalierly write off startup time.  Most BSD users already run with
  215. TERMCAP in their environment, solely as a kludge to get around the cost
  216. of reading through /etc/termcap.  We need to remember that startup times
  217. *are* important, and it is very expensive to open and read through even
  218. a small file.
  219. -- 
  220.  
  221.     Geoff Kuenning
  222.     {hplabs,ihnp4}!trwrb!desint!geoff
  223.  
  224. Volume-Number: Volume 4, Number 4
  225.  
  226. From jsq  Thu Dec  5 11:14:58 1985
  227. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  228. Newsgroups: mod.std.unix
  229. Subject: re: limits; V4N5
  230. Message-Id: <3718@ut-sally.UUCP>
  231. References: <3692@ut-sally.UUCP> <3575@ut-sally.UUCP>
  232. Organization: IEEE/P1003 Portable Operating System Environment Committee
  233. Date: 5 Dec 85 17:14:09 GMT
  234. Draft-9: 2.9
  235.  
  236. Date: Wed, 4 Dec 85 21:31:45 cst
  237. From: allegra!jpl (John P. Linderman)
  238.  
  239. Geoff Kuenning ({hplabs,ihnp4}!trwrb!desint!geoff) raises some
  240. interesting points.
  241.  
  242. > Have you every typed "show *" on VMS (or whatever the syntax is;  I'm
  243. > glad to say I've forgotten)?  [Nope. jpl] You will get a list of literally
  244. > *hundreds* of environment variables, most of which are absolutely
  245. > necessary for the system to work properly.  The result is you can never
  246. > find anything.
  247. > It is *not* a good idea to cavalierly add variables to the environment.
  248.  
  249. Perhaps my posting was unclear.  The environment variable was to be used
  250. to *override* values that were always present in limit.h or /etc/limits.
  251. It is not necessary to use environment variables if you are willing to
  252. live with the defaults.
  253.  
  254. > In the first place, it increases the cost of forking *and* exec-ing,
  255.  
  256. I have certainly heard this stated often enough, but I have never
  257. really observed it.  Perhaps I run on larger machines, or have a
  258. smaller environment.  If we are talking hundredths of a second, it isn't
  259. worth discussing.  If we are talking seconds, I think your fork
  260. and exec are broken.  Anybody have hard documentation on the effect
  261. of environment size?
  262.  
  263. > in the second place every program has to provide for the variable, and
  264.  
  265. I draw a blank on this one.  The putative library routine that looks
  266. up the values also handles the environment variable.  No other source
  267. code cares.  This is in sharp distinction to alternatives such as
  268. adding a command line argument to override default values.  This
  269. approach really *does* make life complicated, not only because
  270. every program must anticipate the command line argument, but also
  271. because the argument must somehow get explicitly passed into every
  272. exec instead of sliding silently along in the environment.
  273.  
  274. > in the third place it makes the user's life more difficult.  I'm already
  275. > harassed enough by the size of my environment, thank you.
  276.  
  277. Sorry to hear that.  I hope it gets better.
  278.  
  279. > Talking about his proposed solution (posted with the article, John writes
  280. > that if you try out his
  281. > >program, you will recognize one problem.  It's slow.  I claim this is
  282. > >a non-problem: look up your values once, and then run nice and fast.
  283. > Give me a break, John.  Do you seriously expect me to wait for you to
  284. > run cc and sed every time I want to start up the editor?  I realize
  285. > that your program is a quick hack, but I don't think we can just
  286. > cavalierly write off startup time.  Most BSD users already run with
  287. > TERMCAP in their environment, solely as a kludge to get around the cost
  288.  
  289. I'm beginning to see why you are harassed by the size of you environment. :-)
  290.  
  291. > of reading through /etc/termcap.  We need to remember that startup times
  292. > *are* important, and it is very expensive to open and read through even
  293. > a small file.
  294.  
  295. I think this is a valid point, although the editor I use already opens
  296. .exrc files in the current directory and my home directory, and
  297. snuffles around in /etc/termcap and who knows what else.  Running the
  298. preprocessor probably wouldn't slow it down much more.  I think Geoff
  299. and I have different visions about what commands might use this
  300. run-time lookup mechanism.  If we assume that the main reason for the
  301. mechanism is to allow runtime lookup of critical values that may
  302. reasonably be expected to vary between binary-compatible machines, then
  303. the mechanism should be of no use to the vast majority of existing
  304. commands.  What does echo need to know that is going to change from
  305. machine to machine?  The applications I had in mind were large data
  306. base applications or other special purpose routines that stressed the
  307. limits of machine resources.  As Geoff points out, the mechanism is
  308. not well suited to commands whose running times are very short.
  309.  
  310. Volume-Number: Volume 4, Number 5
  311.  
  312. From jsq  Thu Dec  5 18:05:25 1985
  313. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  314. Newsgroups: mod.std.unix
  315. Subject: Re: limits; V4N6
  316. Message-Id: <3723@ut-sally.UUCP>
  317. References: <3718@ut-sally.UUCP> <3692@ut-sally.UUCP> <3575@ut-sally.UUCP>
  318. Organization: IEEE/P1003 Portable Operating System Environment Committee
  319. Date: 6 Dec 85 00:05:09 GMT
  320. Draft-9: 2.9
  321.  
  322. Date: Thu, 5 Dec 85 16:45:19 cst
  323. From: allegra!jpl (John P. Linderman)
  324.  
  325. I decided to do a little testing to see how much the size of my
  326. environment affected response time.  I wrote the following korn shell
  327. script, and ran in on an unloaded (but not singleuser) VAX 8600.  Each
  328. main loop runs /bin/echo 1000 times, with exported variable ``a'' doubling
  329. in size each time through the outer loop.  I unset as much as possible,
  330. to minimize the environment, as the export at the start shows.  Adding
  331. a seventh iteration to the outside loop made the environment too big.
  332. All the commands in the inner loop except /bin/echo are shell builtins,
  333. so there should be only one fork and exec per iteration.
  334.  
  335. #!/bin/ksh
  336. a="`cat /etc/fstab`"
  337. unset MAILCHECK RANDOM
  338. export
  339. export a
  340. for i in 1 2 3 4 5 6
  341. do
  342.     export | /usr/ucb/wc
  343.     /bin/date
  344.     j=0
  345.     while let "j = j + 1"  "j <= 1000"
  346.     do
  347.     /bin/echo abc > /dev/null
  348.     done
  349.     /bin/date
  350.     a="$a
  351. $a"
  352. done
  353.  
  354. The results follow.
  355.  
  356. HOME=/
  357. PWD=/
  358.       10      10     181
  359. Thu Dec  5 10:51:01 EST 1985
  360. Thu Dec  5 10:52:12 EST 1985    ( 71 seconds)
  361.       18      18     347
  362. Thu Dec  5 10:52:13 EST 1985
  363. Thu Dec  5 10:53:40 EST 1985    ( 87 seconds)
  364.       34      34     679
  365. Thu Dec  5 10:53:40 EST 1985
  366. Thu Dec  5 10:55:11 EST 1985    ( 91 seconds)
  367.       66      66    1343
  368. Thu Dec  5 10:55:11 EST 1985
  369. Thu Dec  5 10:56:59 EST 1985    (108 seconds)
  370.      130     130    2671
  371. Thu Dec  5 10:56:59 EST 1985
  372. Thu Dec  5 10:59:02 EST 1985    (123 seconds)
  373.      258     258    5327
  374. Thu Dec  5 10:59:03 EST 1985
  375. Thu Dec  5 11:02:35 EST 1985    (152 seconds)
  376.  
  377. There are many possible interpretations of the data, of which I am
  378. certain we'll hear several.  I hadn't expected the size of the
  379. environment to matter as much as it did, but the bottom line for me, on
  380. my nice fast machine, is that the biggest environment I'm allowed to
  381. carry around adds at most a tenth of a second to a fork+exec.  The
  382. actual environment I carry around (about 900 bytes) adds somewhere
  383. around 3 hundredths of a second to that cost.  I simply don't execute
  384. enough processes in a day for that to make a difference.  On a slower
  385. machine, my interpretation might be different.  I'd be curious to
  386. see the results of a similar test on other machines.
  387.  
  388. John P. Linderman   Environmental Studies Department  allegra!jpl
  389.  
  390. Volume-Number: Volume 4, Number 6
  391.  
  392. From jsq  Mon Dec  9 15:13:47 1985
  393. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  394. Newsgroups: mod.std.unix
  395. Subject: Re: limits; V4N7
  396. Message-Id: <3757@ut-sally.UUCP>
  397. References: <3723@ut-sally.UUCP> <3718@ut-sally.UUCP> <3692@ut-sally.UUCP> <3575@ut-sally.UUCP>
  398. Organization: IEEE/P1003 Portable Operating System Environment Committee
  399. Date: 9 Dec 85 21:13:23 GMT
  400. Draft-9: 2.9
  401.  
  402. From: harvard!wjh12!panda!teddy!jpn (John P. Nelson)
  403. Date: Mon, 9 Dec 85 11:35:09 est
  404.  
  405. >I decided to do a little testing to see how much the size of my
  406. >environment affected response time.
  407. >
  408.  
  409. I suspected that the iteration time was affected by the shell searching the
  410. environment, rather than an increase in fork/exec time.  I wrote a C program
  411. to do the same thing as the shell script written by John P. Linderman.  I
  412. was wrong!
  413.  
  414. The following results were achieved on a diskless SUN-2 workstation (a
  415. "perfmeter" running along side indicated 100% cpu usage, and 0% ethernet
  416. activity - apparently everything remained in memory) I would have used a VAX,
  417. but didn't want to annoy my fellow employees).  Your numbers will vary:
  418.  
  419. % testit
  420. Env size 56, loop time 135
  421. Env size 113, loop time 139
  422. Env size 227, loop time 158
  423. Env size 455, loop time 167
  424. Env size 911, loop time 207
  425. Env size 1823, loop time 292
  426. Env size 3647, loop time 470
  427. Env size 7295, loop time 846
  428. fork or exec failure: terminating
  429.  
  430.  
  431. John P. Nelson (decvax!genrad!teddy!jpn seismo!harvard!talcott!panda!teddy!jpn)
  432.  
  433. --- cut here.  testit.c follows: ---
  434. #include <stdio.h>
  435.  
  436. char *env[2];
  437. char *echoargv[] =
  438.     {
  439.     "echo",
  440.     "abc",
  441.     (char *) 0
  442.     };
  443.  
  444. #define DEFAULTENV "TEST=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  445. #define INNERLOOP 1000
  446.  
  447. main()
  448.     {
  449.     extern char *malloc(), *realloc();
  450.     register int i;
  451.     register char *ptr;
  452.     long starttime;
  453.     long endtime;
  454.     int waitst;
  455.  
  456.     env[0] = malloc(sizeof(DEFAULTENV));
  457.     strcpy(env[0], DEFAULTENV);
  458.     env[1] = 0;
  459.     close(1);            /* close up stdout */
  460.     if (open("/dev/null", 2) < 0)
  461.     {
  462.     fprintf(stderr, "Can't open /dev/null on 1\n");
  463.     }
  464.  
  465.     while (1)    /* or until failure */
  466.     {
  467.     time(&starttime);
  468.     for (i = 0; i < INNERLOOP; ++i)
  469.         {
  470.         /* do the fork/exec */
  471.         if (fork() == 0)
  472.         {
  473.         execve("/bin/echo", echoargv, env);
  474.         exit(-1);        /* exec failure */
  475.         }
  476.  
  477.         /* terminate on anything but successfull exit(0) */
  478.         if (wait(&waitst) < 0 || (waitst & 0xFFFF) != 0)
  479.         {
  480.         fprintf(stderr, "fork or exec failure: terminating\n");
  481.         exit(0);
  482.         }
  483.         }
  484.     time(&endtime);
  485.     fprintf(stderr, "Env size %d, loop time %ld\n",
  486.         strlen(env[0]), endtime - starttime);
  487.     /* now double the environment size */
  488.     env[0] = realloc(env[0], (strlen(env[0])+1) * 2);
  489.     ptr = env[0] + strlen(env[0]);        /* point to trailing null */
  490.     strcpy(ptr+1, env[0]);            /* tack on another copy */
  491.     *ptr = '\n';                /* and join the two strings */
  492.     }
  493.     /* NOTREACHED */
  494.     }
  495.  
  496. Volume-Number: Volume 4, Number 7
  497.  
  498. From jsq  Mon Dec  9 22:53:22 1985
  499. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  500. Newsgroups: mod.std.unix
  501. Subject: Re: limits; V4N8
  502. Message-Id: <3760@ut-sally.UUCP>
  503. Organization: IEEE/P1003 Portable Operating System Environment Committee
  504. Date: 10 Dec 85 04:53:07 GMT
  505. Draft-9: 2.9
  506.  
  507. From: seismo!gatech!hplabs!fortune!mats (Mats Wichmann)
  508. Date: Monday,  9 Dec 1985 14:28-PST
  509.  
  510. The size of the environment certainly matters to fork/exec; the
  511. reason is that all that data in user space has to be transferred
  512. to kernel space somehow, then copied back out as part of the new
  513. process. This is typically done through a series of fubyte()
  514. calls, which vary in inefficiency with the type of MMU being
  515. used in the machine. For someone running, say, a Motorola 68451
  516. there is a horrible cost because the kernel has to do a lot
  517. of calculation before knowing the virtual-to-physical translation
  518. (Although by being clever and "caching" translations you can speed
  519. it up quite a bit). Other MMUs make it easier - I think the VAX
  520. scheme is a major improvement (although I am not intimately
  521. familiar with it) and the Motorola 68851 is even better, and if
  522. I am not mistaken, the National MMU chips even have an instruction
  523. which basically moves data between user space and kernel space.
  524.  
  525. Whatever the exact numbers, transporting environments (and argument
  526. lists, for that matter) across execs is a costly operation compared 
  527. to most others.
  528.  
  529.     Mats Wichmann
  530.     Fortune Systems
  531.     {ihnp4,hplabs,dual}!fortune!mats
  532.  
  533. Volume-Number: Volume 4, Number 8
  534.  
  535. From jsq  Wed Dec 11 11:19:59 1985
  536. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  537. Newsgroups: mod.std.unix
  538. Subject: In which gnu dissects the "tar" section of Draft 6; V4N9.
  539. Message-Id: <3769@ut-sally.UUCP>
  540. Organization: IEEE/P1003 Portable Operating System Environment Committee
  541. Date: 11 Dec 85 17:19:38 GMT
  542. Draft-9: 10.0
  543.  
  544. Date: Wed, 11 Dec 85 00:32:33 PST
  545. From: l5!gnu@LLL-CRG.ARPA (John Gilmore)
  546.  
  547. Section 10.1.1 introduces the terms "interpret" and "translate" for
  548. "load" and "dump".  Can we just use the familiar terms?  I have trouble
  549. remembering which is which.
  550.  
  551. [ I think using either of the words "dump" or "restore" (the latter
  552. actually used in the section) is a mistake, since they also connote
  553. a completely different set of programs than those usually associated
  554. with the format in question.  -mod ]
  555.  
  556. This section also says:
  557. > "The format-interpreting utility is defined such that if it is not a
  558. > privileged program, when data is read into the system from the
  559. > transportable media, all protection information is ignored.  Instead the
  560. > user ownership and group owership are set to that of the process context
  561. > which is running the utility.  All access protection information can be
  562. > set to be no more liberal than that of the process that is running the
  563. > utility.  A privileged version of the utility must have as a minimum, an
  564. > option that obeys the protection information stored on the transportable
  565. > media, such that this format and the corresponding utility can be used as
  566. > a save/restore mechanism."
  567.  
  568. First, this is self-contradictory; it says all protection information
  569. is ignored, then says it can be set "no more liberal" than the
  570. process.
  571.  
  572. [ The utility is not prevented from reading anything in the data
  573. because of any protections associated with it.  However, once the
  574. utility converts the data into files in the file system, there *is*
  575. protection associated with it, as with any file:  the utility must
  576. set the appropriate protection bits.  -mod ]
  577.  
  578. (I would assume the OS takes care of not letting your process
  579. set protection more liberal than its own, else there is no security.)
  580. I think what it means is that it's not legal for system V "tar" to always
  581. chown away the files, which you can't get back.
  582.  
  583. [ Cpio actually does that under System V.  Such chowning is a major
  584. security problem, much like your phrase:  "there is no security",
  585. since the numeric user ids on the "tape" may have completely different
  586. meanings on the system where it is being read than on the one where
  587. it was written.  This problem has been addressed in several other places
  588. in the standard as well as here.  -mod ]
  589.  
  590. Was there some other reason for this paragraph?  If not, can we replace
  591. the text with something like:
  592.  
  593.   "The format-loading utility must not set access protections that cannot
  594.   be revoked by the user running the utility (whether the user is
  595.   privileged or not).  If it can be run as a privileged utility, an
  596.   option (or default behaviour) must exist which obeys all the loaded
  597.   protection information, so it can be used for system backups."
  598.  
  599. ---
  600.  
  601. Also, section 10.1.2 uses confusing terminology with regard to blocks
  602. and records.  In the data processing world, a block is a big thing and
  603. one or more records fit in it (roughly speaking).  Like you write 100
  604. records 80 chars long in an 8000 byte block on tape.  Has anybody
  605. checked the ANSI standard for tape format to see what they call 'em?
  606. The Unix standard uses "block" for the small records, "group" for the
  607. large things, and also mentions that a "group" might turn into a single
  608. tape "record".
  609.  
  610. I also don't see the need for two records of zeros on the end.  One
  611. should be fine, and it won't break compatability with the Unix tar
  612. program, which quits as soon as it sees the first one.  Tar should
  613. really use EOF rather than this funny end of tape record; this would
  614. solve two or three minor problems with it, but would break
  615. compatability with existing Unix "tar".  (The problems:  the tape is
  616. positioned wrong after reading a tar archive from a multi-file tape,
  617. since the tape mark has not yet been read; you can't just concatenate
  618. tar archives to combine their contents (which would make multi-volume
  619. tar handling somewhat easier too); extra data is written, which
  620. makes it uneconomical to use a large, tape-efficient block size (like a
  621. megabyte on streaming cartridge tapes, since this will waste up to a
  622. megabyte of space on the tape).
  623.  
  624. What I suggest is that ANSI standard tar's should be required to work
  625. OK when reading an archive terminated by EOF (short last block, then
  626. zero length result from read()).  Suggested wording:
  627.  
  628.   An archive tape or file contains a series of records.  Each record is of
  629.   size TRECORDSIZE (see below).  Although this format may be thought of as
  630.   being on magnetic tape, this does not exclude the use of other
  631.   media.  Each file archived is represented by a header record
  632.   which describes the file, followed by zero or more records which give the
  633.   contents of the file.  At the end of the archive file there may be a record
  634.   filled with binary zeros as an end-of-file indicator.  A conforming
  635.   system must write a record of zeros at the end, but must not assume that
  636.   an end-of-file record exists when reading an archive.
  637.  
  638.   The records may be blocked for physical I/O operations.  Each block of
  639.   n records (where n is set by the application program creating the
  640.   archive file) may be written with a single write() operation.  On
  641.   magnetic tapes, the result of such a write is a single tape record.
  642.   When writing an archive, the last block of records shall be written
  643.   at the full size, with records after the zero record containing
  644.   undefined data.  When reading an archive, a confirming system shall
  645.   properly handle an archive whose last block is shorter than the rest.
  646.  
  647. This allows a system to provide an option to write more modern
  648. archives, which will be readable by all P1003 conforming systems, but
  649. requires that the default be compatible (readable with V7 Unix 'tar').
  650.  
  651. ---
  652.  
  653. > /* Values used in typeflag field */
  654. > #define REGTYPE   '0'         /* Regular file  */
  655. > #define AREGTYPE  '\0'        /* Regular file  */
  656. > #define LNKTYPE   '1'         /* Link          */
  657. > #define SYMTYPE   '2'         /* Reserved      */
  658. > #define CHRTYPE   '3'         /* Char. special */
  659. > #define BLKTYPE   '4'         /* Block special */
  660. > #define DIRTYPE   '5'         /* Directory     */
  661. > #define FIFOTYPE  '6'         /* FIFO special  */
  662. > #define CONTTYPE  '7'         /* Reserved      */
  663.  
  664. In the header file, less generic names than e.g. "REGTYPE" should be used.
  665. How about "TF_REGULAR" (typeflag = regular file).  This avoids the well
  666. known problem that a #define is a joy (or a pain) forever, especially
  667. when some other header file wants to use the same name:
  668.  
  669.   /* The typeflag defines the type of file */
  670.   #define    TF_OLDNORMAL    '\0'        /* Normal disk file, compat */
  671.   #define    TF_NORMAL    '0'        /* Normal disk file */
  672.   #define    TF_LINK        '1'        /* Link to dumped file */
  673.   #define    TF_SYMLINK    '2'        /* Symbolic link */
  674.   #define    TF_CHR        '3'        /* Character special file */
  675.   #define    TF_BLK        '4'        /* Block special file */
  676.   #define    TF_DIR        '5'        /* Directory */
  677.   #define    TF_FIFO        '6'        /* FIFO special file */
  678.   #define    TF_CONTIG    '7'        /* Contiguous file */
  679.   /*
  680.    * All other type values except A-Z are reserved for future standardization
  681.    * and may not be used.  A-Z may be used for implementation-dependent
  682.    * record types.
  683.    */
  684.  
  685. The mode fields should use a prefix like "TM_" rather than just "T".
  686. Also, TSVTX (the sticky bit) cannot be "reserved" otherwise implementations
  687. cannot write archives that have it turned on.  Call it implementation-defined,
  688. if you must.
  689.  
  690. > All characters are represented in ASCII, using 8-bit characters without
  691. > parity.  Each field within the structure is contiguous; that is, there is
  692. > no padding used within the structure.  Each character on the archive media
  693. > is stored contiguously.
  694.  
  695. You'd better be more specific.  USASCII, with the 7-bit character in the
  696. low-order 7 bits and the high-order bit cleared?  What about foreign
  697. sites with funny characters in their file names?
  698.  
  699. > The fields name, linkname, magic, uname and gname are null-terminated
  700. > character strings.
  701.  
  702. Does this mean that when writing an archive, you MUST put in the null,
  703. or if the value exactly fills the field, is it OK to not have a null
  704. there?  In other words, caveat writer or caveat reader?  Here again, a
  705. prudent course would be to require the writer to do it right, and
  706. require the reader to accept it either way.
  707.  
  708. > The mtime field is the modification time of the file at the time it was
  709. > archived.  It is the ASCII representation of the octal value of the
  710. > modification time obtained from the stat() call.
  711.  
  712. This should be spelled out in detail, so the definition of the archive
  713. format can stand alone.
  714.  
  715. > ASCII digit `2' is reserved.
  716. > ASCII digit `7' is reserved.
  717. > ASCII letters `A' through `Z' are reserved for custom implementations.
  718. > All other values are reserved for specification in future revisions of the
  719. > standard.
  720.  
  721. As I understand standards, something that is reserved canNOT be used by
  722. an implementation to extend the standard.  This is not the intention
  723. here, since I presume compatability with BSD systems (which use 2 for
  724. symlinks) is desired.  I'm not sure why we don't just standardize
  725. symlinks here; after all, not all systems have fifos or contiguous
  726. files either...
  727.  
  728. [ They were in there at one point.  I wonder what happened to them.  -mod ]
  729.  
  730. > The encoding of the header is designed to be portable across machines.
  731.  
  732. This sentence can go... 
  733.  
  734. > 10.1.3  Notes
  735. > ...
  736. > Implementors should be aware that the previous file format did not include
  737. > a mechanism to archive directory type files.  For this reason, the
  738. > convention of using a file name which ended with a slash (/) was adopted
  739. > to specify the archiving of a directory.
  740.  
  741. But ANSI standard systems are not required to read such a tape?  I think
  742. they should be required to read it but not write it.
  743.  
  744.  
  745. An additional point.  The standard does not specify what fields are defined
  746. in what record types.  For example, is it OK to have garbage in the linkname
  747. in record type 0 (normal files)?  Is it OK to put zeros in the uid/gid fields
  748. if you have filled in the uname/gname/magic fields (say your system does not
  749. have numeric uids?).  What about the bytes in the header records that
  750. are not defined by the structure?  Or the bytes beyond the end of a file,
  751. in its last record?  I'd suggest that we require these fields to be nulls
  752. on writing, and require them to be ignored on reading, again for prudence.
  753.  
  754. Volume-Number: Volume 4, Number 9
  755.  
  756. From jsq  Wed Dec 11 15:47:59 1985
  757. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  758. Newsgroups: mod.std.unix
  759. Subject: Re: size of environment vs speed; V4N10
  760. Message-Id: <3774@ut-sally.UUCP>
  761. References: <3723@ut-sally.UUCP> <3718@ut-sally.UUCP> <3692@ut-sally.UUCP> <3575@ut-sally.UUCP> <3757@ut-sally.UUCP>
  762. Organization: IEEE/P1003 Portable Operating System Environment Committee
  763. Date: 11 Dec 85 21:47:45 GMT
  764. Draft-9: 1003.2.environment
  765.  
  766. From: topaz!packard!mtung!jhc (Jonathan Clark)
  767. Date: 11 Dec 85 14:03:32 EST (Wed)
  768.  
  769. While building fairly large pieces of software like an
  770. entire UNIX system, kernel, commands, libraries, and
  771. everything, from source, we found that a good way of
  772. speeding everything up was to set up a minimum size
  773. environment (about 5 variables), then use 'ksh' as the shell
  774. that 'make' used all the time. This produced about a 1/4
  775. faster build (knocked about 90 mins off a six-hour build
  776. time). Of course, most of what 'make' does is 'exec' a
  777. shell...
  778.  
  779. -- 
  780. Jonathan Clark
  781. [NAC]!mtung!jhc
  782.  
  783. My walk has become rather more silly lately.
  784.  
  785. Volume-Number: Volume 4, Number 10
  786.  
  787. From jsq  Thu Dec 12 13:59:24 1985
  788. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  789. Newsgroups: mod.std.unix
  790. Subject: P1003 Draft 6 -- Comments, criticisms etc.; V4N11
  791. Message-Id: <3784@ut-sally.UUCP>
  792. Organization: IEEE/P1003 Portable Operating System Environment Committee
  793. Keywords: typos, consistency, other stuff
  794. Date: 12 Dec 85 19:59:01 GMT
  795. Draft-9: 2.3 2.5 2.7 2.8 2.9
  796.  
  797. Date: Wed, 11 Dec 85 17:06:10 EST
  798. From: Arnold Robbins <arnold%gatech.csnet@CSNET-RELAY.ARPA>
  799.  
  800. Over a few nights, I sat down and read Draft 6 of the P1003 draft
  801. standard.  Overall, it is really good, and the committee has done a
  802. good job. Many of my comments are related to spelling, typographical,
  803. and grammar errors. These are not important relative to the comment,
  804. but should be cleaned up. The moderator should feel free to delete
  805. those comments from what gets posted, as long as they get passed on to
  806. the editor(s).
  807.  
  808. [ Might as well post them.  Besides, it's easier to pass things on
  809. if they're all in one place.  -mod ]
  810.  
  811. The rest of my comments are just comments; something is referred to in
  812. one place that was dropped elsewhere, or something left out, things of
  813. that nature. Some of this should (I hope) stimulate good discussion.
  814. Replies should probably go to the net, since I won't be here at Georgia
  815. Tech for much longer.
  816.  
  817. I'll be posting several articles, to keep the size down, probably one
  818. per chapter of the draft. Here is the Introduction, and Chapters 1 and 2.
  819. Stuff quoted from the draft is indented, my comments are flush with the
  820. left margin. The moderator should feel free to edit as he sees fit.
  821.  
  822. [ I've mostly just run fmt over stuff that wouldn't fit on 80 column
  823. screens and added comments like this.  -mod ]
  824.  
  825. Arnold Robbins
  826. CSNET:    arnold@gatech    ARPA:    arnold%gatech.csnet@csnet-relay.arpa
  827. UUCP:    { akgua, allegra, hplabs, ihnp4, seismo, ut-sally }!gatech!arnold
  828. ---------------------------
  829. COVER PAGE:
  830.  
  831.     Prepared by the P1003 working group of the Operation System Standards...
  832.                             ^^^^
  833.  
  834. Should be "Operating System"
  835.          ^^^
  836. FORWARD:
  837. [ That's FOREWORD, i.e., a word that goes in front, not a direction to go in.
  838. -mod ]
  839. CHAPTER 1:
  840.     No comments.
  841.  
  842. CHAPTER 2:
  843. Sect 2.2:
  844.     ... Non-standard extenstions
  845.                   ^        (spelling error)
  846.  
  847. Sect 2.3 General Terms:
  848.  
  849.     Address Space
  850.         The range of memory locations, both code and data, that
  851.         can be referenced by a process.
  852.  
  853.  
  854. Neither "code" nor "data" are defined anywhere. Is this one of those things
  855. everyone knows what they are?
  856. [ There's supposedly an IEEE dictionary of such things.  -mod ]
  857.  
  858. -----
  859.     Process Lifetime
  860.         ... When a process executes a _wait()_ primitive for an
  861.         inactive process, ....
  862.  
  863. Should clarify that the inactive process can only be waited on by certain
  864. processes (its ancestor(s)), not just any arbitrary process.
  865.  
  866. -----
  867.     Parent Process ID
  868.  
  869. Should indicate that the parent process ID may change if the parent dies
  870. before the child.
  871.  
  872. -----
  873.     Real User ID and Real Group ID
  874.         Each user is also a member of a group.
  875.  
  876. Should say something like "Each user is also a member of at least one group."
  877. This helps with 4.2BSD systems.
  878.  
  879.  
  880.         ... and real group ID. respectively, of the ...
  881.                      ^
  882.  
  883. The period should be removed.
  884. [ Should be a comma, actually.  -mod ]
  885.  
  886. -----
  887.     Pipe
  888.  
  889. Should indicate that a pipe has the same behavior as a FIFO file for the
  890. _close()_ primitive as well.
  891.  
  892.  
  893. -----
  894.     Directory
  895.  
  896. Should have an additional statement to the effect that directories are not
  897. writable by normal user code; only system calls (_link()_, _mkdir()_, _rmdir()_,
  898. etc., give a full list) shall be used to modify directory contents.
  899.  
  900. -----
  901.     Root Directory and Current Working Directory
  902.         ... A process's root directory need not be the root directory
  903.         of the root file system.
  904.  
  905. What is the "root file system"? This isn't defined.
  906. [ And we thought we'd rooted out all references to file systems.  :-) -mod ]
  907.  
  908. ===========================================
  909.  
  910. Sect 2.4 Error Numbers:
  911.  
  912.     ENOENT    No such file or directory
  913.         This error occurs when a file name is specified **and the file
  914.         should exist but doesn't**, or when a directory in a path name
  915.         does not exist.
  916.  
  917. The starred phrase just doesn't ring true. Maybe something like "but the file
  918. does not exist" would be better. Who's to say whether or not the file "should"
  919. exist?
  920.  
  921. ===========================================
  922.  
  923. Sect 2.6 Environment Description:
  924.  
  925.     It is recommended the follwoing variable names....
  926.  
  927. Should be "It is recommended that the..."
  928.                  ^^^^
  929.  
  930. ===========================================
  931.  
  932. 2.7 C Language Definitions
  933.  
  934.     A character is any bit pattern able to fit into a single byte.
  935.  
  936. "Byte" is left undefined here. Maybe it should be specified that it is
  937. at least 8 bits?
  938.  
  939. ===========================================
  940.  
  941. 2.8 Numerical Limits
  942.  
  943.     {SYYS_OPEN}    Maximum number of files that can be open    16
  944.             on the system at one tiime.
  945.  
  946. This number seems awfully small to me.
  947. [ Historically accurate, though.  -mod ]
  948.  
  949. Volume-Number: Volume 4, Number 11
  950.  
  951. From jsq  Thu Dec 12 14:08:27 1985
  952. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  953. Newsgroups: mod.std.unix
  954. Subject: P1003 Draft 6, Chapters 3 and 4, comments; V4N12
  955. Message-Id: <3785@ut-sally.UUCP>
  956. Organization: IEEE/P1003 Portable Operating System Environment Committee
  957. Date: 12 Dec 85 20:08:15 GMT
  958. Draft-9: 3.1 3.2 3.3 4.1 4.2 4.4
  959.  
  960. Date: Wed, 11 Dec 85 17:20:01 EST
  961. From: Arnold Robbins <arnold%gatech.csnet@CSNET-RELAY.ARPA>
  962.  
  963. Chapter 3: Process Primitives
  964.  
  965. Sect 3.1 Process Creation
  966.  
  967.     Running a program takes two steps...
  968.  
  969. Should be "Running a new program", i.e. some program other than what is now
  970. running.  The paragraph implies that calling exec is mandatory; it isn't.
  971.  
  972. =====================================
  973.  
  974. Section 3.2.1.6 References (for the _wait()_ primitive)
  975.  
  976. Should include a reference to getppid() 4.4.1.
  977.  
  978. =====================================
  979.  
  980. Section 3.3.2.1 The Signal Function
  981.  
  982.     SIGDFL - signal specific default action
  983.         ... Abnormal termination should result in the creation of a
  984.         file named core in the receiving process's current directory.
  985.  
  986. "Core" should be quoted. Also, the file should be created only if the effective
  987. uid has write permission in the directory.
  988.  
  989.  
  990. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  991.  
  992. Chapter 4.1 Process Identification
  993.  
  994. 4.1.1.3 References (for getpid(), getpgrp(), getppid())
  995.  
  996. Should include a reference to wait(), 3.2.1.
  997.  
  998. ---------------
  999.  
  1000. 4.2.3.2 Descriopion (of getlogin() and cuserid())
  1001.  
  1002.     ... or to call getlogin and, if it fails, to call the _getpwuid_ ...
  1003.  
  1004. The word "getlogin" should be italicized.
  1005.  
  1006. ---------------
  1007.  
  1008. 4.4.1.3.Returns (utsname)
  1009.  
  1010.     ... Otherwise, value of -1 is returned ...
  1011.  
  1012. Should be "Otherwise, a value of -1 ..."
  1013.              ^^^
  1014.  
  1015. Volume-Number: Volume 4, Number 12
  1016.  
  1017. From jsq  Thu Dec 12 14:16:09 1985
  1018. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  1019. Newsgroups: mod.std.unix
  1020. Subject: P1003 Draft 6, Chapter 5, comments; V4N13
  1021. Message-Id: <3786@ut-sally.UUCP>
  1022. Organization: IEEE/P1003 Portable Operating System Environment Committee
  1023. Date: 12 Dec 85 20:15:56 GMT
  1024. Draft-9: 5.1 5.3.2 5.4.2 5.5.2 5.6
  1025.  
  1026. Date: Wed, 11 Dec 85 17:52:17 EST
  1027. From: Arnold Robbins <arnold%gatech.csnet@CSNET-RELAY.ARPA>
  1028.  
  1029. Chapter 5: Files, Directories, and File Systems
  1030.  
  1031. 5.2.2 Directory Operations
  1032.  
  1033. While I am very pleased to see the BSD style directory access routines
  1034. included, I am dismayed at the lack of seekdir() and telldir(). These routines
  1035. are essential for traversing directory subtrees when one has a limited number of
  1036. open files allowed. Something should be done to try and included them.
  1037.  
  1038. ---------
  1039.  
  1040. 5.4.2.2. Description (of creat())
  1041.  
  1042.     ... If the file is a special file or a FIFO pipe, it is opened for
  1043.     writing.
  1044.  
  1045. Should be ".. or a FIFO file...".
  1046.  
  1047.  
  1048. A general note on _creat()_. It seems that whenever _open()_ is cited
  1049. in the references, _creat()_ is not. Either all the references should
  1050. be changed, or some note should be added explaining this. I don't think
  1051. that just stating that
  1052.  
  1053.     creat (path, mode)
  1054.  
  1055. is equivalent to
  1056.  
  1057.     open (path, O_WRONLY | O_CREAT | O_TRUNC, mode);
  1058.  
  1059. is enough. (Of course, I could be wrong....)
  1060.  
  1061. [ I'd think establishing that identity should be sufficient.  -mod ]
  1062.  
  1063. -----------
  1064.  
  1065. 5.5.3.4 Errors (returned from mkfifo())
  1066.  
  1067. Why are EIO and ENFILE possible errors? EIO says "error writing to the
  1068. file system". ENOSPC (couldn't extend the directory) should handle
  1069. that. ENFILE seems to me to be wrong -- there is no reason to *open*
  1070. the file in order to create the fifo. mkfifo should just make a
  1071. directory entry and set the right bits in an inode (yeah I know, that
  1072. is an implementation thing). The point is that no files should be
  1073. opened here.
  1074.  
  1075. ---------
  1076.  
  1077. 5.6.2.4 Errors (for rmdir())
  1078.  
  1079.     [EBUSY]  The directory to be removed is the mount point for a
  1080.          mounted file system.
  1081.  
  1082. What is a mounted file system? I thought that all references to such things
  1083. had been removed.... This is probably just an oversight on the part of the
  1084. editor(s).
  1085.  
  1086. -----------
  1087.  
  1088. 5.7.1.2 Description (of <stat.h>)
  1089.  
  1090.     S_IWXG    Read, write, and execute permissions for the group...
  1091.  
  1092. Should be S_IRWXG. This is undoubtedly a typo.
  1093.  
  1094.  
  1095.     S_ISUID    .....
  1096.         This bit shall be set only by the the function _chmod()_.
  1097.         It should be cleared on any open for writing.
  1098.  
  1099.     The word "the" is printed twice in the actual document. I did not
  1100. make a typo :-).  Also, I would prefer "It shall be cleared on any open for
  1101. writing".
  1102.  
  1103.     S_ISGID
  1104.  
  1105. Same comment about "should" vs. "shall".
  1106.  
  1107. [ Seems like the reason was that that would outlaw some existing systems. -mod ]
  1108.  
  1109.     st_ctime
  1110.  
  1111. Why does the pipe() system call change this field?
  1112.  
  1113. -----------
  1114.  
  1115. 5.7.4.2 Description (of chmod())
  1116.  
  1117.     ... The value _chmod_ shall set the access permission portion of
  1118.     the named file's mode according to the bit pattern contained in mode.
  1119.  
  1120. Delete the first two words of this sentence and capitalize "chmod".
  1121.  
  1122. [ We never capitalize anything which is really in lower case,
  1123. even at the expense of filler words at the beginning of the sentence.  -mod ]
  1124.  
  1125. ----------
  1126.  
  1127. 5.7.5.2. Description (of chown())
  1128.  
  1129. Describes what happens to the setuid/setgid bits if successfully invoked
  1130. by a non-superuser (they're cleared). All fine and good, but what happens to
  1131. those bits if chown is invoked by the superuser? This should either be stated
  1132. clearly or explicitly left undefined or implementation dependant.
  1133.  
  1134. ------------
  1135.  
  1136. 5.7.6.5 Notes (on utime())
  1137.  
  1138. What about st_ctime? Most Unix implementations (all?) do not allow this
  1139. to be reset. Shouldn't something be said about it?
  1140.  
  1141. Volume-Number: Volume 4, Number 13
  1142.  
  1143. From jsq  Thu Dec 12 16:50:08 1985
  1144. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  1145. Newsgroups: mod.std.unix
  1146. Subject: P1003 Draft 6, Chapters 6, 7, 8, and 9, comments; V4N14
  1147. Message-Id: <3788@ut-sally.UUCP>
  1148. Organization: IEEE/P1003 Portable Operating System Environment Committee
  1149. Date: 12 Dec 85 22:49:52 GMT
  1150. Draft-9: 6.2 6.4.1 8.2 9.2
  1151.  
  1152. Date: Thu, 12 Dec 85 09:28:06 EST
  1153. From: Arnold Robbins <arnold%gatech.csnet@CSNET-RELAY.ARPA>
  1154.  
  1155. Chanpter 6: Input and Output Primitives
  1156.  
  1157. 6.2.1
  1158.     The functions _open()_ and _creat()_ assign file descriptors as
  1159.     well as having effects of creating a file on the file system...
  1160.  
  1161. Should be "as well as having effects of possibly creating a file.."
  1162.                     ^^^^^^^^
  1163. Creating a file every time isn't absolutely necessary.
  1164.  
  1165. ------------------
  1166.  
  1167. 6.3.1.4 Errors
  1168.  
  1169. The word "errrno" should be "errno" (two r's instead of three).
  1170.  
  1171. ------------------
  1172.  
  1173. 6.4.1.5 Notes (on dup and dup2)
  1174.  
  1175.     One of the options for the _fcntl()_ call operates in the same way
  1176.     as the _dup()_ call.
  1177.  
  1178. Should be dup2, not dup.
  1179.  
  1180. -------------------
  1181.  
  1182. 6.6.1.2 Description (of read())
  1183.  
  1184.     ... or if the file is a pipe or special file.
  1185.  
  1186. Should probably be "is a pipe or character special file."
  1187.  
  1188. -------------------
  1189.  
  1190. 6.7.2.2. Description (of fcntl())
  1191.  
  1192.     F_SETFL    Set _file_ status flags to value indicated by the third
  1193.         parameter, _arg_, taken as type _int_. Only the O_NDELAY
  1194.         and O_APPEND flags can set; see <fcntl.h> 6.7.1.
  1195.  
  1196. It occurred to me that also allowing O_TRUNC, taking effect at the current
  1197. position of the file pointer, would be a very easy way to implement the
  1198. 4.2BSD truncate() call. This would also be upward compatible with current
  1199. System V, since it is currently illegal to use O_TRUNC in an fcntl() call,
  1200. so no (working) System V code would contain such a call. I hope that the
  1201. committee would consider this idea carefully.
  1202.  
  1203. ==========================================================
  1204.  
  1205. Chapter 7: Device- and Class Specific Functions
  1206.  
  1207.     See Appendix C for provides alternatives being considered.
  1208.  
  1209. Delete the word "provides".
  1210.  
  1211. ==========================================================
  1212.  
  1213. Chapter 8: C Language Library
  1214.  
  1215. 8.1.3. Notes (on fileno())
  1216.  
  1217.     The _fileno_ function may be implemented as a macro and should not,
  1218.     therefore, be re-declared.
  1219.  
  1220. Add to the end of the sentence "or have its address taken".
  1221.  
  1222. ===========================================================
  1223.  
  1224. Chapter 9: Passwords
  1225.  
  1226. 9.1.2 Description (of group access routines)
  1227.  
  1228.     char **    gr_mem    Null-terminated vector of pointers to the
  1229.             individual member names.
  1230.  
  1231. Add "or numbers" to the end of this sentence.
  1232.  
  1233. ----------------------
  1234.  
  1235.  
  1236. 9.2.3 Description (of password file access routines)
  1237.  
  1238.     A NULL pointer is returned on error or the end of the database
  1239.     is encountered.
  1240.  
  1241. Should be "or when the end of the database..."
  1242.  
  1243. Volume-Number: Volume 4, Number 14
  1244.  
  1245. From jsq  Thu Dec 12 19:02:15 1985
  1246. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  1247. Newsgroups: mod.std.unix
  1248. Subject: P1003 Draft 6, Chapter 10 and Appendices, comments; V4N15
  1249. Message-Id: <3789@ut-sally.UUCP>
  1250. Organization: IEEE/P1003 Portable Operating System Environment Committee
  1251. Date: 13 Dec 85 01:01:52 GMT
  1252. Draft-9: 10.0 2.3 2.5 5.1 7.0 files.performance SVID
  1253.  
  1254. Date: Thu, 12 Dec 85 10:09:56 EST
  1255. From: Arnold Robbins <arnold%gatech.csnet@CSNET-RELAY.ARPA>
  1256.  
  1257. Chapter 10: Data Interchange Format
  1258.  
  1259. John Gilmore (l5!gnu) has already done a better job of commenting on this than I
  1260. could. I will note two spelling errors:
  1261.  
  1262.     The standard does not define the user interface to this program
  1263.     and notes that the format-interpreting and format-translating
  1264.     utilities need not be the same, thougt an implementor may chose
  1265.     to make them so.
  1266.  
  1267. "Thought" should be "though" and "chose" should be "choose"
  1268.  
  1269. ===========================
  1270.  
  1271. Appendix A: Trial Use Areas of Comment
  1272.  
  1273. A.5 Media Formats
  1274.  
  1275. I don't think this really needs to be specified, but if the standard is
  1276. going to, then for 9 track 1/2 in. tape, the most portable format is
  1277. 1600 BPI, "blocked" 10, i.e. 512 byte blocks * 10 blocks == 5K block
  1278. tape records.  This format tar tape is readable on basically any
  1279. machine, including the ATT 3B20s which have exceedingly brain-damaged
  1280. tape controllers (can't read any more than 6K off the raw tape device).
  1281.  
  1282. -----------
  1283.  
  1284. A.7.2 Error Number Validity
  1285.  
  1286. I like the proposed change for the third sentence of errno 2.4. This
  1287. solves the problems described.
  1288.  
  1289. ===========================
  1290.  
  1291. Appendix C. Device Control and Terminal Characteristics.
  1292.  
  1293.     ... listed here with a request that it be review, ...
  1294.  
  1295. Should be "reviewed".
  1296.  
  1297. ---------------------
  1298.  
  1299. C.1 I/octl/Iocntl/Termcnt Overview
  1300.  
  1301.     However, the definition of the terms would force low level concepts
  1302.     to be included a supposedly high level interface definition.
  1303.  
  1304. "to be included in a supposedly.."
  1305.  
  1306. ---------------------
  1307.  
  1308. C.3.3 Problems (with current ioctl)
  1309.  
  1310. This section makes a big deal out of binary compatibility, but the standard
  1311. explicitly states in Chapter 1, Scope, that binary compatibility is not an
  1312. issue. If so, most of this section loses its validity.
  1313.  
  1314. ---------------------
  1315.  
  1316. C.3.5 SVID Compatibility
  1317.  
  1318. It seems that the people who came up w/this don't know their C too well
  1319. either. Their definition
  1320.  
  1321. #define ioctl(a,b,c)    iocntl(a,b,c,sizeof(c))
  1322.  
  1323. should be
  1324.  
  1325. #define ioctl(a,b,c)    iocntl(a,b,c,sizeof(*(c)))
  1326.  
  1327. ----------------------
  1328.  
  1329. C.7.2. Description (of <termios.h>
  1330.  
  1331. Discusses the _getty_ program actually opening the terminal devices and then
  1332. passing them on to _init_ and regular programs. Seems to me that neither
  1333. getty nor init are described anywhere else. For the real standard, this would
  1334. have to be cleaned up.
  1335.  
  1336. ----------------------
  1337.  
  1338. C.7.2.6 Local Modes and Line Discipline
  1339.  
  1340.     ... These functions may be disabled individually by changing
  1341.     the value of the control character to an unlikely or meaningless
  1342.     value (e.g.  0377).
  1343.  
  1344. This is a nit, but it should be '\377', not 0377.
  1345.  
  1346.     When ICANON is set, the following echo functions are possible. Two
  1347.     fucntions are possible: those dealing....
  1348.  
  1349. Should be:
  1350.  
  1351.     When ICANON is set, the following two echo functions are possible:
  1352.     those dealing....
  1353.  
  1354. ========================
  1355.  
  1356. Appendix I. Comparison to SVID Document.
  1357.  
  1358. I.2.12 Readdir
  1359.  
  1360.     struct dirent
  1361.         int_t d_ino
  1362.  
  1363. Should be "ino_t" instead of "int_t".
  1364.  
  1365. =========================
  1366.  
  1367. Appendix J. Proposed Definitions
  1368.  
  1369. J.2 General Terms
  1370.  
  1371.     Directory Entry
  1372.         A directory entry contains two items: a string whch is the
  1373.         filename and a file serial number.
  1374.  
  1375. Should be something more like:
  1376.  
  1377.     Directory Entry
  1378.         A directory entry contains at least two items: a string whch is
  1379.         the filename and a file serial number. Other, implementation-
  1380.         dependant items may also be included in the directory entry.
  1381.  
  1382. ========================
  1383.  
  1384. Appendix K. Contiguous Files
  1385.  
  1386. K.5.1.2 Description (of allocf())
  1387.  
  1388.     O_CREAT    ....
  1389.         The ``save text image after execution bit'' of the mode
  1390.         is cleared. See _chmod()_.
  1391.  
  1392. The rest of the standard doesn't say anything about sticky bits.
  1393.  
  1394. K.5.1.4 Errors
  1395.  
  1396.     [ETXTBSY]    The file is a pure procedure (shared text) file
  1397.             that is being executed and _oflag_ is write
  1398.             or read/write.
  1399.  
  1400. This isn't in the rest of the standard.
  1401.  
  1402. Volume-Number: Volume 4, Number 15
  1403.  
  1404. From jsq  Thu Dec 12 20:33:48 1985
  1405. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  1406. Newsgroups: mod.std.unix
  1407. Subject: A final comment on P1003 Draft 6; V4N16
  1408. Message-Id: <3790@ut-sally.UUCP>
  1409. Organization: IEEE/P1003 Portable Operating System Environment Committee
  1410. Date: 13 Dec 85 02:33:34 GMT
  1411. Draft-9: IPC
  1412.  
  1413. Date: Thu, 12 Dec 85 13:25:12 EST
  1414. From: Arnold Robbins <arnold%gatech.csnet@CSNET-RELAY.ARPA>
  1415.  
  1416. Just a final note on the P1003 Draft. I am dismayed by the lack of any IPC
  1417. mechanism other than pipes and signals. While the draft explicitly says that
  1418. one should not use signals for interprocess communication, it is well known
  1419. that pipes and signals are not enough for the "real world".
  1420.  
  1421. I realize that the System V IPC mechanisms are usually considered
  1422. non-orthogonal and difficult to learn, and BSD sockets don't seem to be
  1423. general enough either.  But something should be done. It is hard to
  1424. both innovate and standardize at the same time, but some sort of IPC
  1425. should be added.
  1426.  
  1427. If this is an issue that has been purposely delayed, OK. As long as the
  1428. committee will acknowledge it as an issue, and eventually address it, I
  1429. won't say anything else.
  1430.  
  1431. [ You forgot FIFOs.  It's an acknowledged issue, yes.  -mod ]
  1432.  
  1433. I hope my comments have been useful.
  1434.  
  1435. Volume-Number: Volume 4, Number 16
  1436.  
  1437. From jsq  Wed Dec 18 18:28:42 1985
  1438. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  1439. Newsgroups: mod.std.unix
  1440. Subject: Re: P1003 Draft 6 -- Comments, criticisms etc.; V4N11; V4N17
  1441. Message-Id: <3843@ut-sally.UUCP>
  1442. Organization: IEEE/P1003 Portable Operating System Environment Committee
  1443. Date: 18 Dec 85 23:28:35 GMT
  1444. Draft-9: 2.7
  1445.  
  1446. >From seismo!rochester!rocksanne!sunybcs!colonel Mon Dec 16 22:27:37 1985
  1447. Date: Mon, 16 Dec 85 14:12:42 EST
  1448. From: seismo!rochester!rocksanne!sunybcs!colonel (Col. G. L. Sicherman)
  1449. Message-Id: <8512161912.AA18129@gort.SUNYAB>
  1450. To: ut-sally!std-unix
  1451. Subject: Re: P1003 Draft 6 -- Comments, criticisms etc.; V4N11
  1452. In-Reply-To: your article <3784@ut-sally.UUCP>
  1453.  
  1454. > Date: Wed, 11 Dec 85 17:06:10 EST
  1455. > From: Arnold Robbins <arnold%gatech.csnet@CSNET-RELAY.ARPA>
  1456. > Sect 2.6 Environment Description:
  1457. >     It is recommended the follwoing variable names....
  1458. > Should be "It is recommended that the..."
  1459. >                              ^^^^
  1460.  
  1461. If you're going to hack the gobbledygook, you might as well get it out
  1462. of the passive voice: "We recommend that the ..."
  1463.  
  1464. Volume-Number: Volume 4, Number 17
  1465.  
  1466. From jsq  Wed Dec 18 18:29:23 1985
  1467. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  1468. Newsgroups: mod.std.unix
  1469. Subject: Re: A final comment on P1003 Draft 6; V4N16 (IPC); V4N17
  1470. Message-Id: <3844@ut-sally.UUCP>
  1471. References: <3790@ut-sally.UUCP>
  1472. Reply-To: Arnold Robbins <arnold%gatech.uucp@CSNET-RELAY.ARPA>
  1473. Organization: IEEE/P1003 Portable Operating System Environment Committee
  1474. Date: 19 Dec 85 00:09:03 GMT
  1475. Draft-9: IPC
  1476.  
  1477. Date: Tue, 17 Dec 85 13:19:28 EST
  1478. From: Arnold Robbins <arnold%gatech.csnet@CSNET-RELAY.ARPA>
  1479.  
  1480. > Date: Thu, 12 Dec 85 13:25:12 EST
  1481. > From: Arnold Robbins <arnold%gatech.csnet@CSNET-RELAY.ARPA>
  1482. > Just a final note on the P1003 Draft. I am dismayed by the lack of any IPC
  1483. > mechanism other than pipes and signals. While the draft explicitly says that
  1484. > one should not use signals for interprocess communication, it is well known
  1485. > that pipes and signals are not enough for the "real world".
  1486. > I realize that the System V IPC mechanisms are usually considered
  1487. > non-orthogonal and difficult to learn, and BSD sockets don't seem to be
  1488. > general enough either.  But something should be done. It is hard to
  1489. > both innovate and standardize at the same time, but some sort of IPC
  1490. > should be added.
  1491. > If this is an issue that has been purposely delayed, OK. As long as the
  1492. > committee will acknowledge it as an issue, and eventually address it, I
  1493. > won't say anything else.
  1494. > [ You forgot FIFOs.  It's an acknowledged issue, yes.  -mod ]
  1495.  
  1496. I don't like to follow up to my own articles, but it occurred to me a day or
  1497. two later that maybe Dennis Ritchie and/or ATT might be willing to donate
  1498. Ritchie streams to the emerging standard as an IPC mechanims. I don't know a
  1499. whole lot about streams, so they may be inappropriate, but from what I do know,
  1500. it seems like they might could be used as a foundataion for both IPC and
  1501. networking. This is just a suggestion. Comments from people who have actually
  1502. used streams would be appreciated.
  1503.  
  1504. The moderator makes a good point; FIFOs do provide pipes for non-related
  1505. processes, which is a step in the right direction. I still think some other
  1506. IPC mechanisms are needed though.
  1507.  
  1508. [ Personally, I always thought FIFOs were rather lacking in several respects:
  1509. I just wanted to point out that they are in the standard, flawed as they are.
  1510.  
  1511. Considering that streams will be in some forthcoming iteration of System V,
  1512. it seems unlikely that AT&T will make their implemenation public domain.
  1513. However, there is probably sufficient published material (BLTJ 1984 and
  1514. Portland (Summer 1985) USENIX) for interested parties to do their own
  1515. implementations.
  1516. -mod ]
  1517.  
  1518. Again, I hope my comments have been useful.
  1519.  
  1520. [Mail received after 12/19 will get stored until I get a new address, so,
  1521. while mail replies are normally appropriate, they are not in this case.]
  1522.  
  1523. [ The preceding paragraph was not by the moderator.  This one is.
  1524. Apologies for the long (five day) pause in posting things to the
  1525. newsgroup.  I only expected to be gone a couple of days, but had
  1526. some problem with flights out of Mexico.
  1527.  
  1528. I will be gone again from 22-29 December.  I will try to find
  1529. someone to be guest moderator during that period.
  1530. -mod ]
  1531.  
  1532. -- 
  1533. Arnold Robbins
  1534. CSNET:    arnold@gatech    ARPA:    arnold%gatech.csnet@csnet-relay.arpa
  1535. UUCP:    { akgua, allegra, hplabs, ihnp4, seismo, ut-sally }!gatech!arnold
  1536.  
  1537. Real Unix hackers disdain wimpy languages like C and AWK in favor of /bin/sh.
  1538.  
  1539. Volume-Number: Volume 4, Number 17
  1540.  
  1541. From jsq  Fri Dec 20 11:40:55 1985
  1542. From: std-unix%ut-sally.UUCP@SALLY.UTEXAS.EDU (Moderator, John Quarterman)
  1543. Newsgroups: mod.std.unix
  1544. Subject: duplicate, balloting, end of V4; V4N19
  1545. Message-Id: <3853@ut-sally.UUCP>
  1546. Organization: IEEE/P1003 Portable Operating System Environment Committee
  1547. Date: 20 Dec 85 17:40:39 GMT
  1548. Draft-9: Trial.Use.balloting
  1549.  
  1550. Due to a file permission botch, there were two articles numbered V4N17.
  1551. The second, by Arnold Robbins, should have been V4N18.
  1552.  
  1553. I'm mailing my ballot today on Draft 6 becoming the P1003 Trial Use document.
  1554. In addition to a couple of objections (A.7.2 and A.2.2), I'm including copies
  1555. of mod.std.unix Volumes 3 and 4 as comments (Volumes 1 and 2 were previously
  1556. given to the committee chair).  Thus this is the last article of Volume 4.
  1557.  
  1558. Volume-Number: Volume 4, Number 19
  1559.  
  1560.