HDTenEightyP/NetNews huggingface dataset:
From: acheng@ncsa.uiuc.edu (Albert Cheng)
Subject: Re: Help : Copy protection
Originator: acheng@shalom.ncsa.uiuc.edu
Organization: Nat'l Ctr for Supercomp App (NCSA) @ University of Illinois
Date: Thu, 15 Oct 1992 15:19:20 GMT


In article <01050166.g45ci5@joebloe.maple-shade.nj.us>, joseph@joebloe.maple-shade.nj.us (Joseph Nathan Hall) writes:
>
>It was a weekday, the day before a customer was coming in with some  
>software to compile/demonstrate using the Quest Motif that was installed on 
>our SPARC.  Most of our users preferred OpenWindows, so it wasn't often
>used.  What a nice surprise it was to find that the license we were
>running under was a temporary license that had expired.  What an even
>nicer surprise it was when we called Quest for the new password and
>were told that their "computer was down" and they couldn't give it
>to us right away.

Quest should have those critical functions on a more reliable machine
or machines.  But did they send you an already expired temporary
licensed software that caused you problems OR did your system
administrator let a temporary licensed software expired without taking
any action?  If the latter case, do you think it is fair or even useful
to blame Quest?
From: smee@bristol.ac.uk (Paul Smee)
Newsgroups: comp.unix.wizards
Subject: Re: Disk leakage?
Date: 9 Oct 92 16:32:35 GMT
Reply-To: P.Smee@bristol.ac.uk (Paul Smee)
Organization: University of Bristol

In article <BvtCFB.I1F@news.cso.uiuc.edu> acheng@ncsa.uiuc.edu (Albert Cheng) writes:
>
>In article <1992Oct8.095328.4108@bristol.ac.uk>, smee@bristol.ac.uk (Paul Smee) writes:
>>We've got a mystery, in that large (in our context) chunks of disk
>>occasionally mysteriously vanish, to reappear if you reboot.  I believe
>>I understand the mechanism, question is a bit deeper than that.
>
>Try "pstat -i" which shows all inodes in use, together with the sizes,
>UID, etc.  Then use "ps axl" to get a list of processes of the same UID
>for further investigation.  But I don't know of a simple tool to find
>the PID(s) that reference the inode.  Any suggestions from real
>wizards?

Thanks, I'll check that as a possibility.  Couple of people have
suggested progs called 'lsof' (list open files, presumably?) and
'ofiles', both of which are reputedly public domain.  I was going to
have a scan around archie for them.

-- 
Paul Smee, Computing Service, University of Bristol, Bristol BS8 1UD, UK
 P.Smee@bristol.ac.uk - ..!uunet!uknet!bsmail!p.smee - Tel +44 272 303132
From: sequent!verdix.COM!MAILER-DAEMON@uunet.uu.net
Newsgroups: comp.unix.wizards
Subject: failed mail
Date: 15 Oct 92 18:14:59 GMT

=======     command failed      =======

 COMMAND: /usr/bin/uux -r - encore!rmail '(schandle)'

======= standard error follows  =======
bad system name: encore
uux failed. code 68
======= text of message follows =======
From sequent!uunet!sem.brl.mil!unix-wiz
Received: by sequent.sequent.com (5.65/1.34)
	id AA23347; Wed, 14 Oct 92 23:19:12 -0700
Received: by sequent via UUCP from uunet; Thu Oct 15 00:41:27 1992
Received: from SEM.BRL.MIL by relay1.UU.NET with SMTP 
	(5.61/UUNET-internet-primary) id AA08216; Thu, 15 Oct 92 00:41:27 -0400
