HDTenEightyP/NetNews huggingface dataset:
From: singh@r-node.gts.org (Rajendra Singh)
Subject: Re: Unix Programming Question
Keywords: Unix
Organization: Public Access UNIX Information System
Date: Thu, 03 Sep 1992 02:29:23 GMT

In article <hawkeye.715300231@glia> hawkeye@glia.biostr.washington.edu (Ken Keys - TF Dude) writes:
>The error messages are printed on standard error, but you only redirected
>standard output.  Assuming your system() uses /bin/sh,
>
>      system("ls -l /path1/??/n???????.?? > /path2/upload.lst 2>&1")

How about:

       system("ls -l /path1/??/n???????.?? > /path2/upload.lst 2>/dev/null")
-- 
Raj (singh@r-node.gts.org)  If you wish to reply by E-Mail and your response
is greater than 100 lines (or 15K), then please send your response to:
                    tcomsing@chasm.scar.utoronto.ca
From: markmc@sierra.com (Mark McWiggins)
Newsgroups: comp.unix.programmer,comp.sys.hp.comp.sys.dec
Subject: Best malloc(3) replacement for huge sys w/many small objects?
Summary: slow
Date: 24 Aug 92 23:46:44 GMT
Organization: Sierra Geophysics Inc.,  Kirkland, Wa

We're building a large application that seems to have reached a threshold
in the use of dynamic memory. A routine that allocates 300 or so small
objects was running acceptably fast, but with changes to the program
started to bog down after the first 75 or so allocations.

I believe I've narrowed it down to the malloc() subsystem, but I'm not
positive about this ...

In any event, I'm going to begin my effort to tune the system by changing
out malloc(), because I'll have to find a malloc() replacement for the 
Decstation when we port the system there. Its man page contains this helpful 
caveat:

     Currently, the allocator is unsuitable for direct use in a large virtual
     environment where many small blocks are kept, since it keeps all allo-
     cated and freed blocks on a circular list.  Just before more memory is
     allocated, all allocated and freed blocks are referenced.

I see several versions of malloc in the UUNET archive, and I believe Knuth
had this problem nailed down. Do you have a recommendation for this situation?

Thanks in advance.
--
Mark McWiggins           +1 206 822 5200x377 days      Box 31356
markmc@sierra.com        +1 206 632 1905 24 hrs.       Seattle WA 98103-1356
From: mccalld@vax.sonoma.edu
Newsgroups: comp.unix.programmer
Subject: script file to executable binary?
Date: 31 Aug 92 21:42:52 GMT
Organization: Sonoma State University

Greetings:
   I was wondering if anyone has come across a utility which turns
UNIX script files into executable binaries???  There was one for
MS-DOS as I recall, BAT2COM.EXE, which worked quite well.........
just a quiry
mccalld@sonoma.edu
From: jon@bpa22.sbi.com (Jon Russell @ Salomon Brothers Inc., NY )
Newsgroups: comp.unix.programmer
Subject: sigpipe from socket write ( or lack of it)
Date: 27 Aug 92 23:20:13 GMT

Why would not receive a SIGPIPE writing to a connected socket 
closed by the receiver.

The first write succeeds subsequent ones fail.

The application is sun rpc based, however I duplicated the behavior
in a straight socket based app. How can I handle the first write as an]
error ?

Thanks in advance.




-- 
Jonathan Russell            Bond Portfolio Analysis     212-783-7852
Salomon Brothers Inc        37th Floor                  jon@bpa10.sbi.com
New York NY 10048           Seven World Trade Center    uunet!sbi.com!bpa10!jon
Newsgroups: comp.unix.programmer
From: axk7110@usl.edu (Khanna Alok)
Subject: Implementation of Distributed Databases in SUN RPC ....
Organization: University of Southwestern Louisiana
Date: Sun, 30 Aug 1992 00:04:43 GMT

Dear Netters,

I am working on implementation of a small model of distributed database. 
The database can reside on different location but for a user it
should be transparent.

I am planning to use SUN RPC for communication between
different clients and servers. 

