HDTenEightyP/NetNews huggingface dataset:
From: jja@fnbc.com (Joseph Alotta)
Subject: i need help with tar and tapes drives.
Keywords: tar,gnutar,tapes
Organization: First National Bank Of Chicago, Chicago IL, USA
Date: Mon, 9 Nov 92 16:44:04 GMT


i am trying to tar backup files to tape. 

i can:

tar cvf /dev/rst0 /data/*
tar tvf /dev/rst0
tar xvf /devrst0  filenames.

without much problem.

but since my tape is not filled up, i'd like to append new files to
the end of it.

i tried "tar rvf /dev/rst0"  but it didn't work.  seems the r option
is unsupported on my machine.  

i ftp'd gnutar and tried "gnutar -Avf /dev/rst0"  but that didn't work.
i got cannot backspace error.

people say i should use "mt -f /dev/nrst0 -fsf 99" to get to the end of  
thetape and then "tar cvf /dev/nrst0 *", but i don't like having to  
remember what segments i've used on the tape and what is in each segment.

can anyone help me to get gnutar to append?

btw, i am using a archive dat tape and a nextstation 3.0.

thanks in advance,

joe.



--
==============================================================
! joe alotta                                    jja@fnbc.com !                                               
!                                             (312) 732-3439 !
!                                                            !
! "The main thing is to keep the main thing the main thing." !
! Dr. George Sweeney                                         !
==============================================================
Newsgroups: comp.unix.programmer
From: rjohnson@shell.com (Roy Johnson)
Subject: Re: finger
Organization: Houston, TX
Date: 4 Nov 92 15:30:04

ppc1@cec2.wustl.edu (Peter Pui Tak Chiu) writes:
   when someone is fingering me, i want to find out where that person is
   and who that person is.

Make your .plan a named pipe.  Start a daemon to write whatever into
it repeatedly, and each time it finishes, call

	system("wall 'Who did that?'");

8^)
--
Roy Johnson
Shell Development Company (but speaking for myself)
Clinton won - I guess there are still plenty of people who don't
see the irony in "I'm from the government and I'm here to help."
From: guy@Auspex.COM (Guy Harris)
Newsgroups: comp.unix.programmer
Subject: Re: setuid programs and calls...
Date: 7 Nov 92 20:25:15 GMT
Organization: Auspex Systems, Santa Clara

>I have just a minor question, but how does a Sun executable program
>find out its effective uid?  Whenever I trace a program I see that it
>make makes a call to getuid but not geteuid.  I have always wondered
>about this.

Do not confuse traps into the kernel with procedure calls.

Both the "getuid()" and "geteuid()" calls make the exact same trap into
the kernel; the real and effective UIDs are returned in two different
registers.  The "getuid()" routine returns the value in one of those
registers; the "geteuid()" routine returns the value in the other.

"trace" traces traps into the kernel, not procedure calls.
Newsgroups: comp.unix.programmer
From: crosby@kinglear.cs.colorado.edu (CROSBY MATTHEW JAME)
Subject: Help with re-directing stdout
Organization: University of Colorado at Boulder
Date: Sun, 8 Nov 1992 05:04:57 GMT

I have writte a program that opens a pipe, forks and dup2's the input side of
the pipe to stdout (file 1).  I can write through the pipe fine by write(1,...)
but I can't use any higher level commands--printf(), putchar(), etc.  The data
just seems to disapear...   Am I screwing up somewhere?
I have made sure the pipe buffers, etc etc...

(If it is any help, I am using HP-SUX...er, HP-UX)


-- 
-Matt
Mere anarchy is loosed upon the net!!!!
mcrosby@nyx.cs.du.edu     or     crosby@cs.colorado.edu
Newsgroups: comp.unix.programmer
From: shansen@adobe.com (Steve Hansen)
Subject: Communication tools
Summary: Looking for tools for automating remote login/download
Organization: Adobe Systems Incorporated
Distribution: usa
Date: Fri, 13 Nov 1992 18:55:01 GMT

I am creating software which will allow me to automatically (in batch) log
into a remote system (which requires passing several prompts) and then
downloading some files by entering a given command.  The filenames will
change day to day (but in a predictable way).  I am looking for tools
which will help me do this.  I am currently using Kermit but I need more
capability (like Crosstalk or Blast in the PC world).  A C or C++ library
would be ideal, because I need to use language constructs (if, while) and
variables as in

repeat 10 times
    dial phone no
    if successful then break
    sleep 10 minutes
end

Can anyone recommend software which can help me?  I'm especially interested in
any public domain software.  My system is Unix, the remote system is not.
From: ravikm@austin.ibm.com (Ravi K Mandava)
Newsgroups: comp.unix.programmer
Subject: Re: Socket Programming Help
Date: 5 Nov 92 16:04:51 GMT
Reply-To: ravikm@piobe.austin.ibm.com
Organization: IBM Austin
Originator: ravikm@piobe.austin.ibm.com


In article <1992Nov4.143004.22495@nuscc.nus.sg>, scstech@solomon.technet.sg (Kenneth Soh) writes:
> I keep having "Address already in use" (errno 48) problem
> everytime I restart the deamon with the same port number -
> the bind() function returns error. The same port number
> seems to be "released" and re-usable after say, half an
> hour.

	Before bind(), set your socket to be reused by calling setsockopt().
		Ex:	int on = 1;
		... setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, (char *)&on,
			       (int)(sizeof on));

> sin.sin_addr.s_addr = INADDR_ANY;
> sin.sin_port = atoi(argv[1]); <-- just a port number

	Also, if these are not already in network format, use
	sin.sin_addr.s_addr = htonl((ulong_t)INADDR_ANY);
	sin.sin_port = htons((ushort_t)atoi(*argv));

-- 
*******************************************************************************
Ravi K Mandava		email:	piobe!ravikm@ibmpa.awdpa.ibm.com
*******************************************************************************
Newsgroups: comp.unix.programmer
From: buck@netcom.com (Charles Foreman)
Subject: UDP delivery of messages
Organization: Netcom - Online Communication Services (408 241-9760 guest)
Date: Mon, 9 Nov 1992 23:32:00 GMT

Hi,

I have 2 programs, one which broadcasts a bunch of messages, and 
one which reads those broadcast messages. I run the "reader" on 2
different computers. I then run the "broadcaster" on one of the 2
computers that is running a "reader". These programs use UDP sockets,
using a pre-defined port number. The part I'm curious about is that the
the "reader" not on the same node as the "broadcaster" sees only a small
percentage of the number of broadcast messages actually sent. I know
that datagram's are not guaranteed delivery, but why would the percentage
be so low (around 10%). The "reader" running on the same node as the 
"broadcaster" gets all of the messages every time.

What I'm looking for is just a little better understanding of what's
going on. I usually broadcast about 1000 1K messages. No this is
not what I really need to do, but this test program has got me
curious. Any info on reference material would also be appreciated.

Reply via email or post.

Thanks,

	Buck Foreman
	buck@netcom.com

Newsgroups: comp.unix.programmer
From: mdw@theory.TC.Cornell.EDU (Matt Welsh)
Subject: Re: Creating a background process from within C prog
Organization: Cornell Theory Center
Date: Thu, 12 Nov 1992 00:30:35 GMT

In article <1992Nov11.032950.23086@leland.Stanford.EDU> dkeisen@leland.Stanford.EDU (Dave Eisen) writes:
>If you're going to use system, you might as well take the shell
>you spawn for all it's worth and write:
>
>      system ("ls > /tmp/myfile &");

Um, why? The process running the system is fork()ed from the parent, which 
isn't neccesarily wait()ing for the child to finish. That won't buy you
much (unless I'm very confused :)). 

mdw

-- 
Matt Welsh    mdw@tc.cornell.edu        +1 607 253 2737
Systems Programmer, Cornell Theory Center
  "She's like jelly roll, like sculpture!"
From: jmd6@unix.brighton.ac.uk (Durrant;f110or89;[05306)
Newsgroups: comp.unix.programmer
Subject: PS type info from C question?
Date: 13 Nov 92 11:05:02 GMT
Organization: University of Brighton, UK


I using sunos 4.1.2.3 and I'm after getting access to
the process information for a running process. By info
I mean processor time used, command running, mem in use, etc.
The sort of thing that ps returns. I think it should be 
possible through ptrace but this only terminates the process
I attach to.

On Unix SVR4 I could do this by doing an ioctrl on a process file
in the proc virtual file system. But under sunos such nicetys are
absent.

Please mail me any sujestions.

Thanks

Jon Durrant (jmd6@uk.ac.bton.unix) JANET address
Newsgroups: comp.unix.programmer
From: mishra@controls.ccd.harris.com (Sanjoy Mishra)
Subject: advise port to SVR4
Originator: mishra@sp1
Organization: Harris Controls
Date: Fri, 6 Nov 1992 15:26:51 GMT



Hi:

 I am looking for a program which directs console(or any terminal) output
to any other terminal. I understand that advise does this type thing. I would
like to know if someone has ported it to SVR4.

Thanks for any help.

-Sanjay
mishra@controls.ccd.harris.com
Newsgroups: comp.unix.programmer
From: lenard@mullian.ee.mu.OZ.AU (rohan james lenard)
Subject: Creating Dynamic Libraries for DG Aviions under dgux5.4.xx
Summary: How do you create dynamic libraries under dgux5.4.xx on DG Aviions
Organization: Computer Science, University of Melbourne, Australia
Date: Sat, 14 Nov 1992 01:48:45 GMT


The subject just about sums it up -
How do you create dynamic (shared) libraries under dgux5.4.xx.
My friends at a local software house would like to make their standard
libraries shared, but have not been able to work out how. They are 
using gcc/g++ 2.2.2 and dgux5.4.1 (soon to be 5.4.2)

Thanks in advance,
	Rohan
------------------------------------------------------------------------
Rohan Lenard
lenard@munagin.ee.mu.OZ.AU			O O
lenard@mundil.cs.mu.OZ.AU			 |
lenard@ecr.mu.OZ.AU				\_/
--
Rohan Lenard
lenard@munagin.ee.mu.OZ.AU
lenard@mundil.cs.mu.OZ.AU
lenard@ecr.mu.OZ.AU
Newsgroups: comp.unix.programmer
From: datpete@daimi.aau.dk (Peter Andersen)
Subject: mc680x0 chk2 question
Reply-To: datpete@daimi.aau.dk (Peter Andersen)
Organization: DAIMI: Computer Science Department, Aarhus University, Denmark
Date: Thu, 5 Nov 92 20:05:26 GMT

I don't know if this is the right group, but I could not find
a better one.


I am writing some assembler code, and I want to check if
a value in, say, register d0 is between two values, that
I have allocated rigth after each other.
This seems to be a situation where chk2 can be used.
It actually works for me, except in one case: The bounds I
check agains vary during the execution. At a particular time
the low bound is 1, and the high bound is 0.
I would expect chk2 to trap no matter the value of register d0
in this situation, but instead it never traps.

Is the high bound required to be at least the value of the low
bound for chk2 to work?
Does anyone have a clue?

Peter Andersen
From: ddv@unix.brighton.ac.uk (Domenico De Vitto)
Newsgroups: comp.unix.programmer
Subject: Re: Standard Method of Handling/Detecting Out of Virtual Memory condition
Date: 11 Nov 92 17:38:06 GMT
Organization: University of Brighton, UK

Confusing post !

memory=virtual memory=malloc memory=usable address space=what you can have.

It's the swappers job to make sure that a process never has such problems, and
therefore is all transparent no matter how much 'real' memory you have.

Dom  De Vitto
Newsgroups: comp.unix.programmer
From: robinson@mdivax1.uucp (Jim Robinson)
Subject: Re: Signal Handlers and malloc()
Reply-To: robinson@mdd.comm.mot.com (Jim Robinson)
Organization: Motorola - Mobile Data Division; Richmond, BC
X-Newsreader: TIN [version 1.1 PL6]
Date: 14 Nov 92 00:24:32 GMT

Christoph Badura (bad@flatlin.ka.sub.org) wrote:
>In <1992Nov9.064910.778@noose.ecn.purdue.edu> kudva@ecn.purdue.edu (Gautham K. Kudva) writes:
>
>>     I've written a signal handler for the VTALRM signal. The signal
>>handler calls another routine which does quite a bit of work. This program
>>start crashing in an unpredictable fashion.
>
>You should rewrite your program so that it only sets a flag variable
>in the signal handler and do the "quite a bit of work" out side the
>signal handler in the main part of the program.
>
>This is the only way to make the program work reliably.

If your program is structured as some sort of I/O loop, then there is an
alternative approach. Namely, unblock the signals of interest while the
program waits for I/O, and block said signals when the I/O is being
serviced. You probably also want to set up the signal handlers to block the
other relevant signals while they are executing, and to save/restore errno
on handler entry/exit.

For example (some error checking omitted for clarity):

	/* set up signal mask */
	.....
	for (;;) {
		do {
			.....
			/* unblock relevant signals */
			(void)sigprocmask(SIG_UNBLOCK, &mask, NULL);

			nfds = select(MAXDESC, &rfdset, &wfdset, &efdset, timeout);
			if (nfds < 0) error = errno;

			/* block relevant signals */
			(void)sigprocmask(SIG_BLOCK, &mask, NULL);
			.....
		} while (nfds < 0 && error == EINTR);	/* spin on sigs */
	
		/* service I/O (or deal with nfds <= 0) */

		.......
	}