Received: by SEM.BRL.MIL id aa26333; 14 Oct 92 17:44 EDT
Received: from SEM.BRL.MIL by SEM.BRL.MIL id ab18794; 14 Oct 92 15:31 EDT
Received: from sem.brl.mil by SEM.BRL.MIL id aa18591; 14 Oct 92 15:15 EDT
Date:       Wed, 14 Oct 92 15:15:08 EST
From: The Moderator (Mike Muuss) <sequent!uunet!BRL.MIL!Unix-Wizards-Request>
To: UNIX-WIZARDS@BRL.MIL
Reply-To: sequent!uunet!BRL.MIL!UNIX-WIZARDS
Subject:    UNIX-WIZARDS Digest  V16#038
Message-Id:  <9210141515.aa18591@SEM.BRL.MIL>

UNIX-WIZARDS Digest          Wed, 14 Oct 1992              V16#038

Today's Topics:

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


End of UNIX-WIZARDS Digest
**************************
Newsgroups: comp.unix.wizards
From: acheng@ncsa.uiuc.edu (Albert Cheng)
Subject: Re: Disk leakage?
Originator: acheng@shalom.ncsa.uiuc.edu
Organization: Nat'l Ctr for Supercomp App (NCSA) @ University of Illinois
Date: Fri, 9 Oct 1992 16:21:15 GMT


In article <BvtCFB.I1F@news.cso.uiuc.edu>, acheng@ncsa.uiuc.edu (Albert Cheng) writes:
>Try "pstat -i" which shows all inodes in use, together with the sizes,
>UID, etc.  Then use "ps axl" to get a list of processes of the same UID
>for further investigation.  But I don't know of a simple tool to find
>the PID(s) that reference the inode.  Any suggestions from real
>wizards?

[Yes, I am responding to my own post.  It is lonely here. :-)]

Someone told me a tip of a PD tool called "ofiles" that shows
the information of processes "linked" to an open file.  Try
"archie ofiles" or "archie ofiles.c" to locate it.

Newsgroups: comp.unix.wizards
From: dold@unislc.uucp (Clarence Dold)
Subject: Re: malloc() and free ()
Organization: Unisys Corporation SLC
Date: Thu, 8 Oct 1992 19:32:23 GMT

From article <1992Oct8.160459.25205@kocrsv01.delcoelect.com>, by c23rrj@kocrsv01.delcoelect.com (Rajnish Joshi):

> MY Question: Since no followup (flames) for the above statement was received,
>               is the above statement TRUE?
I know that it is true on AT&T SVR3.2.

>      If the above statement is TRUE then why am I able to allocate the entire
>        memory to my application, free half of it back, and make the applicatio
Perhaps you are using a non-standard malloc that does release the memory.
Some malloc schemes will release the memory, if it is at the end of the
currently allocated memory, but will not create sandbars (holes) in memory
by releasing intervening chunks.  This is probably leftover thinking from
the days of inferior MMU, but it is still the defacto standard.

If your program does malloc, not calloc, then you haven't actually written
any data to the memory space that you have allocated.  Some paging schemes
will take advantage of this, and allow humongous memory allocations to
occur.  Have you also exhausted the swap space?  Modern OS will "reserve"
swap space, but allow processes to grow to what is ultimately an unusable
size.  

Look at "ps -le", noting the SZ, as your process mallocs.  Note the SZ after
you do the free().  If it shrinks, you  gave it back.

-- 
---
Clarence A Dold - dold@unislc.slc.Unisys.COM
               ...pyramid!ctnews!tsmiti!dold
Xref: sparky comp.unix.wizards:4345 comp.unix.questions:12174
From: throop@aurs01.UUCP (Wayne Throop)
Newsgroups: comp.unix.wizards,comp.unix.questions
Subject: Re: BEEP program
Date: 16 Oct 92 17:40:28 GMT

: From: mitch@lsil.com (Mitch Sako)
: Message-ID: <1992Oct15.204455.9518@lsil.com>
: Does anyone have a small program that will "beep" a sparc workstation?

Well, the shell script

        xterm -e echo "^G"

or the K&R C program

        int execl();
        int main(){
            execl( "/usr/bin/X11/xterm", 
                   "xterm", "-e", "echo", "\007", (char*)0 );
            return 1;
        }