Has any one has implemented this type of project before? If yes, I would 
like to discuss with you some of design details.

If lot of people are interested in this type of work, I can summarise later
on the reponses I will receive.

I will appreciate the reponses by email (alok@usl.edu) if it is not 
inconvenient.

Thanks a lot in advance.

Alok Khanna.
email: alok@usl.edu
Newsgroups: comp.unix.programmer
Subject: ATT System V Programmer Guide
From: lcsim@cstp.umkc.edu (Lin-Chow Sim)
Date: Mon, 31 Aug 1992 14:11:24 GMT
Organization: Univ. of Missouri - Kansas City

****************
Books for Sale
****************

1.  AT&T Unix System V Programmer's Guide (Prentice Hall) - Brand NEW!  $ 25.00

  Price includes book rate shipping via USPS.  If interested, please
email.
    
-- 

+=============================================================================+
|                                  | Internet : <LCSim@vax2.cstp.umkc.edu>    |
|  Lin-Chow Sim                    |                                          |
|  Graduate Student                | BitNet   : <LCSim@UMKCVAX2>              |
|  Comp.Science/Telecomm. Program  |                                          |
|  University of Missouri          | Heartland: <lcsim@heartland.bradley.edu> |
|  Kansas City, Missouri           |                                          |
|  United States of America        |                                 	      |
|                                  |                                          |
+=============================================================================+
-- 

+=============================================================================+
|                                  | Internet : <LCSim@vax2.cstp.umkc.edu>    |
|  Lin-Chow Sim                    |                                          |
|  Graduate Student                | BitNet   : <LCSim@UMKCVAX2>              |
|  Comp.Science/Telecomm. Program  |                                          |
|  University of Missouri          | Heartland: <lcsim@heartland.bradley.edu> |
|  Kansas City, Missouri           |                                          |
|  United States of America        |                                 	      |
|                                  |                                          |
+=============================================================================+
Newsgroups: comp.unix.programmer
From: cse108@cse.unl.edu (Brian Wood)
Subject: VT100 screen codes needed
Summary: Need the codes form doing simple graphics
Keywords: VT100 graphics
Organization: University of Nebraska - Lincoln
Distribution: global
Date: Thu, 27 Aug 1992 09:33:11 GMT

The following is a post for a friend:
 
 
Hi, I was wondering if anyone knew of a reference for the VT100.  I need to
write a program that effectively does a histogram, but I don't know where to
look for the codes.  I've seen some examples of the graphics, and I think
that they'll work for what I need to do.
 
BTW this isn't homework, it's for a program I'm writing to find the transfer
function of a quasar through a numerical convolution, and would like a
rough idea of what all the numbers that spew out look like when graphed..
 
 
If there's a book or reference in the manuals (I haven't looked too hard yet)
I would appreciate the title or section name.

I plan to use cc or gcc to run the program.  Are there any special librarys
or function that might help?
 
 
                                        Thanks,
 
                                        Joe Centenni

Newsgroups: comp.unix.programmer
From: mark@homebase.vistachrome.com (Mark Alexander)
Subject: help with rpc
Organization: Vista-Chrome Incorporated
X-Newsreader: Tin 1.1 PL4
Date: Wed, 2 Sep 1992 15:00:36 GMT

Pardon my ignorance please, but could you or anyone offer
me a small bit of assistance?  

If I were to write a program using RPCs, could I write a
client program that would cooperate with an ftp server
process on a remote machine? 

Your help is appreciated greatly.  If you know of any 
books or other resources that might help me in this
venture, please tell me.
-- 

-----------------------------------------------------------------------
      Mark Alexander      alexand@nu.cs.fsu.edu    mark@vistachrome.com
                          Florida State Univ.      Vista-Chrome, Inc.
                          Tallahassee, FL          Tallahassee, FL 
-----------------------------------------------------------------------
Newsgroups: comp.unix.programmer
From: epeterso@encore.com (Eric Peterson)
Subject: Re: getservbyname(), getprotobyname(), gethostbyname()
Reply-To: epeterson@encore.com (Eric Peterson)
Organization: Encore Computer Corp, Umax Development
Date: Wed, 2 Sep 1992 19:29:47 GMT
News-Software: NN 6.4.16

