HDTenEightyP/NetNews huggingface dataset:
From: mirchand@dendrite.cs.unc.edu (Jaideep Mirchandani)
Newsgroups: comp.unix.programmer,comp.unix.questions,comp.sys.sun.misc
Subject: dynamic link libraries on the sun
Keywords: sun,dll,libraries
Date: 12 Aug 92 18:19:58 GMT
Followup-To: poster

Greetings,
Has anyone implemented dynamic link libraries on the sun ? I am
using SUNOS 4.1.1.

I know about dlopen/dlsym/dlclose, but :
1. Isn't there an export file anywhere ? Hpw does the dll advertise the
symbols that it has ?

2. Which ld option is used ? The man page says something about -B. It also
mentions something about running ld twice, but is doesn't specify how
all this is done.

If you can even point to a source of info., it would be of help.

Thanks for reading this,
Jaideep
(mirchand@cs.unc.edu)

Xref: sparky comp.unix.programmer:4262 comp.unix.questions:10018
From: ejohnson@void.ncsa.uiuc.edu (Eric E. Johnson)
Newsgroups: comp.unix.programmer,comp.unix.questions
Subject: Sockets: Non Blocking I/O, How do I know when its done?
Date: 12 Aug 92 21:43:41 GMT
Organization: University of Illinois at Urbana

I've been working with sockets for a few months, and I've been
trying to do some non blocking sockets.  But, I don't know what to
"watch for" when the socket completes.

I turn the socket into a non blocking socket by the following command.

	fcntl(s,F_SETFL,FNDELAY);

When I use a 

	result = read(s,buffer,nbytes);

The errno is indeed set to EWOULDBLOCK, but *how* do I check to see
when the data is in, or when the call is completed?  I tried a while
loop wrapped around the read, and watched errno to see if it became 0,
or result returned >0, neither of which happened.

Is there function call to make that returns the status of socket in
non blocking mode?

Thanks

Eric
Newsgroups: comp.unix.programmer,comp.lang.c,comp.arch
From: Ross Ridge <ross@zooid.guild.org>
Subject: Re: What would you like in a debugger?
Organization: ZOOiD BBS
Date: Sat, 22 Aug 1992 19:52:13 GMT

ross@zooid.guild.org (Ross Ridge) writes:
>Perhaps people are already using their debuggers to trace problems
>efficiently.  Nah... since you can't do that, how could any one else?

bryan@sc.sni.ie writes:
>In my mind, running out of CPU quota when tracing a variable within dbx
>does not constitute efficiency.

You can't blame that on the debugger, it's the fault of a) letting
accountants get to close to your computer, and b) an OS and/or
hardware architecture that forces dbx to jump through loops to
trace a variable.  

>  Maybe we are operating on different interpretations of the word.

A more efficient debugger (in the original context) is one that lets me
find bugs faster.  For most bugs, I can find the problem the fastest
without any debugger.  For a lot of the rest, I find adb it about the
quickest tool.  For something really perplexing I'll use gdb.  But the
only time I've found a more advanced debugger useful (td386) is when I'm 
"reverse-engineering" binaries.

							Ross Ridge

-- 
Ross Ridge - The Great HTMU					     l/	 //
								    [OO][oo]
ross@zooid.guild.org						    /()\/()/
uunet.ca!zooid!ross						     db	 //
Xref: sparky comp.unix.programmer:4334 comp.unix.internals:1700
From: tasos@cs.bu.edu (Anastasios Kotsikonas)
Newsgroups: comp.unix.programmer,comp.unix.internals
Subject: I_SETSIG ioctl() flag
Date: 17 Aug 92 14:13:01 GMT
Followup-To: comp.unix.programmer
Organization: Computer Science Department, Boston University, Boston, MA, USA
Originator: tasos@cs

Hi,
does anyone have an example on how to use the I_SETSIG flag to ioctl()?

Thanks,

