Sun-Spots-Request@Rice.edu (William LeFebvre) (09/13/88)
SUN-SPOTS DIGEST Saturday, 10 September 1988 Volume 6 : Issue 224 Today's Topics: Re: Notification on receiving new mail Re: the "faces" program (new mail notification) Lucid Lisp Editors how 4.0 client default route is established semantics of ioctl using TIOCCONS Trouble porting AT&T C++ 1.2.1 to Sun 3 csh hanging under 4.0 4.0 linker : 'Wrong Machine Type' error Bigger icons for frames? UUCPD not included in SunOS 4.0? NULLs in 4.0 file? The .stabs assembler directive for debugging - any documentation? Tool Recommendation? LAT terminal servers? Re: Notification on receiving new mail (source) Send contributions to: sun-spots@rice.edu Send subscription add/delete requests to: sun-spots-request@rice.edu Bitnet readers can subscribe directly with the CMS command: TELL LISTSERV AT RICE SUBSCRIBE SUNSPOTS My Full Name Recent backissues are available via anonymous FTP from "titan.rice.edu". For volume X, issue Y, "get sun-spots/vXnY". They are also accessible through the archive server: mail the request "send sun-spots vXnY" to "archive-server@rice.edu" or mail the word "help" to the same address for more information. ---------------------------------------------------------------------- Date: Fri, 9 Sep 88 17:24:12 BST From: Andrew Findlay <Andrew.Findlay%brunel.ac.uk@nss.cs.ucl.ac.uk> Subject: Re: Notification on receiving new mail We now deliver mail into users' home directories, which achieves a similar effect in most respects, but has other advantages. (In particular, mail can then be subject to the user's file quota, and will be deleted along with the rest of the files when the user leaves the system - very important in places with a constantly changing user population) Mail notification is handled by a new 'biff'-like datagram service called 'tell'. When mail is delivered, a 'tell' message is sent to all machines where a user has recently logged in. If they are still there and have the 'biff bit' set on their TTY, the message is delivered. The important thing here is only to send the message to those machines which have a chance of delivering it. On a network with 50-100 machines where mail messages arrive at the rate of 20-30 per hour, the load would soon get silly. We handle that by having a file called '.whereami' in each user's home directory. Whenever somebody logs in, their login script runs 'checkmail' which prints the familiar 'You have mail' message and also enters the time and hostname into '.whereami'. The mail delivery program (which delivers into '.mailbox') looks at .whereami to decide where to send the 'tell' message. I will supply source code to the delivery and notification programs if anyone is interested. Given source to your mail delivery program, it should be fairly easy to fit the 'tell' system in place of comsat. >[.... it would be nice to have some sort of mail watcher tool that >would notify you when /usr/spool/mail/<user> changed. To my knowledge, >no such program exists. Although it wouldn't be hard.... --wnl ]] The elm mail system comes with a couple of programs that do that - 'newmail' and 'wnewmail'. The main problem with them is that they do not always die when the user logs out. [[ I was thinking that it would be run as a tool under Suntools. In that case, it would (hopefully) go away when you exited suntools. --wnl ]] Andrew >From Andrew Findlay at Brunel University, Uxbridge, UB8 3PH, UK Andrew.Findlay@brunel.ac.uk phone: +44 895 74000 x2512 ------------------------------ Date: 8 Sep 88 17:19:33 GMT From: mkhaw@teknowledge-vaxc.arpa (Mike Khaw) Subject: Re: the "faces" program (new mail notification) Reference: v6n221 - Isn't the "faces" program in sun-sources just such a mail watcher? - - [[ I don't see a program called "faces" anywhere in the sun-source - archives. Is it hiding as part of another package? --wnl ]] Whoops, sorry. "faces" was posted to comp.sources.misc, in Vol. 3, #82. It is apparently something developed by several people at Sun (but not a Sun supported product). Mike Khaw -- internet: mkhaw@teknowledge.arpa uucp: {uunet|sun|ucbvax|decwrl|uw-beaver}!mkhaw%teknowledge.arpa hardcopy: Teknowledge Inc, 1850 Embarcadero Rd, POB 10119, Palo Alto, CA 94303 ------------------------------ Date: Thu, 8 Sep 88 14:34:26 PDT From: Ken Olum <kdo@lucid.com> Subject: Lucid Lisp Editors >SPE is a step in the right direction for bringing some of the power of the >Symbolics' lisp development environment to the Sun. It has an improved >editor (but face it, nearly _anything_ would have been an improvement over >the Lucid sub-emacs editor :-( ).... You have clearly been using the 2.1 version of the Lucid Editor. I'll be the first to admit that it wasn't very good. For version 3.0 of Sun/Lucid Common Lisp we completely redid the editor. It is better documented and more mature, although it still lacks some of the features of GNU Emacs. The mouse interface is much better (and is user-extensible), but there are still lots of improvements that could be made. You can save keyboard macros to files. You can get scrollbars. You can get arglists and function-documentation. You also get a real input-editor similar to that of the Lisp Machine, which you don't get with GNU Emacs. Sun Common Lisp 3.0 is currently in Beta test and will be available from Sun very shortly. Ken Olum Lucid, Inc. ------------------------------ Date: Thu, 08 Sep 88 13:54:35 -0500 From: abe@mace.cc.purdue.edu (Vic Abell) Subject: how 4.0 client default route is established I previously reported that booting 4.0 on Sun clients appeared to produce a bogus default route in their routing tables. I have managed to solve this puzzle. The questionable default route appears when a Sun client is booted from a Sun server via an Ethernet on which an HP server (9000/350) also resides. The Sun client ends up with a default route that points to the HP server, not the Sun server as I had expected. The following comment from the code for bootparamd explains what is happening. There is one additional important fact - the HP server does not run gated or routed, so its routing needs are met with static route entries in its routing tables and those of the Sun server. /* * get_route paws through the kernel's routing table looking for a route * via a gateway that is on the same network and subnet as the client. * Any gateway will do because the selected gateway will return ICMP redirect * messages to the client if it can not route the traffic itself. */ The result of the code that follows this comment is that bootparamd discovers a routing table entry in the Sun server for the HP server's diskless client net. Because the HP server is on the same network and subnet as the Sun client, bootparamd then establishes the HP server's address as the default route for the Sun client. If it weren't for the fact that I have been unable to induce the HP server to ICMP redirect or IP route, I may have never discovered this oddity. ;-( Vic Abell ------------------------------ Date: Thu, 8 Sep 88 12:19:47 EDT From: biggers@dg-rtp.dg.com (Mark Biggers) Subject: semantics of ioctl using TIOCCONS using this code on the slave side of a pty, one can get console i/o redirection: #include <sgtty.h> #include <sys/file.h> main() { int on = 1; int tty; if ( (tty = open("/dev/tty", O_RDWR, 0)) != -1 ) { ioctl (tty, TIOCCONS, (char *) &on); } } My question is, what, if anything, happens when the value of "on" is changed (i.e., what is the semantics of TIOCCONS - I have read console(4) and tty(4))? I have changed it to -1 and 0, and ran this program a second time in a (X) window, and the console i/o still goes to that window. As far as I can tell, TIOCCONS is a SunOS-ism, not in 4.3bsd or SysV. However, it *is* useful! Any comments? thanks, mark biggers@dg-rtp.dg.com ------------------------------ Date: 8 Sep 88 17:22:35 GMT From: acornrc!bob@ames.arc.nasa.gov (Bob Weissman) Subject: Trouble porting AT&T C++ 1.2.1 to Sun 3 I'm having a devil of a time getting C++ version 1.2.1 to build on my Sun 3/60 running SunOS 3.5. I've had to edit makefiles and header files, but that's no problem. The problem is that when I try to compile the HelloWorld program, cfront goes into an infinite loop. I'd appreciate hearing from anyone who has successfully built AT&T C++ version 1.2.1 on a Sun 3 running SunOS 3.5 and who might have any hints for me. I had expected this procedure to be an "installation," not a "port." Thanks for any help, -- Bob Weissman Internet: bob@acornrc.uucp UUCP: ...!{ ames | decwrl | oliveb | pyramid }!acornrc!bob Arpanet: bob%acornrc.uucp@ames.arc.nasa.gov ------------------------------ Date: Thu, 8 Sep 88 16:11:28 EDT From: schwartz@gondor.cs.psu.edu (Scott Schwartz) Subject: csh hanging under 4.0 On several occasions (at least once a day) I have the following happen to me: info is scrolling past on the screen, I maybe hit ctrl-Q, and in any case hit ctrl-C. The program dutifully exits, but the shell is left hanging. "ps l" says WCHAN == Sysbase, STAT == I. What exactly is Sysbase? To make matters stranger, if the hanging shell is the child of another shell, killing the hanging shell causes the parent to inherit the comatose condition. I can't reproduce this on demand, which makes it hard to describe in detail, unfortunately. I am connected to the machine (A 4/260) via an Annex terminal concentrator, if that has any bearing. Anyone else experience anything similar? -- Scott Schwartz <schwartz@gondor.cs.psu.edu> ------------------------------ Date: Thu, 8 Sep 88 15:40:17 BST From: <@nss.cs.ucl.ac.uk,@cvaxa.sussex.ac.uk:philipt@csta.uucp (Philip Taylor)> Subject: 4.0 linker : 'Wrong Machine Type' error When I try and link in an object file (called First) under SunOS 4.0 I get the following message: ld: ./.lnk/First: wrong machine type Which is, apparently, telling me that the code is for an unsupported architecture. However, using 'file' on ./.lnk/First tells me : ./.lnk/First: old sun-2 executable not stripped I do not get the ld error under SunOS 3.4. Any ideas why there is a difference (and how to get round the problem?). Philip Taylor, School of Cognitive and Computing Sciences, University of Sussex, Falmer, Sussex, UK. BN1 9QH. JANET: philipt%csta@uk.ac.sussex.cvaxa UUCP: ...mcvax!ukc!cvaxa!philipt ARPA: philipt%csta%uk.ac.sussex.cvaxa@nss.cs.ucl.ac.uk ------------------------------ Date: Thu, 8 Sep 88 11:13:41 PDT From: sytek!syteka!sridhar@hplabs.hp.com (Sridhar Acharya) Subject: Bigger icons for frames? I was trying to assign bigger icons to frames, like two 64 x 64 icons joined together. I tried concatenating the two images I got from iconedit and increasing the ICON_HEIGHT/ICON_WIDTH in "icon_create" but it did not work. Thanx for any pointers. Sridhar Acharya sun!sytek!syteka!sridhar ------------------------------ Date: 8 Sep 88 19:17:10 GMT From: ehrlich@blitz.cs.psu.edu (Dan Ehrlich) Subject: UUCPD not included in SunOS 4.0? Does anyone know why Sun decided not to include the UUCPD in SunOS4.0? It seems a reaonable thing for people who don't like hacking sendmail config files to be able to send to local hosts vip UUCP over TCP. Dan Ehrlich <ehrlich@blitz.cs.psu.edu> The Pennsylvania State University Department of Computer Science University Park, PA 16802 ------------------------------ Date: Thu, 08 Sep 88 14:08:34 -0500 From: abe@mace.cc.purdue.edu (Vic Abell) Subject: NULLs in 4.0 file? Has anyone seen any problems with characters of a file being NULLed under SunOS 4.0? I have a situation in which a printer log file occasionally has a legitimate entry converted to NULLs for no apparent reason. The NULLs never seem to appear at the end of the file, but occur prior to the last entry. Only one program writes the log file, using stream I/O with an fopen() mode of "a" and fwrite(). Immediately after the entry is written, it appears in the file correctly. Some time later it is NULLed. It almost appears as though the next appendage to the file leads the file system code to believe that the end of file is at the beginning (not end) of the previous entry, but the file is positioned past that entry. Thus, when the write occurs, the file system code believes that there is a hole to be filled with NULLs and does so. The file system on which this happens is shared among the clients and the server, but only a server process writes in the file. The problem occurs several times a day, but so far I've been unable to discover a sequence of events that makes it happen. Any ideas, anyone? Vic Abell Purdue University Computing Center ------------------------------ Date: 8 Sep 88 12:44:12 GMT From: mcvax!daimi!pederch@uunet.uu.net (Peder Chr. N|rgaard) Subject: The .stabs assembler directive for debugging - any documentation? We are developing a compiler for a novel language, and would like to be able to debug the stuff without developing an entire new debugger. There- fore I ask, whether anybody know the syntax for the arguments for the .stabs assembler directive, so we can generate code which can be debugged be adb or dbx. Thank you in advance. -- Peder Chr. Norgaard / pederch@daimi.dk (..uunet!mcvax!dkuug!daimi!pederch) Computer Science Department, Aarhus University Ny Munkegade 116, DK-8000 Aarhus C, DENMARK phone: +45 6 12 71 88 / telefax: +45 6 13 99 19 / telex: 64767 aausci dk ------------------------------ Date: Thu Sep 8 11:07:21 1988 From: portal!cup.portal.com!DMasterson@sun.com Subject: Tool Recommendation? Are there any recommendations for tools for the SunOS. In particular, I'm looking for a tool that would allow the development frames, windows, canvases, text items, popups, etc. interactively and then would output a C program skeleton that contains the SunView structures to make use of those windows. Anyone know of such a beast? David Masterson DMasterson@cup.portal.com ------------------------------ Date: Thu, 8 Sep 88 17:19 EST From: Peter W. Resnick <RESNICK@BINGVAXA.BITNET> Subject: LAT terminal servers? Howdy. Any of you folk out there know if SUN's can deal with LAT ethernet protocol terminal servers (i.e. DEC Servers) or if someone makes a good piece of software or the like that will allow them to do so. Any or all info would be good. Pete SUNY Binghamton ------------------------------ Date: Thu, 08 Sep 88 17:53:19 PDT From: Craig Leres <leres@helios.ee.lbl.gov> Subject: Re: Notification on receiving new mail (source) Another option is to modify /bin/mail so that it sends biff packets to the desired list of hosts. Appened is my replacement for mail's notifybiff() routine. The list of hosts is maintained by yp in the network group entry <domain-name>-biff. For example, some of my Suns are in the domain "rtsg" so my /etc/netgroup file the following line: rtsg-biff (ace,-,rtsg) (helios,-,rtsg) (hot,-,rtsg) (surf,-,rtsg) If the net group entry doesn't exist, then the biff packets go to localhost, just like before. Craig __________ #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #define NEW(t) (t *)malloc(sizeof(t)) notifybiff(msg) char *msg; { char domain[64]; char *mp, *up, *dp; int didany; struct sockaddr_in addr; struct hostlist { struct hostlist *h_next; struct sockaddr_in h_addr; }; static struct hostlist *hl = 0; register struct hostlist *hlp; struct hostlist hjunk; /* Build list of hostnames and inet addrs */ if (hl == 0 && getdomainname(domain, sizeof(domain)) >= 0) { strcat(domain, "-biff"); setnetgrent(domain); hlp = &hjunk; while (getnetgrent(&mp, &up, &dp)) if (mp && nametoaddr(mp, &addr)) { hlp->h_next = NEW(struct hostlist); hlp = hlp->h_next; hlp->h_addr = addr; } hlp->h_next = 0; hl = hjunk.h_next; endnetgrent(); } /* Feep hosts */ didany = 0; for (hlp = hl; hlp; hlp = hlp->h_next) if (notifyone(&hlp->h_addr, msg)) didany++; /* If we didn't do any, try localhost */ if (!didany && nametoaddr("localhost", &addr)) (void) notifyone(&addr, msg); } nametoaddr(host, ap) char *host; struct sockaddr_in *ap; { static u_short port = 0; struct servent *sp; struct hostent *hp; if (port == 0) { sp = getservbyname("biff", "udp"); if (sp == 0) return(0); port = sp->s_port; } hp = gethostbyname(host); if (hp == 0) return(0); ap->sin_family = hp->h_addrtype; ap->sin_port = port; bcopy(hp->h_addr, &ap->sin_addr, hp->h_length); return(1); } notifyone(ap, msg) struct sockaddr_in *ap; char *msg; { static int f = -1; if (f < 0) f = socket(AF_INET, SOCK_DGRAM, 0); if (f >= 0) sendto(f, msg, strlen(msg)+1, 0, ap, sizeof(*ap)); return(1); } ------------------------------ End of SUN-Spots Digest ***********************