berg@physik.tu-muenchen.de (Stephen R. van den Berg) writes:

| Now, in order to that, I have to find out the following:
| 
| 	1. gethostbyname("localhost.or.something.else")
| 	2. getservbyname("biff")
| 	3. getprotobyname("udp")
| 
| Well, so far so good, the only trouble is, these calls are done every time
| when mail arrives.  I was wondering, what is common practice in this case?
| 
| 	a. Go by the book and make all three calls at runtime?
| 	b. Do 1. and 2. at runtime, 3. at compile time?
| 	c. Do 1. at runtime, 2. and 3. at compile time?
| 	d. Do all three at compile time?  (By compile-time I mean: compile
| 	   a separate program that makes these calls, and then use the output
| 	   from this program to hardcode the number(s) in the real program).
| 	   
| I personally like a., but I might suspect some performance penalty here
| (depending on the configuration every one of these calls causes several files
| to be opened and miscellaneous network-traffic to be generated).

I would consider *ONLY* (a) to be acceptable practice.  These functions
are system database query functions, and the intent of making them
functions and not, say, header file definitions was to sever the dependency
between the code and the data (ie, you wouldn't have to rebuild if you
decided to change the UDP protocol number).

Having said that, you could probably safely get away with hard-coding
these numbers into your code if you wanted to (except for the
gethostbyname() call) since they are so common that they probably
won't change.

Eric
From: dtb@otto.bf.rmit.oz.au (David Bath)
Newsgroups: comp.unix.programmer
Subject: Re: sccs: how to include rev. history?
Date: 27 Aug 92 00:43:20 GMT
Organization: RMIT Computer Centre, Melbourne Australia.

Use RCS (available from your local archive site with gnu//mit stuff
or in comp.sources.unix).

Gives you symbolic revision level names as well
e.g. the "Fred" version for all files (different rev each file)

Written after SCCS and in many people's mind MUCH better

Heaps easier to get started with

Reports are easier to run and able to be understood by suits

Regards....

========================================================================
David T. Bath
email: 	dtb@otto.bf.rmit.oz.au
Work: 	Global Technology Corporation, Carlton, Vic, OZ  (03) 3477511
=======================================================================
Xref: sparky comp.unix.programmer:4458 comp.unix.wizards:3701
From: ravikm@austin.ibm.com (Ravi K Mandava)
Newsgroups: comp.unix.programmer,comp.unix.wizards
Subject: Re: detecting process death from unrelated process
Date: 26 Aug 92 19:46:12 GMT
Reply-To: piobe!ravikm@ibmpa.awdpa.ibm.com
Organization: IBM Austin
Originator: ravikm@piobe.austin.ibm.com


In article <1992Aug25.225021.22386@atlastele.com>, gerald@atlastele.com (Gerald Aden) writes:
> Is there a way for process A to detect that process B has exited where
> process A has the pid of process B but is not the parent of process B?

	To find out if a process is alive or not, use kill(pid_t procid, int
	signal) call with 0 signal.  If the call returns -1 and errno is set
	to ESRCH, then the process is not alive.  Else, it is alive.

Hope this helps,
-- 
*******************************************************************************
Ravi K Mandava		email:	piobe!ravikm@ibmpa.awdpa.ibm.com
*******************************************************************************
Newsgroups: comp.unix.programmer
From: eoshaugh@nmsu.edu (Erik Oshaughnessy)
Subject: Wanted: client/server socket examples
Organization: NMSU Computer Science
Distribution: comp.unix.programmer
Date: Wed, 2 Sep 1992 20:53:45 GMT


I'm just learning how to use sockets, and I am looking for examples
of how to implement a client/server application using sockets.  Any
pointers to code and/or discussions of socket use will be appreciated.

I will summerize if the need becomes apparent :)

Thanks,
--
Erik O'Shaughnessy  
(eoshaugh@nmsu.edu)