-- 
Jim Robinson
robinson@mdd.comm.mot.com
{ubc-cs!van-bc,uunet}!mdivax1!robinson
From: jfoster@mcl.ucsb.edu (Joe Foster of Borg)
Newsgroups: comp.unix.programmer
Subject: disk buffer size, portable record locking, cabbages, and kings
Summary: How to maximize portability and efficiency in block-oriented programs?
Keywords: disk buffers record locking
Date: 5 Nov 92 18:03:17 GMT

[This is a re-post. I can't figure out what happened to my
original post. Looks like the staff here have been monkeying with
news again. Aargh! :-(]

I'm currently working on a distributed database library which
supports variable-length records and BLOBs, for things like
images, sound samples, formatted text objects, etc. (Right now,
it's a quite serviceable persistent virtual array library!) I
want the thing to be as portable as possible, but the only
systems I current have access to are SCO Xenix/286 2.3.2,
Xenix/386 2.3.4, and some Sun/3's. I have the following
questions:

1) Where is the best place to look for the disk block size? Calls
to read() and write() seem to be faster when the size of the
buffers passed to them are the same as the blocks in the kernel
disk cache. Also, passing arbitrarily-sized buffers to reads and
writes to raw disk devices seems to bomb. Again, the buffers seem
to need to be the same size as the blocks in the disk cache.
What .h file is best to look at? Is the #define fairly standard?

2) What is the most portable way to do record locking? Currently,
I'm using fcntl(), since it's present on both the Suns and on
Xenix and supports both read and write-locks. Is this method
supported by NFS's lockd and/or other network file-sharing
schemes?

