usenet@cuae2.UUCP (Heiby) (01/27/86)
Unix Technical Digest Mon, 27 Jan 86 Volume 3 : Issue 2 Today's Topics: Error utility mail broadcast and cleanup programs Problem with "make" (2 msgs) sibling list in proc structure (4.2bsd) tcp/ip over tty lines UNIX Milestone ---------------------------------------------------------------------- Date: Fri, 17 Jan 86 00:03:20 est From: seismo!hadron!jsdy (Joseph S. D. Yao) Subject: Error utility ---------- First change: pure (induced) paranoia. Replace: > printf("Usage: %s error-number\n",argv[0]); with: static char *myname = "perror"; if (argc > 0) myname = argv[0]; printf("Usage: %s error-number\n", myname); ---------- ---------- Second change: defensive programming. Replace: > if (errno >= sys_nerr) with: < if (errno <= 0 || errno >= sys_nerr) ---------- -- Joe Yao hadron!jsdy@seismo.{CSS.GOV,ARPA,UUCP} ------------------------------ Date: Wed, 22 Jan 86 06:49:20 est From: ihnp4!utzoo!lsuc!dave Subject: mail broadcast and cleanup programs A reader asked how to send mail to all "regular" users of the system. We have that problem here, where we have about 40 users with access to the shell and 2,000 users with access to CAI or conferencing only. I haven't really addressed the problem till now, but I would think a shell file could do it. Roughly... mail `grep ":$" /etc/passwd | # everyone with the shell; you might want # to grep for csh too if it's relevant. sed 's/.*//'` # Cut it down to just the login name [Ed note: Thanks to Mark Brader for a correction to the above. RWH] Of course, with a lot of such users you might hit a limit on what you can pass to exec (5120 chars on our v7 system). As to finding out who is inactive, what about last(1), lastlog(1) or whatever equivalent you have on your machine that digs into /usr/adm/wtmp to find out about recent signons? Again, write a script to strip down the output, diff it with what's in /etc/passwd and produce a list of who has or hasn't signed on recently. Dave Sherman The Law Society of Upper Canada Toronto { ihnp4!utzoo pesnta utcs hcr decvax!utcsri } !lsuc!dave ------------------------------ Date: 22 Jan 86 12:42:10 PST (Wed) From: ihnp4!hplabs!tektronix!athena!dalel Subject: Problem with "make" I tried your example, with these additions: --------------------- .SUFFIXES: .SUFFIXES: .z .y .x .x.z: @echo "$*.x -> $*.z" .x.y: @echo "$*.x -> $*.y" .y.z: @echo "$*.y -> $*.z" a.z: @echo 'making a.z' # << 1 >> not_used: a.y @echo 'making not_used' # << 2 >> ---------------------- I found that when addition 1 was commented out, make continued to behave as it did with your example makefile. When addition 1 was as shown above, I no longer saw the message "making not_used". I think what is happening is this: when you have several targets with no commands, e.g., target_1: target_2: target_3: it is exactly equivalent to target_1 target_2 target_3: In other words, the confusing results you were getting were the result of make trying to make both a.z and not_used, even though you thought (because of the way you wrote the makefile) that it should only try to make a.z. Hope this helps... -- Dale Lehmann CAE Systems Division Tektronix, Inc. ------------------------------ Date: Sat Jan 18 17:22:58 AESST 1986 From: john@basser.oz Subject: Problem with "make" > I have encountered a slight problem. It is a problem with "make". > "Make" does not behave the way I think it should. > If this turns out to be yet another case of "It's not a bug, > it's a feature." I will have to apologize. Well, I don't think an apology is needed; I was puzzled by this behavior, too, the first time I encountered it. And it can, indeed, be quite frustrating. But it is the way make is intended to work. See ``Make - A Program for Maintaining Computer Programs'', by S. I. Feldman, in Volume 2 of any (complete) set of UNIX Programmer's Manuals. In the section headed ``Implicit Rules'', you will find the statement If there are two paths connecting a pair of suffixes, the longer one is used only if the intermediate file exists or is named in the description. So, the act of *mentioning* "a.y" is significant. Leave the "not_used: a.y" line commented out, and create the file a.y, and you'll see make take the long path in that case: $ >a.y $ make a.y -> a.z $ touch a.x $ make a.x -> a.y a.y -> a.z $ This is clearly as it should be. And I think this helps to clarify the rationale behind the seemingly mysterious act of taking the long path in the other case: something depends on a.y, so even though that something isn't being made now, it may well be made sometime in the future, so a.y should be kept up to date. If this behavior is causing you problems that you can't solve, perhaps you could send me one of your makefiles and a description of what you are trying to accomplish, and I'll see if I can help you. John Mackin, Basser Department of Computer Science, University of Sydney, Sydney, Australia {seismo,ukc,mcvax,ubc-vision,prlb2}!munnari!basser.oz!john john%basser.oz@SEISMO.CSS.GOV ------------------------------ Date: Thu, 16 Jan 86 15:11:45 est From: linus!security!jjg (Jeff Glass) Subject: sibling list in proc structure (4.2bsd) The 4.2bsd kernel routines for exit() and fork() in sys/kern_exit.c and sys/kern_fork.c maintain a list of siblings for each process through the fields p_ysptr, p_osptr, and p_cptr in the proc struct (see /sys/h/proc.h). I cannot find any use of this list elsewhere in the kernel. Where/why/how is it used? -- /jeff security!jjg@mitre-bedford.ARPA {allegra,ihnp4,utzoo,philabs,uw-beaver}!linus!security!jjg ------------------------------ Date: Sat, 18 Jan 86 10:32:16 PST From: unrvax!greg@unlv.csnet Subject: tcp/ip over tty lines >Has anybody out there got any experience using tcp/ip over tty lines? rick@seismo has just such a thing. I am in the process of bringing it up at this very moment. -- University of Nevada, Las Vegas --Greg Wohletz "Where the flashlight is" greg%unlv@CSNet-Relay seismo!unr70!unrvax!unlv!greg ------------------------------ Date: Thu, 16 Jan 86 09:53:03 mst From: alberta!lake@ihnp4.uucp (Robert Lake) Subject: UNIX Milestone In late 1973 the now popular UNIX operating system was shipped outside of AT&T Bell Laboratories for the first time to three universities. Among them was the University of Alberta where UNIX was installed on a Digital Equipment of Canada (DEC) PDP 11/45 (#315) which had recently been installed in the Department of Computing Science. The hour clock on that computer turned over 100,000 hours, on January 14 at 2:50 pm. One hundred thousand hours is approximately 11.4 years. The PDP 11/45, affectionately called `Chatty Cathy' because of an early Votrax voice synthesizer, is still running UNIX. During the past 11 years, UNIX has expanded from a handful of institutions to the world wide use enjoyed today. Although the occasion primarily celebrated a milestone for Chatty Cathy, it also marked a milestone for UNIX in that the operating system has now been in use for over 100,000 hours outside of AT&T Bell Laboratories. Congratulations both to Chatty Cathy for reaching its 100,000th hour of operation, and to Ken Thompson and Dennis Ritchie for creating such a successful and versatile operating system. ------------------------------ End of Unix Technical Digest ****************************** -- Ron Heiby {NAC|ihnp4}!cuae2!usenet Moderator: mod.newprod & mod.os.unix AT&T-IS, /app/eng, Lisle, IL (312) 810-6109