Tasos
-- 
--
Tasos Kotsikonas |   tasos@cs.bu.edu    | Work : Advanced Visual Systems
Ex BU Country	 |                      | email: tasos@avs.com
Club Member.	 |                      | Duties: none
Newsgroups: comp.unix.programmer,comp.unix.internals,comp.sys.hp
From: paul@actrix.gen.nz (Paul Gillingwater)
Subject: Re: inode to filename
Organization: Actrix Information Exchange
Date: Sat, 15 Aug 1992 20:58:16 GMT

I don't have an HP-UX system handy, but both Coherent and ISC Sys V.3 have a
command called ncheck(1m), which will tell you the names of files in a file
system based on its inode number.



	  NCHECK(1M)		       386/ix			 NCHECK(1M)



	  NAME
	       ncheck -	generate path names from i-numbers

	  SYNOPSIS
	       /etc/ncheck [ -i	i-numbers ]  [ -a ] [ -s ]  [ file-system ]

	  DESCRIPTION
	       The ncheck command with no arguments generates a	path name
	       vs. i-number list of all	files on a set of default file sys-
	       tems (see /etc/checklist).  Names of directory files are
	       followed	by /..

	       The options are as follows:

	       -i   limits the report to only those files whose	i-numbers
		    follow.

	       -a   allows printing of the names . and .., which are ordi-
		    narily suppressed.

	       -s   limits the report to special files and files with set-
		    user-ID mode.  This	option may be used to detect viola-
		    tions of security policy.

	       File system must	be specified by	the file system's special
	       file.

	       The report should be sorted so that it is more useful.

	  SEE ALSO
	       fsck(1M), sort(1).

	  DIAGNOSTICS
	       If the file system structure is not consistent, ?? denotes
	       the ``parent'' of a parentless file, and	a path name begin-
	       ning with ... denotes a loop.

-- 
Paul Gillingwater, paul@actrix.gen.nz
Xref: sparky comp.unix.programmer:4408 comp.unix.internals:1728
From: ravikm@austin.ibm.com (Ravi K Mandava)
Newsgroups: comp.unix.programmer,comp.unix.internals
Subject: Re: Sendmsg() on SunOS access rights
Date: 21 Aug 92 13:42:41 GMT
Reply-To: piobe!ravikm@ibmpa.awdpa.ibm.com
Organization: IBM Austin
Originator: ravikm@piobe.austin.ibm.com


In article <1992Aug21.043106.11945@ennews.eas.asu.edu>, trotter@enuxhb.eas.asu.edu (Russell Trotter) writes:
 > Hello,
 >    Have any of you guys experience a wierd side effect of sendmsg()
 > on SunOS 4.1.2 sending access rights (socket desciptors).  I have
 > a program that starts a non-blocking connect on a socket, then at
 > a later time pass this connected socket to another process (with the
 > sendmsg() call).  When I step through the sendmsg() call with dbx
 > the struct msghdr struct gets blown away (all fields get set to zero..
 > including the accrights fields) and doesn't return an error ??? Does the
 > state of the socket have anything to do with this side effect? Thanks
 > to anyone who can help.

 Recently I had to use sendmsg() to send an fd across two processes, and I had
 a similar problem on our system.  Later we found out that we had a buggy
 implementation of 4.3BSD type calls.  Then I changed to BSD4.4 type calls,
 where you'd have to initialize a struct cmsghdr and pass its address (stored
 next to cmsghdr is the fd) through msg_control field.  This worked liked a
 charm.  See which version (of BSD) your system supports, and if supported,
 use the new BSD4.4 format.

Hope this helps,
-- 
*******************************************************************************
Ravi K Mandava		email:	piobe!ravikm@ibmpa.awdpa.ibm.com
*******************************************************************************
Newsgroups: comp.unix.programmer,comp.unix.misc
From: obi@gumby.ocs.com (Kuryan "Obi" Thomas)
Subject: Re: Process & Signal Question
Reply-To: obi@gumby.ocs.com
Organization: Online Computer Systems, Inc.
Date: Tue, 18 Aug 1992 03:29:24 GMT

In article <1657227@bailey.UUCP>, bill@bailey.UUCP (Bill Glidden 882-8369)
writes:
> Make knows the executable is in use because when you fopen or open a file for
> create and it is in use, the operating system returns an error condition to
> the calling program. Of course, I don't recommend this for your situation.

