Path: utzoo!attcan!uunet!steinmetz!vdsvax!montnaro From: montnaro@sprite.steinmetz.ge.com (Skip Montanaro) Newsgroups: comp.windows.news Subject: Fun with forkunix Message-ID: Date: 14 Nov 88 22:00:09 GMT Sender: news@vdsvax.steinmetz.ge.com Reply-To: (Skip Montanaro) Organization: GE Corporate Research & Development Lines: 28 I've been trying to get around a bug in NeWS that makes starting programs from user.ps unreliable. (It's bug #1004790. It's been around since NeWS 1.0 and is still present in 1.1. I'll send the workaround to anyone interested.) The symptom is that when starting programs from user.ps, such as: (psterm -ls -bg -li 16 -co 80 -sl 128 -C) forkunix (emacs) forkunix sometimes the windows show up, but most times not. Sometimes it appears that only the first command doesn't get run, so I reasoned, what's the simplest command forkunix might accept so I could use it as a sacrificial command (as it were)? The empty string! I tried executing () forkunix from a psh session and got a core file plus some pyrotechnics, apparently due to gazillions of newlines sent to whatever window the cursor was in. I eventually had to kill and restart the NeWS server to get straightened out again. When running the -debug version of the server, the screen mangling disappeared, but the core file remained. This appears to be a bug in the implementation of forkunix (passing a NULL to strchr()). It should be more graceful in the face of such (admittedly stupid) input. I've posted an official bug report to hotline@sun.com. -- Skip Montanaro (montanaro@sprite.steinmetz.ge.com, montanaro@ge-crd.arpa)