[4987] in SIPB bug reports

home help back first fref pref prev next nref lref last post

mosaic outputs cruft to stdout

daemon@ATHENA.MIT.EDU (Mark W. Eichin)
Thu Oct 27 12:36:37 1994

Date: Thu, 27 Oct 1994 12:36:00 +0500
From: "Mark W. Eichin" <eichin@MIT.EDU>
To: jhawk@MIT.EDU
Cc: bug-sipb@MIT.EDU, yoav@MIT.EDU
In-Reply-To: jhawk@MIT.EDU's message of Thu, 27 Oct 1994 07:38:26 EDT <9410271138.AA08682@yaz-pistachio.MIT.EDU>

Oops. I remembered to read further in my mail to avoid answering it
twice; vagaries of screen size caused me to avoid reading past the
first ps, after which jhawk suggests the exact same thing...

Commenting on that, is fmt all that portable? Also, it's *never*
appropriate to run /usr/ucb/which. Ever. It simply can't work. (It's a
csh script, after all :-) If you want to run the "next" thing, maybe
you could try sed'ing all variants on the location of the script out
of the PATH and then just exec'ing it again, but you have to hope the
user hasn't made a symlink... so protect it with an environment
variable that causes a nested invocation of the script to give up...

If we do a lot of these types of scripts, it might be easier to put a
different interpreter in, so that the arguments are less likely to
screw up... namely

#!/afs/sipb/project/x/x
/mit/sipb/bin/Mosaic

mosaic should be run as Mosaic (note the capital M)
I will run Mosaic for you now, but please be aware that mosaic
will not work forever, and will go away at some point.

and just have "x" print the message from the file, then call exec with
the exact same argv but with the path listed at the beginning (or for
that matter, skip that part and just be *really* clever with argv[0],
doing the path search and all that...)
							_Mark_
ps. overdesign? nahhh  :-)

home help back first fref pref prev next nref lref last post