Thanks in advance for your help!

Joe Foster
jfoster@mcl.ucsb.edu
Newsgroups: comp.unix.programmer
From: mdw@theory.TC.Cornell.EDU (Matt Welsh)
Subject: Re: Creating a background process from within C prog
Organization: Cornell Theory Center
Date: Thu, 12 Nov 1992 06:06:21 GMT

In article <1992Nov12.020913.19659@leland.Stanford.EDU> dkeisen@leland.Stanford.EDU (Dave Eisen) writes:
>
>No no no.... Do the system in the parent. My point is that
>if you are going to do a "system", there is no reason to
>fork in the parent. The system statement above runs ls
>in the background without having to do any explicit forks.

Aha. Right you are, system() can handle the spawning quite nicely for you. :)
I thought you were referring to just replacing the system() inside of the
fork with the backgrounded one.

However I don't trust system(), something about running a shell for one
command bothers me, or maybe it's just that I like to know exactly what I'm
doing (picky parents pick execv(), or something like that).

mdw

Newsgroups: comp.unix.programmer
From: simtc@hp_mgs1.mentorg.com (Sim Thiam Chye)
Subject: RPC server did not return status
Date: Wed, 11 Nov 1992 09:52:53 GMT
Reply-To: thiam-chye_sim@mentorg.com
Organization: Mentor Graphics Corporation
Keywords: RPC
Followup-To: 