A vague memory tells me that on System V machines, demand-paged
executables which are in use (being executed) can't be overwritten. If you
could, horrid things would happen to the running process when it tried to
demand page from the executable. I believe the errno you get if you try to
open such an executable image for writing is ETXTBSY (Text File busy).

Could someone confirm or deny this?
Newsgroups: comp.unix.programmer
From: beowulf@titan.ucc.umass.edu (Peter Munson)
Subject: Re: How can a program know where it was invoked?
Organization: University of Massachusetts, Amherst
Date: Thu, 13 Aug 1992 20:28:55 GMT

In article <1992Aug13.182509.10985@nic.umass.edu> beowulf@titan.ucc.umass.edu (Peter Munson) writes:
>In article <bmckeon.713727455@unix1.tcd.ie> bmckeon@unix1.tcd.ie (Brendan McKeon) writes:
>>In <1992Aug9.025101.8559@ccsun7.csie.nctu.edu.tw> cp78085@csie.nctu.edu.tw (Tan Koan-Sin) writes:
>>
>>>Hello,
>>>	I would like to know how does a program knows where it was invoked?
>>>	For example, 
>>
>>>		foo file1
>>
>>>	can foo detect where its binary execution file is?
>>
>>>	Thanks.
>>
>>>--
>>>Chin-Peng Choo
>>
[lots deleted]

  My answer was *much* too terse, I've been informed.  What I should have
said is that, since the command is usually on the user's $PATH, all you're
going to get from argv[0] is the executable's name, not a full path.
The only way out is to use which(1) or munge through the path yourself
looking for it.  Using which(1) is not a good idea, since it's expensive,
can be fooled by links, and is not extremely portable. 
  But it's not impossible, unless you need a guaranteed correct answer.
So, 'no' was the wrong answer.
 


-- 
Peter Munson                University Computing Services
Systems Programmer          University of Massachusetts
beowulf@titan.ucc.umass.edu 
--All opinions expressed are neither mine nor my employer's--
Newsgroups: comp.unix.programmer
From: morreale@niwot.scd.ucar.edu (Peter W. Morreale, SCD Consulting)
Subject: Converting inet names/addresses....
Keywords:  gethostbyname() , etc....
Organization: Scientific Computing Divison/NCAR Boulder, CO
Distribution: usa
Date: Mon, 17 Aug 1992 21:41:58 GMT


On a Sun, I need the ability to convert:

     foo.bar.edu

To it's inet number:

    128.???.??.??

(both are character strings....)

 Note that I need to do this independent of whether I'm on "foo" or not.
 (although in *all* cases, I (and "foo") are on the same sub-domain....) 

Yes, we are using a resolver and yes, I am very ignorant of network
programming.  I could parse /etc/hosts myself, but as we use the
resolver, /etc/hosts is sometimes out of sync....  (or is it required to
be in sync??)

I've found gethostbyname(3) which returns the proper host (and an
address in network byte order), and also inet_ntoa(3) (which converts a
struct in_addr to the proper form) but for the life of me I can't figger
out how to create a proper struct in_addr for inet_ntoa().  What I need
is a:

char *get_inet_a_addr_from_host_name(char *hostname) 

function.  Note again that the host I'm interested in is always a
remote host, not the local (is: current) host.

(I hope this is the proper place for this request...)
Thanks,
-PWM
--
------------------------------------------------------------------
Peter W. Morreale                  email:  morreale@ncar.ucar.edu
Nat'l Center for Atmos Research    voice:  (303) 497-1293
Scientific Computing Division
From: ravikm@austin.ibm.com (Ravi K Mandava)
Newsgroups: comp.unix.programmer
Subject: Re: Children and waitpid()'s
Date: 12 Aug 92 16:56:56 GMT
Reply-To: piobe!ravikm@ibmpa.awdpa.ibm.com
Organization: IBM Austin
Originator: ravikm@piobe.austin.ibm.com