seem to work just fine.  If by "beep a workstation" is meant
to do this remotely, then variants on

        rsh workstation xterm -display :0.0 -e echo "^G"
or
        xterm -display workstation:0.0 -e echo "^G"

depending on what works permission-wise.

( Of course, if by "small" is meant "efficient" or "a small executable
  image" instead of "a small source file", then "nevermind". )

Wayne Throop       ...!mcnc!aurgate!throop
From: kool@ws01cso.wldelft.nl (Marc H. Kool)
Newsgroups: comp.unix.wizards
Subject: how to get a signal when a non-child process dies
Keywords: signal, process
Date: 12 Oct 92 13:43:11 GMT
Organization: Waterloopkundig Laboratorium (Delft Hydraulics)


I am writing an application that start long-lasting child processes.
I use the SIGCHLD signal to enter a signal handler when a child dies.
Everything is OK so far.

What I want is to be able to leave the `master' process, (re)start it
at a later time and to get a signal when a ``child process'' 
(which I created with the previous master process) dies.

Some application info: the `master' is a large interactive application
built with X and Motif libraries.  What I am looking for is a solution
that does not use some polling mechanism.  Is this possible ??? Thanks!

Marc.
-- 
                                                 _____    ____    _____
Marc H. Kool                                      \   \  /   /\  /   /
Marc.Kool@wldelft.nl                               \   \/   /  \/   /
                                                    \   \  /\   \  /
Waterloopkundig Laboratorium (Delft Hydraulics)      \___\/  \___\/
From: davidsen@ariel.crd.GE.COM (william E Davidsen)
Newsgroups: comp.unix.wizards
Subject: Re: fork() and forget..How?
Keywords: fork() wait() getpid() getppid()
Date: 12 Oct 92 19:48:55 GMT
Reply-To: davidsen@crd.ge.com (bill davidsen)
Organization: GE Corporate R&D Center, Schenectady NY

In article <1992Oct07.194020.14527@ctms.gwinnett.com>, kirk@ctms.gwinnett.com (R. Kirk Waterhouse) writes:

| I followed the examples in the AT&T Programmers Guide and other books and they 
| won't quite work.
| 
|    if (fork()) {
|       if(child) {
|          ...
|          process_data_and_die();
|          exit(1);
|       }
|       else
|       if (parent) {
|          wait()
|       }
|    }
| 
| If I do it basicly like this I only get one instantiation of my child process
| because the parent sits there at the wait, losing data from it's input because
| this child takes approx. 1-2 minutes to complete.

  Well, assuming that you don't need more "channels" than the system
will let you have due to process number limitations, the way you do it
is to use signal() to catch the SIGCHILD, then do a wait after the child
is dead. It doesn't keep you from hitting the wall if you need more
children that the system will let you have, though.
-- 
bill davidsen, GE Corp. R&D Center; Box 8; Schenectady NY 12345
    Keyboard controller has been disabled, press F1 to continue.
From: mdr@bjorn (Doc Chaos)
Newsgroups: comp.unix.wizards
Subject: DAMN: deleted all my files; saved partition tho'
Summary: Ill placed rm *
Keywords: rm bonehead
Date: 7 Oct 92 18:18:43 GMT
Organization: University of Reading
X-Newsreader: Tin 1.1 PL4

Yeah, bonehead at the wheel, typed 'rm *' into wrong window.
Unfortunately the files were never backed up - they weren't
really important, but I'd like them back, if possible.  It 
would take me at least two days to get them all again, and 
what the hell, it could be a useful exercise.

What I did was to immediately 'dd' the whole partition containing
the "deleted" files onto a tape; total size ~118 Meg; deleted
files about 100 taking up 30M.  The system is a SPARC running
SunOS 4.1.1.  I guess I've got to muck around with inodes or summat
but don't really know where to start.  I'm guessing it can be done
'coz people make a living out of rescuing schmucks, don't they? :-)
I'd appreciate any and all help.

AtDhVaAnNkCsE

mark