I wrote a simple RPC program which emulate Apollo's send_alarm on the Sun workstations and ported it to HP-UX. It works perfect on the Sun but the RPC server running on the HP710 doesn't seem to return any status after it finished it's job correctly. The client (both on Sun and HP) calling the server on HP will wait till timeout (value preset in the program) and exit.

The HP710 is  running HP-UX 9.0 . Do I have to tell the server explicitly
to send finish status to it's clients?

Any suggestions are appreciated.

-- 
*************************************************************************
*    _/_/_/_/  _/_/_/_/_/  _/_/_/_/    Sim Thiam Chye                   *
*   _/            _/      _/           Mentor Graphics (S) Pte Ltd      *
*  _/_/_/_/      _/      _/            Phone: 8709-265                  *
*       _/      _/      _/             Email: simtc@em-sg01.mentorg.com *
*_/_/_/_/      _/      _/_/_/_/                                         *
*************************************************************************
Newsgroups: comp.unix.programmer
From: jjamison@bellahs.com (John Jamison RD AC)
Subject: Modifying binary file
Organization: Bell Atlantic Healthcare Systems
Date: Wed, 11 Nov 1992 22:45:41 GMT

I'd like to be able to "patch" a binary image after it has been linked by ld.
What are some possible strategies for doing this? I'm envisioning patching the
image in order to subtitute a "version number" and "link date/time" into the 
image.