In article <1992Aug12.034806.221488@zeus.calpoly.edu>, kwang@zeus.calpoly.edu (Kevin Wang aka The Scarecrow) writes:
 > exit value of the child.  My problem however is this:  the child exits
 > before the parent can do a waitpid() on it, and I cannot get the exit value.
 > 
 > So I guess my quesions are thus:
 > 1) under what circumstances does the child wait for the parent to ackowledge
 > it's death (via waitpid())?

	Child process becomes a zombie (defunct) process, and remains like that
	until either the parent does a wait()/waitpid() for it, or until the
	parent exits.  That is, even if the child process exits before the
	parent process calls waitpid(), the child process remains in defunct
	state until the parent reads its exit status.  This is *only* true,
	when the parent does not ignore the SIGCHLD (or SIGCLD) signal.
	However, if the parent ignores the SIGCHLD signal (see man pages on
	sigaction()), the child exits (and its process table entry is
	immediately cleaned up) without passing its exit status to the parent.
	That is, a wait() call by a parent would block until the child exits,
	but does not fetch child's exit status.  Instead, errno is set to
	ECHILD (no child processes).
		
 > 2) will a waitpid() on one process allow another to exit?

	No, unless the process id that is passed to it is not a positive
	integer.  Man pages on waitpid() discuss all the possible scenarios
	in this case.

 > 3) any better way to send messages to another program on another machine?
 > (no filesystem access, only sockets)

	Sockets or TLI are the best bet, I guess.

 > 4) is it possible for signal(SIGCHLD...) to affect it?

	I presume you mean, if signal(SIGCHLD...) affects the behaviour of
	a child being able to pass its exit status to the parent process.
	As I discussed before, only if sigaction()/signal() is used to ignore
	SIGCHLD, a child's exit status is not returned to its parent.

	However, one good suggestion is always to set up a signal handler
	for SIGCHLD, in which a wait() can be performed to fetch the exit
	status of a child and let it be purged from the system process table
	immediately.

 > I am running on (ick) AIX 1.2.1

	The above comments should generally apply to any standard Unix/AIX
	flavours.  But I could be wrong.  Would someone please correct me, if
	so?

Hope this helps,
-- 
*******************************************************************************
Ravi K Mandava		email:	piobe!ravikm@ibmpa.awdpa.ibm.com
*******************************************************************************
From: guy@Auspex.COM (Guy Harris)
Newsgroups: comp.unix.programmer
Subject: Re: How to create a shared object library (lib??.so.??)
Date: 15 Aug 92 17:31:48 GMT
Distribution: usa
Organization: Auspex Systems, Santa Clara

>  To create a static object library, one uses "cc -c ..." and
>"ar rcv lib.... *.o".  But how does one create a shared object
>library.  I tried using the same steps and then set LD_LIBRARY_PATH
>but system complains about lib??.so.?? being in incorrect format.

Yup.  Shared and non-shared libraries are different types of files.

To create a shared object file, one should use "cc -c -pic ..." and
"ld -o lib.so.Maj.Min *.o".

"-pic", in the "cc" line, causes "position-independent code" to be
generated.  That means that the library doesn't have to be relocated
when it's attached to the process, which is a Good Thing.

"Maj" and "Min", in the "ld" command line, are the major and minor
numbers you want for your shared library.  When you first create it, you
probably want a major version number of 1, and a minor version number of
0.  If you change the library so that programs linked with the old
version should work with the new version, but programs linked with the
new version may not work with the old version (for example, if you add a
new routine, or a new option to an old routine), bump the minor version
number; if you change the library such that programs linked with the old
version won't necessarily work with the new version (for example, if you
incompatibly change the calling sequence to a routine), bump the major
version number.
Newsgroups: comp.unix.programmer
From: dave@opus.csd.uwm.edu (Dave Rasmussen)
Subject: Re: Newuser program for a University
Originator: dave@opus.csd.uwm.edu
Reply-To: dave@opus.csd.uwm.edu
Organization: University of Wisconsin - Milwaukee
Date: Thu, 20 Aug 1992 17:47:00 GMT

