Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!adm!Unix-Wizards-Request@BRL.ARPA
From: Unix-Wizards-Request@BRL.ARPA (The Moderator)
Newsgroups: comp.unix.wizards
Subject: UNIX-WIZARDS Digest  V4#099
Message-ID: <10823@brl-adm.ARPA>
Date: 13 Dec 87 21:32:01 GMT
Sender: news@brl-adm.ARPA
Lines: 701

UNIX-WIZARDS Digest          Sun, 13 Dec 1987              V4#099

Today's Topics:
                 Re: ditroff device description trouble
                 Re: Summary of Emacs csh alias replies
           Re: /dev/swap - possibility of it being a ramdisk
                       Re: Is process  alive?
             Re: Wait, Select, and a SIGCHLD Race Condition
                          Re:  History lesson
                            Re: BSD at AT&T
                     a ksh script for safe removal
                    Re: login prompt not staying set
            Re: `rm -rf dir' fails with Directory not empty
                    Re: ACCESS TO SHARED TAPEDRIVES
                    Re: login prompt not staying set
                Re: AT&T attitude to educational source
          Re: globbing in the shell (Was Re: more rm insanity)
           Re: /dev/swap - possibility of it being a ramdisk
                   Re: a ksh script for safe removal
                          Re: more rm insanity
                               Re: spell
                     signal handling,c-shell,hp840

-----------------------------------------------------------------

From: Jay Plett 
Subject: Re: ditroff device description trouble
Date: 12 Dec 87 06:50:58 GMT
Keywords: ditroff typesetting DESC
To:       unix-wizards@SEM.BRL.MIL

In article <209@theceg.UUCP>, lkb@theceg.UUCP (Lawrence Keith Blische) writes:
> ..........................  I've setup a DESC file and font description
> files for each font (R I B IB PE C CW) ...................................
> 
> test:	.ft 2
> 	Italic
> 
> #troff -TP351 test >foo
> troff: Can't open /usr/lib/font/devP351/2.out

Your problem is that you MUST have a "special" font mounted.
This font will be identified in the F.out file by a value of
1 in the "specfont" field of the Font struct.  It must be
the last font listed in the DESC file (you can have more than
one special font but remember that any fonts named after the first
special font in DESC will be treated as special).  I haven't
tried this, but suspect that - if you don't want or need a
special font - you could create a dummy one that contains only
a single ascii character.

When ditroff reads DESC.out, it sets a var "smnt" to the mount
position of the first special font it finds.  Then, when you do
a font change, it tests that you aren't trying to change to a
special font (i < smnt).  If no special font was encountered
while reading DESC.out, smnt will be 0, so font 2 (or any other
number) will fail the test.  Ditroff forgets that it thought it
detected an error, recognizing only that it didn't find font 2,
so it then tries to find a mounted font named "2", fails, and
finally tries to mount font "2" on position 0.  It is only at
this point that it tries to read "2.out" and complains.  I would
call this behavior a bug.
-- 
	Jay Plett
	UUCP:	{cmcl2,ihnp4}!lanl!unm-la!jay
		{ucbvax,gatech}!unmvax!unm-la!jay
	ARPA:	jxyp@lanl.gov

-----------------------------

From: "Barton E. Schaefer" 
Subject: Re: Summary of Emacs csh alias replies
Date: 10 Dec 87 18:07:53 GMT
Posted: Thu Dec 10 10:07:53 1987
To:       unix-wizards@SEM.BRL.MIL

In article  dsill@NSWC-OAS.arpa (Dave Sill) writes:
}My question was: how can one set up a csh alias for emacs that will
}run emacs if there isn't one in the background or foreground it if it
}is in the background.
}
}Most "solutions" involved grepping the output of jobs to determine if
}there was a background emacs job, followed by an if-then-else to
}either run or foreground emacs.  I've never been able to get an
}if-then-else to work in an alias.  Some suggested putting the if-then-
}else in a file to be sourced by the alias.  This works, but requires
}reading the file each time the alias is invoked, so I might as well
}use a script.

"Might as well use a script" ?!?!?

For something as short as the 6 or 7 lines in the file in question, the
major part of the overhead is NOT in reading the file, but in fork-execing a
new shell which then has to read the file anyway.  Sourcing the file from the
current shell will be MUCH faster than running a script.

Furthermore, what do you think is going to happen when you issue a "%emacs"
in the script?  There isn't any background job running under the script shell!
This is one case where you MUST use "source", or type the commands in yourself
(which you don't want to do or you wouldn't have asked the question in the
first place).

-- 
Bart Schaefer			CSNET:	schaefer@cse.ogc.edu
				UUCP:	...{tektronix,verdix}!ogcvax!schaefer
"A band of BIG, DUMB, LOUDMOUTHED, BUNGLING OGRES is a GREAT ASSET to the
neighbohood.  It keeps out the RIFF-RAFF."		-- Wormy

-----------------------------

From: " Dr. Robin Lake " 
Subject: Re: /dev/swap - possibility of it being a ramdisk
Date: 11 Dec 87 20:20:35 GMT
To:       unix-wizards@SEM.BRL.MIL

In article <712@qetzal.UUCP> rcw@qetzal.UUCP (Robert C. White) writes:
>Hello Wizards,
>
>Watching my poor little unix boxes swap, it occurred to me:
>why not utilize some extra ram to implement /dev/swap? It seems that
>the machine would speed up quite a bit, and hey, extra memory
>is pretty inexpensive, at least for the smaller 
>unix boxes. Also, it would be tactically easier to
>increase the amount of "swap" memory as opposed to repartitioning
>my disks, or mounting a disk pack under /tmp or some other 
>horrid kludge.

About 10 years ago, I was involved with the design of a "solid-state disk"
--- a ram disk that looked like a fixed-head disk for PDP-11 Unibus
machines.  A graduate student of mine did his Ph.D. dissertation on the
performance of UNIX with such a box. (Sugit Kumar, Case Western Reserve
University).  Bottom line was that you want TWO such "ramdisks", one for
/tmp or /usr/tmp and one for the commonly used programs (/bin, /usr/bin).
The only shortcoming is that the device drivers and the I/O strategies of
the kernel consume relatively huge amounts of time per "disk" access.  The
result is that a solid-state device (17,000 times faster transfer rate
than a rotating disk) only performs 10 to 50 times better.

Nonetheless, watch for significant new computer architectures from the 3-letter
computer vendors which take advantage of more ram memory than you might have
ever believed would fit in a box!  Exciting times ahead....

Rob Lake
BP America R&D
(ex-Principal Scientist, Monolithic Systems Corp  - mfgr. of "Extended
Memory Unit" )
decvax!mandrill!nitrex!rbl
216-581-5976
-- 
Rob Lake
{decvax,ihnp4!cbosgd}!mandrill!nitrex!rbl

-----------------------------

From: rjd@occrsh.ATT.COM
Subject: Re: Is process  alive?
Date: 11 Dec 87 18:22:00 GMT
Nf-ID: #R:csd_v.UUCP:-14100:occrsh.ATT.COM:142700019:000:833
Nf-From: occrsh.ATT.COM!rjd    Dec 11 12:22:00 1987
To:       unix-wizards@SEM.BRL.MIL


> Is there a universal way that will work on any Unix to write a function
> 	isprocess(n)
> which returns TRUE if process n is alive, and FALSE if it isn't alive?
> 
> Note that I have said nothing about the relationship of process n (if it
> exists) to the process that is asking.  They might or might not be related.
> They might or might not have the same uid and gid.  I don't want to kill
> the process (or even upset it in any way).  I just want to know if it is
> alive.

  I don't have the base note for this, just the above.  If you have the
process number (such as saving it when it went into background) either
(in shell) a ps -p  will give you a status code, or
(in C) kill(0,) will also give you a status code.
  If you don't have a process number, it gets a little more difficult.

Randy

-----------------------------

From: Wen-King Su 
Subject: Re: Wait, Select, and a SIGCHLD Race Condition
Date: 12 Dec 87 15:59:15 GMT
Sender: news@csvax.caltech.edu
To:       unix-wizards@brl-sem.arpa

In article <496@PT.CS.CMU.EDU> rpd@F.GP.CS.CMU.EDU (Richard Draves) writes:
<>  on SIGCHLD interrupt, set time_ptr = &ZERO_TIMER;
>...
<>  numfds = select(...,time_ptr);
>...
<>| Wen-King Su  wen-king@vlsi.caltech.edu  Caltech Corp of Cosmic Engineers |
>
the select procedure call but before the trap to the kernel, then the