Newsgroups: comp.unix.programmer
From: peter@ferranti.com (peter da silva)
Subject: Re: Sco Xenix or Unix - which to program for?
Organization: Xenix Support, FICC
Date: Tue, 25 Aug 1992 17:56:08 GMT

In article <1992Aug24.202843.5696@primerd.prime.com> jtb@hacker.Prime.COM writes:
> 3) What is the difference between the two?  Is SCO Unix a replacement 
>   for SCO Xenix?

SCO Unix is, as far as programming goes, a superset of SCO Xenix. That is,
a SCO Xenix program will run on SCO UNIX, but not vice-versa.

> 4) Is there a way to make the code portable for both SCO products? For
>    other Un*xes?

Code for *early* SCO Xenix. Up until SVR3.2 at least 386 UNIX included support
for Xenix executables (even 286 ones!). I believe V.4 for the 386 does, too.
-- 
Peter da Silva                                               `-_-'
$ EDIT/TECO LOVE                                              'U` 
%TECO-W-OLDJOKE Not war?                        Have you hugged your wolf today?
Ferranti Intl. Ctls. Corp.      Sugar Land, TX  77487-5012       +1 713 274 5180
Newsgroups: comp.unix.programmer
From: haseka@aix.rpi.edu (Atilla A Hasekioglu)
Subject: multimedia
Organization: Rensselaer Polytechnic Institute, Troy NY
Date: Tue, 1 Sep 1992 17:59:50 GMT

Newsgroups: comp.windows.x.apps
Subject: multimedia
Summary: 
Followup-To: 
Distribution: world
Organization: Rensselaer Polytechnic Institute, Troy NY
Keywords: 

I am looking for a multimedia software that compresses images and has mailing 
options. This should be in Xwindows. I have images in many formats.
I would like to be able to change their formats and have printouts. I also
would like to be able to view them. The software I am looking for should
have all these options. I also would like to have the option to decompress and
view the image from where it is sent by mail, so this will be a two sided
software that can be used both by the sender and receiver  side.
  If anybody can help me,I will very much appreciate it.
Newsgroups: comp.unix.programmer,comp.unix.wizards
From: bad@flatlin.ka.sub.org (Christoph Badura)
Subject: Re: STREAMS M_ERROR Message problem
Organization: Guru Systems/Funware Department
Date: Fri, 28 Aug 1992 09:53:37 GMT

In <1992Aug26.130739.19300@usenet.ins.cwru.edu> am815@cleveland.Freenet.Edu (Joel Peter Anderson) writes:
>The result is the next read or write returns with a -1 and errno is
>set to 256 - status_code.  The PROBLEM is that the only way to
>clear the error condition is to close the device.  Typically, the
>error does not warrent a close.

The *ONLY* way to clear the error condition caused by a M_ERROR
message is to close the stream. It's documented that way.
-- 
				Christoph Badura  ---  bad@flatlin.ka.sub.org

ISO? Nicht immer, aber immer M-vfter.
From: markp@adsi.homecare.com (Mark Parr)
Newsgroups: comp.unix.programmer
Subject: Getting the IP address of a 'rlogin'ed user
Date: 28 Aug 92 15:05:07 GMT
Organization: Application Data Systems, Inc.


I'm looking for a function that when called will return the IP address the 
machine from which a user is 'rlogin'ed.

For example, if a 'who' shows the following:

     billp       tty5        Aug 28 07:55                          
     brucec      tty6        Aug 28 08:44                          
     jdoe        pts/0       Aug 28 09:53          (adsi)          
     bob         pts/1       Aug 28 09:53          (ibm)           
     smith       pts/2       Aug 28 09:53          (ibm)           

I would assume the function would work along the lines of

      function(user, tty)

Example:
     
      getip("smith", "pts/2") -> returns 89.0.0.1

where 89.0.0.1 is the IP address of ibm.

Does this function (or something similar) exists?

Please respond directly to me as I'll be out of town for a week and I
do not want to miss a response.

Thanks, 
Mark