From article <1992Aug19.004537.7635@mccc.edu>, by pjh@mccc.edu (Pete Holsberg):
> In article <1992Aug17.174805.1274@uwm.edu> bruno@cerberus.csd.uwm.edu writes:
> =From article <1992Aug17.174112.124@uwm.edu>, by murthy@ee.uwm.edu (Murthy Nyayapati):
> => I have been assigned 
> => to write a "newuser" program for these machines.  All the necessary security
> => checks should be done.  A "valid" student should be able to sit at a terminal
> => and "give" himself/herself an account.  We get a tape of all the list to students
> => who are registered.
> =
> =Well if you would check with the people next door, you would find that CSD
> =has been running a newuser program for several years.
> =Give Dave Rasmussen a call at x5133.
> 
> Perhaps one of you would share Dave Rasmussen's "newuser" program with
> the rest of us???

Perhaps someone could post something about some of the programs Evi Nemeth's
group at colorado state has done, acmaint (purdue?), moira (mit-athena), and
some other better designed and supported programs. Maybe the usenix sage
group would have a list of such packages.

Newsgroups: comp.unix.programmer
From: kent@ziggy (Kent Tse)
Subject: Estimation of "dump" times
Keywords: dump, estimate, time
Reply-To: kent@ziggy.cs.mcgill.ca (Kent Tse)
Organization: SOCS, McGill University, Montreal, Canada
Date: Tue, 18 Aug 1992 15:33:55 GMT

     Hello everyone,

          I'm working on a project that needs to know and estimate of
     the time and the space that a backup of a filesystem using the
     dump(8) command.  The dump command itself issues a estimate of
     how many tape blocds it will use, but I would like to know how
     long this will take in hours, minutes, ...  Any help will be
     appreciated.  Please e-mail me and if there is enough interest,
     I'll summarize.

     					- Kent
-- 
Kent Tse			E-Mail:  kent@cs.mcgill.ca
Jr. Systems Programmer		Montreal, Quebec, Canada
School of Computer Science	McGill University
(514) 398-6697			SOCS help line:  (514) 398-7087
Newsgroups: comp.unix.programmer
From: gram@aim1.aztec.co.za (Graham Wheeler)
Subject: STREAMS, getty and cu
Organization: Aztec Information Management
Date: Wed, 12 Aug 1992 12:37:44 GMT

Hi all

I have a question relating to archaic technology (namely SVR3), which has
no STREAMS autopush facility. If one needs to push a line discipline module
above a STREAMS device driver which has a getty attached, how does one do it?

I can think of two possibilities:

1) Use the Devconfig file. However (at least in SVR3.0), the only services
	that can be specified are uucico and cu, *not* getty. So one could
	use this for outgoing calls but probably not incoming. Or have things
	changed in SVR3.2? (I don't have SVR3.2 manuals, only SVR3.0 and SVR4).

2) Have a daemon process which opens the device, pushes the module, and sleeps.
	The assumption here is that when getty opens the device (the second
	open), it is still going to interface through the pushed module. Is
	this the case? If it is, this is probably the simplest solution.

Thanks in advance

Graham
-- 
Graham Wheeler                     | "That which is weak conquers the strong,
Software Systems Engineer/Student  | that which is soft conquers the hard."
Aztec Information Management/UCT   | 		Lao Tzu - Tao Te Ching Ch. 78
gram@aim1.aztec.co.za / gram@cs.uct.ac.za 
Newsgroups: comp.unix.programmer
From: cnanayak@nyx.cs.du.edu (Chevan Nanayakkara @ Nyx)
Subject: Monitoring the pagedaemon?
Summary: How does unix monitor for "chat" requests?
Organization: Nyx, Public Access Unix @ U. of Denver Math/CS dept.
Distribution: usa
Date: Thu, 13 Aug 92 17:02:46 GMT

Could someone please tell me how Unix monitor for "chat" requests from talk
or phone?  Is there a pagedaemon?  How would I monitor the pagedaemon or poll
the system to find out if a chat request has been sent?  A brief explanation 
or pointing me in the direction of some reference material would be most
helpful.  Thanks in advance.
--
---Tear Here Please
Chevan (Sleepy) Nanayakkara  -  csnanaya@cadehp0.eng.utah.edu - best
or chevan.nanayakkara@m.cc.utah.edu or cnanayak@nyx.cs.du.edu
Posting from NYX! - The *BEST* Public Access NEWS site in the Universe :-).
From: david@dlomas.dlomas.uucp (David Lomas)
Subject: Shell/Daemon to monitor files
Organization: Lomas Data Management Inc.
Distribution: na
Date: Tue, 18 Aug 92 01:38:05 GMT

