HDTenEightyP/NetNews huggingface dataset:
From: jim@ferkel.ucsb.edu (Jim Lick)
Subject: Re: Linux activists unite all you have to lose is your DOS
Organization: University of California, Santa Barbara
Date: Wed, 30 Sep 1992 05:51:05 GMT

In <1992Sep29.193435.12556@murdoch.acc.Virginia.EDU> lfoard@Turing.ORG (Lawrence C. Foard) writes:
>So why not bombard BYTE with letters asking them to cover free software?

>Any one know what there address for comments is? (Why do I suspect they
>don't know what e-mail is?)

letters@bytepb.byte.com

                            Jim Lick		       
Work: University of California	| Play: 1236 Camino Meleno
      Santa Barbara		|       Santa Barbara, CA 93111-1007
      Dept. of Mechanical Engr. |	(805) 964-2088 voice/msg
      2311 Engr II Building     |	(805) MUD-SPY1 data
      (805) 893-4113            |       jim@tcp.com
      jim@ferkel.ucsb.edu	| This space intentionally left blank
Newsgroups: comp.unix.wizards
From: bazyar@teal.csn.org (Jawaid Bazyar)
Subject: Re: Zombie processes
Keywords: ZOMBIE PROCESSES
Organization: Colorado SuperNet, Inc.
Date: Thu, 1 Oct 1992 19:58:42 GMT

mstowski@seas.gwu.edu (Mike Mstowski) writes:

>Any help here with this question is appreciated!

>I'm using SCO Unix 3.2.4 and wrote a program that forks child processes
>over and over again.  The child processes communicate with the parent
>with message queues and shared memory.  The child processes are constantly
>being killed and re-forked from the parent.  This works fine for a while,
>but after some time passes in this program, the system runs out of 
>resources.  The kill of the child process doesn't seem to free the process
>from it's process table slot until the parent process dies. I believe that
>these ZOMBIE processes can be cleaned up somehow!  

  When the child dies, you need to call wait() or a variant to get the
child's termination information; only then will the kernel free up the
process slot for new use.

-- 
 Jawaid Bazyar              |   Ask me about the GNO Multitasking Environment
 Procyon, Inc.              |   for the Apple IIgs!   
 bazyar@cs.uiuc.edu         |   P.O Box 620334
 --Apple II Forever!--      |   Littleton, CO 80162-0334   (303) 933-4649
Newsgroups: comp.unix.wizards
From: norm@bnr.ca (Norm MacNeil)
Subject: Re: Semaphores
Originator: norm@bcrks122
Reply-To: norm@bnr.ca
Organization: Bell-Northern Research Ltd.
Date: Thu, 1 Oct 1992 14:06:22 GMT


In article <BvEt5y.7LM@accelr8.com>, jim@accelr8.com (Jim Reiss) writes:
> I have an application which currently uses a lot of semaphores, which are
> a limited UNIX resource.  In some cases, the semaphore is being used only
> locally by a program and is not shared by any other process.  Can anyone
> suggest a good alternative to using semaphores?  I need a way for the process
> to sleep until an event happens, which is currently handled by waiting for
> a change in a semaphore.  Thanks for all input on this.
> -- 
>  Jim Reiss (jim@accelr8.com)    Accelr8 Technology, Denver, Colorado, USA
>  Opinions expressed above are mine.  Who else would have them?

What about signals?  If you know the pid of the "sleeping" process, then use
a signal like SIGUSR1 or whatever...

  kill(pid, SIGUSR1);

The problem might be that now if the sleeping process is now awake, what was the
result of the originating "thing"?i.e., how to simulate semaphores using signals?
Try using two signals.  For example,

/*----------------------------------------------------------------------------*/
int RC;
void Handler(Sig, Code, SCP, Addr)
  int Sig, Code;
  struct sigcontext *SCP;
  char *Addr;
{
  RC = Sig;
  switch(Sig) {
    case SIGUSR1:
      printf("Semaphore is ON\n");
      break;
    case SIGUSR2:
      printf("Semaphore is OFF\n");
      break;
    case SIGALRM:
      printf("Nothing happened.\n");
      break;
    default:
      printf("What the heck?\n");
  };
  return;
};
main()
{
  (void) signal(SIGUSR1, Handler);
  (void) signal(SIGUSR2, Handler);
  (void) signal(SIGALRM, Handler);
  RC = 0;
  while ((RC == 0) || (RC == SIGALRM)) { /* loop until signal by "user" */
    printf("Going to sleep...\n");
    printf("Time remaining was (%d)\n", alarm(60)); /* sleep a minute */
  };

  /* now deal with RC */
...
/*----------------------------------------------------------------------------*/

  Just an idea.
    Norm.

-- 
+-----------------------------------------------------------------------+
 Norm MacNeil                     Phone: (613) 763-7497
 CAD Operations                     Fax: (613) 763-3317
 Bell-Northern Research Ltd.      EMail: norm@bnr.ca (INTERNET)
 #include <disclaimer.std>       "Roller bladers do it in-line!"
Newsgroups: comp.unix.wizards
From: acourtny@unix1.tcd.ie (Antony A. Courtney)
Subject: Re: Semaphores
Organization: Trinity College, Dublin
Date: Mon, 5 Oct 1992 08:03:04 GMT

In <BvEt5y.7LM@accelr8.com> jim@accelr8.com (Jim Reiss) writes:
>I have an application which currently uses a lot of semaphores, which are
>a limited UNIX resource.  In some cases, the semaphore is being used only
>locally by a program and is not shared by any other process.

Why are you using semaphores if they are private to a single process?  I thought
the whole point was synchronization across process boundaries.  If the
application is single-threaded, there shouldn't be a need to use semaphores
for internal synchronization.  And if the application is multi-threaded,
most threads packages provide elaborate run-time systems for synchronization.

>Can anyone
>suggest a good alternative to using semaphores?  I need a way for the process
>to sleep until an event happens, which is currently handled by waiting for
>a change in a semaphore.  Thanks for all input on this.

I found the System V semaphore mechanism (like the rest of Svs V IPC) to be
riddled with problems (new name space with "key"s to access IPC resources,
arbitrary resource limitations, no association between IPC resources and
processes, overly complex semaphore interface, etc. etc. etc.)

To get around these problems, I wrote a tiny device driver for a semaphore
psuedo-device.  The driver uses the mutual exclusion property of the kernel,
and kernel sleep()/wakeup() to provide binary semaphores.  The interface to the
device is through 5 ioctl() calls to the driver to create, open, and destroy
a semaphore, as well as the classic P() and V() operations.

I defined wrapper functions which perform the actual ioctl() calls.  These
wrapper functions present an interface identical to the simpler semaphore
interface given in the book "Unix Network Programming" by W. Richard Stevens, so
you can take programs which use that library, and use either the cruddy System
V semaphores or my device driver underneath the program, by simply replacing a
single library module.

If anyone is interested in the driver or library (for vanilla SVR4), send me
email.

>-- 
> Jim Reiss (jim@accelr8.com)    Accelr8 Technology, Denver, Colorado, USA
> Opinions expressed above are mine.  Who else would have them?
--
********************************************************************************
* Antony A. Courtney                              Email: acourtny@unix1.tcd.ie *
* Computer Science Department                            antony@george.lbl.gov *
* Trinity College, Dublin, Ireland                Phone: 01+353+1-607389       *
Newsgroups: comp.unix.wizards
From: wisner@netcom.com (Bill Wisner)
Subject: Re: Origins of Unix
Organization: Trailing Edge Technologies, Mountain View, CA
Date: Sun, 4 Oct 1992 02:23:43 GMT

In article <lcpq2lINNj27@west.west.sun.com> markk@pongo.West.Sun.COM writes:
>Y'all take yer hats off speak with respect when ya mention MULTICS.

I'll point out that MIT has kept the name alive ever since their original
MULTICS machine was decommissioned.  MULTICS.MIT.EDU currently points to
a machine called charon, which is owned by their Student Information
Processing Board.

w. <wisner@netcom.com> <wisner@EBay.Sun.COM> Gryphon Gang Mountain View CA
Newsgroups: comp.unix.wizards
From: barr@pop.psu.edu (David Barr)
Subject: Re: Remote hostname
Organization: Penn State Population Research Institute
Distribution: usa
Date: Sat, 03 Oct 92 01:12:46 GMT

In article <1992Oct2.172541.14381@den.mmc.com> richard@crowded-house.den.mmc.com (Richard Armstrong) writes:
>I need to know how the unix finger command resolves the remote hostname or
>IP address of a user that rlogin'd or telnet'd in.

It reads /etc/utmp.  Look in <utmp.h>.

>I have the following code that gets the remote hostname from the finger 
>command, but I need to be able to do this more accurately... there are 
>many users using the same id, telnetting into a single user id. I need
>to ftp to Unix from their pc. I need their ip address.

Not possible without modifying code or a wrapper on the remote end.
Finger's information is limited to 16 characters.

Solutions:

modify /bin/login to record real addresses or IP numbers in a file,
updated in a similar fashion to /etc/utmp.
or
Use something like pident our authd's tricks to read the kernel memory
and netstat's buffers to find the IP connection given a username/tty.

Once you have this information, write your own daemon and protocol
that will give it to a remote machine.

--Dave
-- 
System Administrator, Population Research Institute    barr@pop.psu.edu
  "An analogy is like instant coffee: it can wake you up, but it's
  not the real thing"  -- Peter da Silva
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.unix.wizards
Subject: Re: Splitting the connect
Date: 7 Oct 92 00:03:32 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: telecaster.think.com

In article <9210061531.AA23611@dcc.unicamp.br> mauricio@DCC.UNICAMP.BR (Mauricio Fernandez) writes:
>When I stop the server between listen and the accept, the client (the
>code above) prints nothing and succesfully exits. Even when it has no
>security that the connection will be eventually accepted. Anyway, when
>i release the accept the conection is established and the server
>receives the "hello".

The TCP protocol doesn't provide a way for a server to reject a connection
that it's listening for; there's either a server there or there isn't.
Calling listen(2) tells the kernel to accept up to N connections (specified
by the backlog parameter) for the specified port.  All that accept(2) does
is provide a way for the server to find out the socket descriptor for a
connection that has already been created, and it also takes the connection
out of the pending connection queue.

-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
From: teddybur@netcom.com (John Sanger)
Newsgroups: comp.unix.wizards
Subject: SCO Xenix and dos boot partition
Date: 3 Oct 92 21:54:56 GMT
Organization: Netcom Online Communications Services (408-241-9760 login: guest)

I have seen past discussion of modifying a file or script in the SCO
distribution so that the SCO bootstrap will boot from a hard drive that has
a dos boot partition larger than 32 meg.
I have seen information as to using 'adb' to change the 'dos' file but I am
not sure that that is what I need to do.  I am led to believe that doing it
this way may cause a problem.
I recall that there was some other means of doing this such as modifying
the bootstrap itself or is the 'dos' file the bootstrap?
As you can tell I am not the expert that those who frequent this group are,
which is why I have posted here.  I am trying to gain the best advice
possible.
I have SCO Xenix r2.3.4 and want to modify it so that it will boot from a
larger than 32 meg dos boot partition.
Your responses can be emailed if you prefer rather than taking up bandwidth
in the group by posting.
Thanks.


Ciao!
	John S. :^)
	teddybur@netcom.com
__
From: bmskc!moe!paul@uunet.UU.NET (Paul Evan Matz)
Newsgroups: comp.unix.wizards
Subject: Intercepting SIGCHLD signals seems to disrupt system() and pclose()
Date: 29 Sep 1992 01:30:38 -0500
Organization: UTexas Mail-to-News Gateway
NNTP-Posting-Host: cs.utexas.edu

Newsgroups: comp.unix.programmer,comp.unix.wizards
Distribution: na
Keywords: SIGCHLD system pclose

Folks,

Quick question; If a process is looking for SIGCHLD signals, it appears that
both OS functions (SunOS 4.1.1b) system() and pclose() have difficultly
detecting the completion of the process they launch.  As a work around,
we have temporarily disabled the signal handler when running either of these,
but are concerned that the process might miss an exiting child while running
system() or pclose().  Any standard workarounds for this?  Pointers to
references?  Please email me directly.  I'll post a summary.  Thanks!

Regards,
 ____________________________________________________________
| Paul E. Matz, Principal Engineer, PPG Biomedical Systems   |
|   RR 2, Box 55, 26 Lewis Road, Pound Ridge, NY, 10576      |
|   Phone: 914-234-0745, or 914-234-0661                     |
| (in KS:)                                                   |
|   PO Box 15955, 16505 W. 113 St, Lenexa, Kansas 66285-5955 |
|   Phone: 913-894-7500 x7179  Fax: 913-894-7733             |
| email: {...}!uunet!bmskc!paul or paul@bmskc.ppg.com        |
|____________________________________________________________|
From: jim@accelr8.com (Jim Reiss)
Newsgroups: comp.unix.wizards
Subject: Semaphores
Date: 30 Sep 92 21:03:33 GMT
Organization: Accelr8 Technology Corporation

I have an application which currently uses a lot of semaphores, which are
a limited UNIX resource.  In some cases, the semaphore is being used only
locally by a program and is not shared by any other process.  Can anyone
suggest a good alternative to using semaphores?  I need a way for the process
to sleep until an event happens, which is currently handled by waiting for
a change in a semaphore.  Thanks for all input on this.
-- 
 Jim Reiss (jim@accelr8.com)    Accelr8 Technology, Denver, Colorado, USA
 Opinions expressed above are mine.  Who else would have them?
Xref: sparky comp.unix.wizards:4195 comp.unix.questions:11791
Organization: University of Illinois at Chicago
Date: Monday, 5 Oct 1992 11:08:18 CDT
From: <U30726@uicvm.uic.edu>
Newsgroups: comp.unix.wizards,comp.unix.questions
Subject: dd command

Hi,
My system is a SPARC IPX running SunOS 4.1.1. How do i make a copy of a 8mm

tape with multiple archives on it? The idea is to copy everthing on tape

on to the hard drive and back on to a blank tape.

This is what I`ve tried ( and failed )

 tar xvfp /dev/rst0
    This copies the very first archive only

 dd if=/dev/rst0 bs=20b of=sas
   weird result; copies just 1 file from the very first archive.

With tar i can copy more than 1 archive by doing a `mt -f /dev/nrst0 fsf 1'
and so on, but i have several archive on tape and will have to write a script
to do this. Any suggestions with the `dd` command will be appreciated.
Thanks in advance

rilluri@is.rpslmc.edu
      or
u30726@uicvm.uic.edu


Newsgroups: comp.unix.wizards
From: rcm@col.hp.com (hpctdfc)
Subject: Re: unix prompt
Date: Mon, 5 Oct 1992 22:17:01 GMT
Organization: Don't ask me, I'm Lost!

> : > Do any of you know how to set up the Unix prompt (analogous to the DOS set
> : > prompt $p$g) so that whenever a user change directories, the new directory
> : > path shows up along with the prompt?  It has been a nuisance having to type
> : > 'pwd' all the time.

If you are running the Korn shell the following works (in your .profile):

PS1=`whoami`'@'`hostname`':$PWD> '
export PS1
From: markk@pongo.West.Sun.COM (Mark Allen Kampe)
Newsgroups: comp.unix.wizards
Subject: Re: Origins of Unix
Date: 3 Oct 1992 00:24:53 GMT
Organization: Sun Microsystems
Distribution: world
Reply-To: markk@pongo.West.Sun.COM
NNTP-Posting-Host: pongo.west.sun.com

 
>In article <BvI0op.1sy@cs.dal.ca>, digdon@ug.cs.dal.ca (Mike Digdon) writes:
>|> 
>|> If I remember my UNIX history correctly, Ken Thompson wrote MULTICS, which
>|> was supposed to be a multi-user OS. However, it failed quite miserably
>|> at the multi-user level.
 
MULTICS was decidedly not a failure at any level (except possibly commercial).

Multics incorporated numerous features that would later become the standards
in all General Purpose timesharing systems.  The development of MULTICS was
definitely a watershed event in computer science.  As to its multi-user capabilities,
it provided timesharing for a large number of students and ARPAnet users besides.

Y'all take yer hats off speak with respect when ya mention MULTICS.
From: vax@ccwf.cc.utexas.edu (Vax)
Newsgroups: comp.unix.wizards
Subject: CPIO failure - help please.
Date: 1 Oct 92 06:30:09 GMT
Organization: The University of Texas at Austin, Austin TX

I backed up the root partition of my fixed disk drive onto high density
floppies.  I thought.  One was either unformatted, or had a bad sector:
CPIO gives this error when trying to read it:

<hd:0 cyl:0> <Bad Data CRC>
Ready for volume 8...

Which basically means it skips volume 7 (of 14).  It then gives various
errors that occur because I skipped an entire volume... and it doesn't
re-synchronize right away (and might not for a long, long time...)
Example errors:

<Offset 8m+451k+789> <Swapped binary pathname>
<Offset 8m+666k+666> <Swapped text pathname>

or something along those lines.  Can anyone help me on restoring my root pa
partition, and the 3-6 months of files I had on it!?!?
Of course, the user drive was last on the backup (sigh..)
Last backup was > 1 month ago.

				Desperate in Texas,  VaX#n8

-- 
------------
Protect our endangered bandwidth - reply by email.
VAX#N8 vax@ccwf.utexas.edu
Newsgroups: comp.unix.wizards
From: bzs@ussr.std.com (Barry Shein)
Subject: Re: Here is a puzzle to test your breadth of knowledge
Organization: The World
	<BZS.92Sep24224656@ussr.std.com> <1992Sep26.155400.13616@pcthree.com>
Date: Mon, 28 Sep 1992 07:35:02 GMT


From: scum@pcthree.com (Steve Monroe)
>What have you switched to now?
>How long did the beehive last?
>Do you expect this one to last 10 years?

And do I keep my housekeys under the mat?

I'll probably switch to a Sun3/60. Right now there is just the burnt
out carcass of an h19 (really, z19) sitting on my desk.

The beehive lasted from, oh, 1978 to 1982 and then lost its uart (I
guess) in a thunderstorm one night. Fortunately I had gotten it almost
for free so it was no major loss (as I remember I picked up the
beehive and a KSR/33 which I still have, modified to run 300b RS232!,
for $350.)

Do I expect the sun to last 10 years? It's about 4 years old now, so
there's certainly a chance, tho it's in pretty poor shape, it has an
entire non-dimple Sun3/50, sans CPU, for a monitor, and the disk makes
funny clicking noises like it keeps seeking back to the home track,
but it's been doing that for about 2 years now so who knows.

I certainly hope everyone here is interested in this.

--
        -Barry Shein

Software Tool & Die    | bzs@world.std.com          | uunet!world!bzs
Purveyors to the Trade | Voice: 617-739-0202        | Login: 617-739-WRLD
Newsgroups: comp.unix.wizards
From: krish@phy.vanderbilt.edu (Krishnan P)
Subject: Sun 386i disk problem, please help
Follow-Up: krish@vuse.vanderbilt.edu
Organization: /home/giga/krish/.organization
Date: Tue, 29 Sep 1992 21:14:42 GMT


System:  Sun 386i, SunOS 4.0.2
Problem:  One fine day, the system decided to give the following error
message on boot --
read retry  blk 5180 (abs blk 5180)
sense key (0x3) : medium error   error code (0x11) : hard data error

It repeated this message about 25 times and then went into single user mode,
prompting that fsck be run manually (and that the systems administrator
should be informed about the problem).  So I ran fsck (without the
-p option) and it repeated the same message another 25 times on the
device sd2a (which happened to be the first filesystem it checked)
and came up with this message:

CANNOT READ:  BLK 5176
CONTINUE?

I looked into the System and Network administration manual and it
said "This message should never appear.  Ask a guru"!  Now I ask you
net.gurus, What can I do about the disk?  Is there some way to label
this sector as a bad one and proceed?  I tried to start up format
but for some strange reason, the link /usr/etc/format was to thin
air ( actually it was pointing to ../someplace).  I might be
able to (eventually) trace format, but is re-formatting the disk of
any help?

Thanks.

Please reply to: krish@vuse.vanderbilt.edu
--Krish
--
--Krish
Newsgroups: comp.unix.wizards
From: cons@mercury.cern.ch (Lionel Cons)
Subject: Checking a File Descriptor
Organization: CERN, European Research Center for Particle Physics
Distribution: comp
Date: Mon, 5 Oct 1992 12:09:52 GMT

Question: Is there a way to check if a file descriptor is OK for
writing (without writing to it) ?

Details: I have a client communicating with a server via some mean
(socket or named pipe or ???) and I'd like to know if the connection
is valid without sending data to the server. All I know is the file
descriptor corresponding to the communication channel. Any idea ?

Thanks for your help.
--

Lionel Cons

+------- CERN - European Laboratory for Particle Physics -------+
| E-mail: cons@dxcern.cern.ch                                   |
| Earth-mail: CN/SW/WS, CERN, CH-1211 GENEVE 23, Switzerland    |
| Phone: +41 22 767 49 13              Fax: +41 22 767 71 55    |
+---------------------------------------------------------------+
Newsgroups: comp.unix.wizards
From: mju@mudos.ann-arbor.mi.us (Marc Unangst)
Subject: Re: SCO and remove?
Date: Wed, 30 Sep 1992 02:28:53 GMT
Organization: The Programmer's Pit Stop, Ann Arbor MI

In article <1992Sep29.181850.18841@nwnexus.WA.COM> brc@halcyon.com (Brian Cartmell) writes:
>   Ive got a friend who did a rm on his unix box which runs SCO UNIX,
>and was wonderding if anyone knows of any software that could help
>recover his files.

"tar", "cpio", or "restore", depending on how he did his backups.

-- 
Marc Unangst, N8VRH         | "There are two ways to solve this problem:
mju@mudos.ann-arbor.mi.us   | the hard way, and the easy way.  Let's start
                            | with the hard way."
                            |   - W. Scheider, from a Physics lecture
Xref: sparky comp.unix.wizards:4134 comp.os.linux:12108
From: dpayton@qcinet.Gwinnett.COM (Doug Payton)
Newsgroups: comp.unix.wizards,comp.os.linux
Subject: Re: Linux activists unite all you have to lose is your DOS
Date: 30 Sep 92 14:17:11 GMT
Article-I.D.: qcinet.1992Sep30.141711.16683
Organization: Quality Consultants, Inc.

In article <1992Sep29.193435.12556@murdoch.acc.Virginia.EDU> lfoard@Turing.ORG (Lawrence C. Foard) writes:
>So why not bombard BYTE with letters asking them to cover free software?
>
>Any one know what there address for comments is? (Why do I suspect they
>don't know what e-mail is?)

Wrong, Buffalo Breath!  :-)

Letters to the Editor:  letters@bytepb.byte.com

Enjoy!
-- 
Doug Payton -- Internet:  dpayton@qcinet.gwinnett.com

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
                 You may have already won $10,000,000 !
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Newsgroups: comp.unix.wizards
From: pnarayan@cs.tamu.edu (P S Narayan)
Subject: Filesystem question
Organization: Computer Science Department, Texas A&M University
Distribution: usa
Date: Tue, 29 Sep 1992 14:53:58 GMT

Hello I have a question on the filesystem

Suppose I have a UNIX disk sd3 and sd3g is one partition. I ran newfs on
this partition which means the file manager is creating the superblocks and
inode blocks and cylinder blocks. I then open the file /dev/rsd3g (raw disk)
and write some garbage information into the disk. Then will it overwrite on
the filesystem that I just created ?

Narayan
pnarayan@cs.tamu.edu

Newsgroups: comp.unix.wizards