-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 | |-------------|  Application Data Systems     |  Phone: (601) 393-2046  | |
 | |  Mark Parr  |  1930-B 1st Commercial Dr. N  |    Fax: (601) 393-6605  | |
 | |-------------|  Southaven, MS 38671          | markp@adsi.homecare.com | |
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Newsgroups: comp.unix.programmer
From: tomg@code3 (Tom Green)
Subject: curses mouse
Organization: 3M Health Information Systems
Date: Mon, 31 Aug 1992 14:25:09 GMT

I have noticed in a couple of *nix's that there is support for a curses
based mouse.  I, however can't find documentation on how to make my rodent
work.  I would appreciate someone directing me to some documentation, or
that knows how to do this that could give me some pointers.  If there are
requests I will summarize.


-- 
Tom Green
- Life's a pain, then you die.                            _/_ __ ____ __
  "I shall be merciful and quick" - the Gorn              /  /_// / //_/
tomg@code3.code3.com                                                 _/
Newsgroups: comp.unix.programmer
From: rice@rab.enet.dec.com ()
Subject: example xcoff access code
Reply-To: rice@rab.enet.dec.com ()
Organization: Digital Equipment Corporation
Date: Wed, 2 Sep 1992 15:11:58 GMT


I need to do some symbol table searching under AIX/RS6000.  Does anyone
have (or know where) I can get some example code, say nlist source?

Thanks,
-Tim
rice@via.enet.dec.com
Newsgroups: comp.unix.programmer
From: bradav@auto-trol.com (Brad Davidson)
Subject: Looking for Dynamic Memory Debugging Aids
Originator: bradav@bradav
Keywords: Apollo/Domain, DEC/Ultrix
Organization: Auto-trol Technology Corporation
Date: Wed, 2 Sep 1992 17:35:53 GMT

I am in search of any tools that would help debug dynamic memory problems
on Apollo/Domain or DEC/Ultrix.

The system in trouble works fine on Sun/OS but has problems on the
other platforms.  We have Centerline and purify for the Sun/OS but
these don't appear to exist for Apollo and DEC so are there any
other tools that we could use.  Porting is an option if you know of
ftp sites for a good debugging malloc.

Brad Davidson

Send email, thanks

Newsgroups: comp.unix.programmer
From: hoang1@litwin.com (Dave Jackson)
Subject: ioctl request SIOCGARP fail in SCO (ARP protocol)
Organization: Litwin Process Automation
Date: Fri, 28 Aug 1992 14:55:31 GMT

Hi,
I'm writing a program to read the ARP cache.
But I have the problem when using SIOCGARP in SCO/ODT ver 2.0:
  
  .
  .
  .
  int soc;
  struct arpreq ar;
  .
  .
  .
  /*
  **  Execute the IOCTL to read the ARP cache, if the host is not
  **  currently in the cache, this ioctl will fail.
  */
  if ((i = ioctl( soc, SIOCGARP, &ar )) != 0)

  It's always failed and return:
    errno == ENXIO
    ioctl: No such device or address

But if I test in DEC5000/200 Ultrix 4.2 or SUN/sparc OS 4.1.1 is ok.

Do I miss anything in SCO env.

I will post or mail my source code if you request.

Thanks in advance,

Ted Hoang
Litwin Process Automation
Email:hoang1@dynsim1.litwin.com
From: cop3409@dcsc.dla.mil (Joseph NMN Delmedico)
Newsgroups: comp.unix.programmer
Subject: Unix programming question
Keywords: Unix
Date: 3 Sep 92 13:15:26 GMT
Organization: Defense Construction Supply Center, Columbus

Re: Programming question about unwanted mail from command

 system("ls -l /path1/??/n???????.?? > /path2/upload.lst")

    Many thanks to the following for their kind help and expertise:

    David B. Chorlian
    John (Francis) Stracke
    King Ables
    Matt Day
    Jim Davis
    Dave Eisen
    Mike Stefanik
    Dan Busarow
    Ken Keys (Master of the Fugue? Have you written many?)

    Sincerely,
    Joseph N. Del Medico
    (cop3409@dcsc.dla.mil)