Hi all:

I've got a small project I'm about to start that may pique your interest.
And I'd appreciate any hints, etc.

I'd like to write a background process (daemon) that monitors a small
group of directories. If a user who is not the owner of a file there,
reads that file ( not his own ), I'd like the owner and a designated admin
to get mail to that effect. If a user ( not owner ) copies a file out of
that directory, I'd like this daemon to change the perms on *that* file
to -rw-------, and change the owner to root, to prevent *any* subsequent
access, and mail the owner and the admin to that effect. When the file
is *replaced* , again mail to the user and the admin will be generated
to that effect. Oh, BTW, I'd also like the 'logname' of the person who
accesses, or copies files (other than owner) embedded in the mail.

I thought of writing a shell script that would be the only method of
reading, writing, mv'ing, etc. files in these directories, but that 
would make it tedious for users who expect their software to place their
files there when saved.

Specifically, this will be a CADD drawing-file manager.

Any great ideas? I will summarize to the net if sufficient interest is
shown.


-- 
David Lomas ( david@dlomas.UUCP ) voice(416)354-4938 fax(416)354-0902    
Lomas Data Management Inc.       |     "Good"    "Fast"    "Cheap"  |
Niagara Falls, Ontario Canada    |           Pick any two           |
#                                  stolen sig - I think it's good
-- 
David Lomas
From: bsullivn@sc.sni.ie (Bryan O'Sullivan)
Newsgroups: comp.unix.programmer
Subject: Re: awk question
Date: 17 Aug 92 10:13:20 GMT
Article-I.D.: sc.160
Reply-To: bryan@sc.sni.ie
Organization: Siemens-Nixdorf Software Development Centre, Dublin
X-Newsreader: Tin 1.1 PL3



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.

Try comp.unix.questions.

	-- Bryan

-- 
Bryan O'Sullivan                                             +353-1-767551 x225
Siemens-Nixdorf Informationssysteme AG                          bryan@sc.sni.ie
Software Development Centre                    "Theory like mist on eyeglasses.
Dublin                                          Obscure facts." -- Charlie Chan
Newsgroups: comp.unix.programmer,comp.unix.internals,comp.sys.hp
From: mleech@bnr.ca (Marcus Leech)
Subject: Re: inode to filename
Organization: Bell-Northern Research, Information Techology Division
Date: Wed, 12 Aug 1992 14:40:32 GMT

In article <1992Aug11.164753.13726@ssd.ukpoit.co.uk>, alan@ssd.ukpoit.co.uk (Alan Barclay) writes:
|> I don't see it as a weakness, if there was a one to one relationship
|> 
|>  [MS-DOS references delated].
|> I don't see the need to refer to a file from a inode number anyway,
|> the most common you can get a inode number is though stat or fstat,
|> and presumably you knew the filename in the past.
A common reason for wanting to do this is to determine what's going on in
  your system.  Which processes have which files open, etc.  This *is*
  useful, and UNIX has traditionally (and continues to be) weak in the areas
  of effective system management mechanisms.

The traditional argument for not storing such information in the kernel
  has been "too much space".  Memory is now quite cheap, and with clever
  data structures, you don't pay that much for keeping filename<--->process
  mappings around.  If, for example, you recognize that there is a very
  high degree of shared name space, you can take advantage of that fact to
  dramatically reduce the storage requirements.

In this *particular area*, VMS is better.

-- 
Marcus Leech, 4Y11             Bell-Northern Research  |opinions expressed
mleech@bnr.ca                  P.O. Box 3511, Stn. C   |are my own, and not
ml@ve3mdl.ampr.org             Ottawa, ON, CAN K1Y 4H7 |necessarily BNRs
Xref: sparky comp.unix.programmer:4317 comp.unix.misc:3237