thanks in advance,

-- 
-----------------
John Jamison
Bell Atlantic Healthcare Systems
jjamison@bellahs.com
Newsgroups: comp.unix.programmer
From: champion@cch.coventry.ac.uk (Alun)
Subject: Re: How to execute unix commands from a c-program
Organization: Coventry University, Coventry, UK.
Date: Thu, 5 Nov 1992 11:49:49 GMT

In article <1992Nov4.163532.8801@cbfsb.cb.att.com> nll@cbnewsb.cb.att.com (neal.l.leitner) writes:
~From article <1992Nov4.153029.21837@cs.ruu.nl>, by hpverwei@cs.ruu.nl (Dick Verweij):
~> See subject,
~> 
~> -- 
~> DICK H.P. VERWEIJ
~> 
~> --------------------------------------------------------------------------------
~> D:-) I:-) C:-) K:-) email : hpverwei@cs.ruu.nl 
~main()
~{
~      .
~      .
~      .
~      system("ls -l");
~}
~
~or
~
~main()
~{
~      char mystring[10];
~      .
~      .
~      .
~      strcpy(mystring,"ls -l");
~      system(mystring);
~}

what about
main()
{
    execl("/bin/ls", "ls", "-l", 0);
}
    
I personally don't like the system call as it uses /bin/sh to run the program.
There also is a question about the security of system() with setuid programs.

    -Alun
  