Newsgroups: comp.unix.programmer,comp.unix.xenix.sco
From: davidf@golem.uucp (David J. Fiander)
Subject: Re: Calling longjmp() from signal handler: portable?
Date: Thu, 27 Aug 1992 00:13:55 GMT

According to chip@tct.com (Chip Salzenberg):
>Is Ron right that longjmp() always works from signal handlers?  Or am
>I correct that, for example, SCO Xenix sets up a separate stack frame
>for signal handlers, so longjmp() won't work correctly?
>

No, he's not.  The problem may be because of a different stack,
but for more systems, it is the fact that while in the signal
handler the given signal is blocked, so it must be unblocked
before you can longjump out.

POSIX dictates that the correct way to longjmp out of a signal
handler is to call sigsetjmp() to set up the environment and
siglongjmp() to return to the environment.

- David
Newsgroups: comp.unix.programmer
From: roger@wrs.com (Roger Rohrbach)
Subject: Re: awk question
Organization: Wind River Systems, Inc.
Date: Sat, 29 Aug 1992 02:51:21 GMT

chaiklin@cunixf.cc.columbia.edu (Seth Chaiklin) writes:

>: Where should I post an awk question?  I am trying to
>: understand how to work with a 2-dimensional matrix, and
>: can't seem to find the appropriate newsgroup.


    comp.unix.shell is devoted not only to shell programming constructs,
but the use of the myriad tools you glue together to do things in the
shell, e.g., awk, sed, etc.
-- 
Roger Rohrbach                                  sun!wrs!roger    roger@wrs.com
- Eddie sez: ----------------------------------------------- (c) 1986, 1992 -.
|   {o >o                                                                     |
|    \<>) "My favorite sounds are 8 seconds long!"                            |
Xref: sparky comp.unix.programmer:4463 comp.unix.questions:10424
From: dtb@otto.bf.rmit.oz.au (David Bath)
Newsgroups: comp.unix.programmer,comp.unix.questions
Subject: Re: Problem reading from pipe ("|") using read()
Date: 27 Aug 92 00:37:03 GMT
Organization: RMIT Computer Centre, Melbourne Australia.

stsshol@st.unocal.COM (Herb Lam) writes:


>First of all, my program reads input from standard in and writes to 
>standard out.  I had used fread() and fwrite() to do I/O, but because I
>needed to do some ioctls, it was suggested that I use read() and 
>write() instead.  I did not have any problems until I changed all my
>file pointers to file descriptors, fopen()/fclose() to open()/close(),
>and fread()/fwrite() to read()/write().

>My problem is this.  When I run the program by itself, e.g.:

>	run < input > output

>Everything is fine.  However, if I get the input from the pipe:

>	"some program" < input | run > output

>The input to the "run" program gets messed up.  I don't get any system

>Any suggestions to solving this?

What about using popen()/pclose() then treat it like a file handle.
I had a similar problem when debugging programs (written by someone else)
that lost 1E5 records of 2E6 output a pipe.

General rule: If there is a section 3, use it, not the section 2
Regards

========================================================================
David T. Bath
email: 	dtb@otto.bf.rmit.oz.au
Work: 	Global Technology Corporation, Carlton, Vic, OZ  (03) 3477511
=======================================================================
Newsgroups: comp.unix.programmer
From: tomg@code3 (Tom Green)
Subject: curses mouse
Organization: 3M Health Information Systems
Date: Fri, 28 Aug 1992 17:44:02 GMT

I have noticed in the curses header files for a couple of *nix's that there
is support for mouse control.  I, however, can't find documentation on how
to use the functions to set up and make use of my rodent.  If anyone knows
how to do this or can point me to some good documentation  I would appreciate
it.  Please e-mail and if there are requests I will summarize.


-- 
Tom Green
- Life's a pain, then you die.                            _/_ __ ____ __
  "I shall be merciful and quick" - the Gorn              /  /_// / //_/
tomg@code3.code3.com                                                 _/