--
m.robinson@reading.ac.uk

"I really like the jacket but the sleeves are much too long" - Lemmy
From: elliot@ansoft.com (mike elliot)
Subject: Re: Help : Copy protection
Organization: Ansoft Corp. Pittsburgh
Date: Tue, 13 Oct 1992 03:51:52 GMT

In article <16793@ksr.com> dean@ksr.com (Dean Anderson) writes:
>Forget it.  Any copy protection scheme can be overcome with a little effort
>and knowledge (and a debugger).
>

True. A good criminal can get through the deadbolt on my door too, but
I still lock it. It is just plain foolishness to leave your door wide
open.

>Those likely to pirate your software will have the knowledge and will make
>the effort.  Your efforts to copyprotect (and the money to implement them) 
>have been wasted.

This is not true. Most software pirates are just everyday users who
don't consider making a copy of a program stealing. While no copy-
protection scheme can keep out everyone, if I can keep out 80 percent
of the thieves I have done my job.

>
>As for those who wouldn't pirate the software.  They will simply
>be annoyed.
>
>Sounds like just the thing to do to your most loyal customers.

Only if you go to extremes. You can take some fairly reasonable
precautions which won't inconvenience your customers.

What we do here is have an external encrypted codeword which you need
to run the software.  Once the customer receives the software, he calls
us, we give him the codeword and he is running 30 seconds later.

In addition to protecting our software, this gives us a chance to help
the customer with any problems/questions he has initially. Just the kind
of thing I want to do to my most loyal customers. That's why they are so
loyal.

>
>		--Dean
>
>--
>Dean Anderson			dean@ksr.com  |  I'm not voting because the
>KSR Computing Facilities                      |  lack of a candidate has
>Kendall Square Research                       |  co-opted me out of the process

As to your statement about not voting: If you don't like the system
change it. Hiding from it won't get you anywhere.

-mje

-- 
Mike Elliot                  Did Adam and Eve have navels? -Milo
elliot@ansoft.com

Disclaimer: My boss doesn't listen to what I say, why should you?
From: joseph@joebloe.maple-shade.nj.us (Joseph Nathan Hall)
Newsgroups: comp.unix.wizards
Subject: Exec-ing after KILL -TERM 1
Date: Tue, 13 Oct 92 12:26:44 EDT
Organization: 5 Sigma Software
Reply-To: joseph@joebloe.maple-shade.nj.us
X-Mailer: uAccess - Macintosh Release: 1.5v5


(OK, I tried some other groups, but no answer yet.)

I'm wondering if there is a way to set things up so that I can have
a script exec'ed automatically immediately after a kill -TERM 1.  The 
idea is to automate the process of doing level 0 dumps on a SPARCstation 
running SunOS 4.1.2.  Currently I just don't know of a way to do an
unattended dump in single-user mode, that is, how to get one started
in single-user mode without having to type exec something-or-other
in the process.

I am not so sure how critical it really is to have the system in
single-user mode during level 0 dumps, anyway.  Could a suitable level
of quiescence be achieved by disabling new process creation through
init during the backup?  Would killing and restarting some processes
or daemons be necessary?  I mean, I could kill whatever I needed to,
then just reboot after the dump ....  Hmm.  Maybe that's an idea.
I am sufficiently ignorant, however, that I wouldn't know which processes
to kill without some study, or advice.  (Latter preferred!)

Just curious, wishing I were surrounded by gurus at work so I wouldn't
have to post embarrassing stuff like this.

uunet!joebloe!joseph   (609) 273-8200 day   joseph%joebloe@uunet.uu.net
2102 Ryan's Run East        Rt 38 & 41             Maple Shade NJ 08052
-----My employer isn't paying for this, and my opinions are my own-----
Newsgroups: comp.unix.wizards
From: work@tasha.guug.de (Felix Blank)
Subject: Re: fork() and forget..How?
Keywords: fork() wait() getpid() getppid()
Date: Thu, 8 Oct 1992 23:50:20 GMT