-- 
A.Champion                |  That's an interesting point, in the sense of
(champion@uk.ac.cov.cck)  |    being very not interesting at all. - The Liar
From: root@rwsys.uucp (Superuser)
Newsgroups: comp.unix.programmer
Subject: Re: How to handle NULs in lex ...?
Date: 7 Nov 92 16:55:54 GMT
Organization: RWSYS Exporter BBS system

oscsf@godel.pgh.wec.com (Chuck Fuller) writes:
> I need to be able to make my lex application survive (indeed, point
> out!) the existence of NULs in the input file.  Despite much "R'ing of
> TFM", I am so far unable to get it to do anything other than stop
> immediately.
> 
> Your suggestions are appreciated.
> 
> Thanks.
> - Chuck
> 
> -- 
> Charles S. Fuller 
> Westinghouse Corporate Computer Services
> (W): oscsf@godel.pgh.wec.com                   Internet: fuller@wccs.psc.edu
> 

Suggestion:

There are differences among lexen for various platforms and I don't know
what yours uses, but you may need to rewrite the input() function. The
stock one probably will not return until there is a non-zero value in 
the input stream, it may even interprete a null as eof.

	Yours Truly,
	Randy Wright

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
root@rwsys.wimsey.bc.ca (Randy Wright)      | Exporter BBS     2400 bps
                or                          | (604) 581-0518     8N1
    Randy_Wright@Mindlink.bc.ca             | uucp         ogin: uguest
                                            | interactive login: guest
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Newsgroups: comp.unix.programmer,comp.unix.wizards
From: champion@cch.coventry.ac.uk (Alun)
Subject: Closing ends of pipe().
Organization: Coventry University, Coventry, UK.
Date: Thu, 12 Nov 1992 16:28:05 GMT

I have a program that loops x number of times. Forks of a child and uses pipe()
and dup2() to get the output of the child to the parent. My problem is
in the program I have to use the pipe() function 'x' times and then fdopen() the
read end 'x' times. I want to use the FILE* functionality.

What I would like to do is just be able to reopen the write end in the parent
or is there anyway other of getting the read end to return EOF when there
is still a write end open ?? So I can put the pipe() and fdopen() code
outside of the loop.

Cheers

    -Alun

-- 
A.Champion                |  That's an interesting point, in the sense of
(champion@uk.ac.cov.cck)  |    being very not interesting at all. - The Liar
Newsgroups: comp.unix.programmer,comp.mail.mh
From: champion@cch.coventry.ac.uk (Alun)
Subject: Re: setuid programs and calls...
Organization: Coventry University, Coventry, UK.
Date: Mon, 9 Nov 1992 10:19:59 GMT

In article <1992Nov9.031112.21835@spectrum.xerox.com> leisner.henr801c@xerox.com writes:
~Well, I think what I'm doing now works...
~
~	#include <stdio.h>
~
~	main()
~	{
~		int i;
~
~		if(0 != setruid(220)) {
~			perror("Can't set real uid");
~			exit(2);
~		}
~
~		/* this runs setuid on the destination mailfile account UID */
~		i = system("inc +zombi -file /net/zombi/files5/spool/mail/leisner -truncate");
~		system("id");
~		exit(i);
~	}
~
~I found I have to be setuid to root and change the real ID -- just changing
~the effective UID will let me read the remote mail file, but not truncate it.

I didn't see the beginning of this thread so I don't know exactly what
you are trying to do.
But doesn't system(arg) runs "sh -c arg" and therefore has some of the security
problems of a setuid shell script. You have not specified the full path to
"inc" so someone could write their own version of "inc" and as long as the
environment variable $PATH was configured properly it would run their version
of "inc" and not the intended on - same with "id". 
Even if you did specify the full path it would still be susceptible to attacks
with $IFS.

If security is not a problem ignore this article. :-}


    -Alun
    
-- 
A.Champion                |  That's an interesting point, in the sense of
(champion@uk.ac.cov.cck)  |    being very not interesting at all. - The Liar