One way to go is, to use the signal facility of UNIX.
Every time a process dies, there is a signal delivered to its parent
process. This signal (SIGCHLD) may be caught and the invoced handler
can then do the wait system call.
Your process doesn't get locked by waiting for his childreen to die,
and can handle other requests meanwhile.

Felix
-- 
Felix Blank                                 Internet   : felix@tasha.guug.de
Germany, Munich                             CompuServe : 76334,3373
Fax: +49-89-8206074
Newsgroups: comp.unix.wizards
From: crash@ckctpa.UUCP (Frank "Crash" Edwards)
Subject: Re: how to get a signal when a non-child process dies
Date: Wed, 14 Oct 1992 02:55:24 GMT
Reply-To: crash%ckctpa@tct.com (Frank "Crash" Edwards)
Organization: Edwards & Edwards Consulting

luochen@screen.Princeton.EDU (Luoqi Chen) writes:
>From article <Bw0Grz.28C@wldelft.nl>, by kool@ws01cso.wldelft.nl (Marc H. Kool):
>> What I want is to be able to leave the `master' process, (re)start it
>> at a later time and to get a signal when a ``child process'' 
>> (which I created with the previous master process) dies.

You could make it a two-step process:  run a program which puts itself
in the background as the master process.  It starts up the other
children and waits for the SIGCHLD just like before.  It can
communicate with a new instantiation of the master process by any
method you like.
-- 
Frank "Crash" Edwards            Perceptual Technologies, Inc.
Fax:  813/786-6526               [Our office is moving; watch this space
Home: 813/786-3675               for the new phone number.]
Xref: sparky comp.unix.wizards:4333 comp.unix.questions:12159
From: mitch@lsil.com (Mitch Sako)
Newsgroups: comp.unix.wizards,comp.unix.questions
Subject: BEEP program
Date: 15 Oct 92 20:44:55 GMT
Reply-To: mitch@lsil.com
Organization: LSI Computing Systems

Does anyone have a small program that will "beep" a sparc workstation?
We run openwin 3.0.  Send replies to msako@lsil.com since I do not subscribe
to these newsgroups.  Thank you.
---
====================================================================
Mitch Sako	LSI Logic Corporation	OFFICE	408-433-4187
local:		mitch@dcs4
internet:	msako@lsil.com		FAX	408-433-8796
uucp:		lsil!msako
RIME:		->REDBARON, conference=POLITICS
Disclaimer:	Opinions expressed are mine and only mine
Newsgroups: comp.unix.wizards,comp.unix.questions
From: bbobak@undergrad.math.uwaterloo.ca (Brad Bobak)
Subject: Re: Sockets and stuff
Organization: University of Waterloo
Date: Fri, 9 Oct 1992 12:55:11 GMT

In article <Bvu2Cp.69J@cs.dal.ca> you write:
>
>I am working on a project that involves a daemon, and obviously, I will be
>using sockets for all of the communications. After looking thru various FAQ's
>and stuff, I just can't seem to find what I am looking for..
>
>I know how to set up a socket and talk with it.. however, my problem is
>waiting for a connection and multiple users..
>
>If a connection has not been made, I want my program (the daemon) to run
>some other stuff, since more than one user will be able to access it at
>a time. I am led to believe that accept sits and waits for a connection
>of some sort and doesn't do anything else until a connection is made.
>Am I incorrect in this assumption?
 More or less, yes. (see below)

>If this is the case, how would I check
>to see if a connection is being made, and if not, continue running other
>parts of my program to take care of the users who are already connected.
 If you have the select() call on your system, you can use that. eg:

 fd_set fds;
 struct timeval tv;

 tv.tv_sec = 1;   /* spend max. 1 second checking for new connections */
 tv.tv_usec = 0;

 FD_ZERO(&fds);
 FD_SET(your_socket, &fds);

 /* actually, if your only checking your socket, you can set MAXFDS to
  * your sockets descriptor number + 1
  */
 select(MAXFDS/*NOFILE in /sys/param.h*/, &fds, (fd_set *)0, (fd_set *)0, &tv);
 /* don't forget to do error checking for select */
 if (FD_ISSET(your_socked, &fds))
 {
	/* something is ready on the socket */
	accept(...);
 }
 else
 {
	/* do your stuff */
 }

 if you don't have select, or want to do this another way:

 make your socket non-blocking, one way is to use O_NDELAY:

 fcntl(your_socket, F_SETFL, O_NDELAY);
 /* error checking.. */

 then do an accept:

 res = accept(...);
 if (res == -1  &&  errno == EWOULDBLOCK)
 {
	/* no new connection */
 }

>
>And where might I find some stuff on the net that talks about sockets and
>daemons and the like? I have a few books here, but they don't say much..
>at least not what I need..

  Use archie to find '07.ipctut' and '08.ipc' they're mainly just
 examples on how to do interprocess communication, but they'll more
 than likely help you out.
	
>-- 
>	     Mike Digdon - Vice Prez DSCSS - Dalhousie University
>		     digdon@ug.cs.dal.ca  -- Halifax, NS
>		 - Real programmers never work nine to five -


Newsgroups: comp.unix.wizards
From: rens@lorax.shearson.com (Rens Troost)
Subject: Re: fork() and forget..How?
Reply-To: rens@shearson.com (Rens Troost)
Organization: Lehman Brothers
	<1992Oct9.130646.7250@progress.com>
Date: Fri, 9 Oct 1992 20:32:19 GMT

In article <1992Oct9.130646.7250@progress.com> gus@progress.COM (Gus Bjorklund) writes:

   >In article <1992Oct07.194020.14527@ctms.gwinnett.com> kirk@ctms.gwinnett.com (R. Kirk Waterhouse) writes:

   >Processes generate SIGCHLD when they die. What you want here is to install a 
   >signal handler that waits for the children as and when they die:

   ># include <signal.h>

   >waiter()
   >{
   >	union wait st;
   >	while (wait3(&st, WNOHANG, NULL) > 0);
   >}

   >in your process that fork()s, stick this in:

   >signal(SIGCHLD, waiter);

   >So, you need not insert any wait's in your main code, and you can service 
   >requests from the pipe without waiting for the previous one to finish. When
   >the processes die, the interrupt routine waiter() will be called to clean
   >up shop, and you'll be returned back to your regularly scheduled
   >programming.

   You also should make sure that when the parent exits, it wait()'s
   for any children which have not yet finished.

Good idea. Be careful about using this in networking code - the
SIGCHLD approach can iinterfere with timing in RPC code especially.
What I do in these cases is to do a wait loop at the bottom of each
iteration of the RPC service routine -- this also avoids having to
restart interrupted system calls.

-Rens
--
  __   ___  ,    __  
 /__) /__  /| / (    |  J. Laurens Troost    Lehman Brothers Technical Services
/  \ (___ / |/ __)   |  *Opinions expressed herein are mine. Mine, I tell you!*
-------------------------------------------------------------------------------
INET: rens@shearson.com        VOICE: (212) 464-3705        FAX: (212) 464-2040
From: dean@ksr.com (Dean Anderson)
Newsgroups: comp.unix.wizards
Subject: Re: Help : Copy protection
Date: 12 Oct 92 16:40:14 EDT
Organization: Kendall Square Research

Forget it.  Any copy protection scheme can be overcome with a little effort
and knowledge (and a debugger).

Those likely to pirate your software will have the knowledge and will make
the effort.  Your efforts to copyprotect (and the money to implement them) 
have been wasted.

As for those who wouldn't pirate the software.  They will simply
be annoyed.

Sounds like just the thing to do to your most loyal customers.


		--Dean

--
Dean Anderson			dean@ksr.com  |  I'm not voting because the
KSR Computing Facilities                      |  lack of a candidate has
Kendall Square Research                       |  co-opted me out of the process
Newsgroups: comp.unix.msdos