HDTenEightyP/NetNews huggingface dataset:
From: tep@engr.uark.edu (Tim Peoples)
Subject: Re: How To Get A List of Processes
Reply-To: tep@engr.uark.edu
Organization: University of Arkansas
Organiztion: University of Arkansas, Dept. of Computer Systems Engineering
Distribution: usa
Date: Thu, 10 Sep 1992 03:17:42 GMT

rande@rtsg.mot.com (Kristian V. Rande) writes:

>I'm trying to get a list of active processes from within some C code running
>on a Sun 3/60.  So far I've been having a lot of trouble, though, and I'm
>hoping that somebody can give me some help.
>
>I believe I need to use the kernel library routines kvm_open(),
>kvm_nextproc(), and kvm_close() to obtain structures of the type defined in
>the header file <proc.h>.  Unfortunately I get
>
>    "cannot open /dev/mem: Permission denied" or
>
>    "cannot open /dev/kmem:  Permission denied"
>
>errors whenever I run my code.  I think this is because I have no access to
>these special files.  An "ls -lgF" on these two files yields:
>
>   crw-r-----  1 root     kmem       3,   1 Jul 10  1990 /dev/kmem
>   crw-r-----  1 root     kmem       3,   0 Aug 10  1990 /dev/mem
>
>I don't have root access, nor do I have kmem group access.
>
>Here's the test code fragment that makes the calls:
>
>   if ( ( kd = kvm_open( NULL, NULL, NULL, O_RDONLY, "test" ) ) != NULL )
>   {
>      info = kvm_nextproc( kd );
>      printf( "pid = %d  uid = %d\n", info->p_pid, info->p_uid );
>      kvm_close( kd );
>   }
>
>
>My questions are:
>
>   1. Is there any way I can legitimately get around the mode restrictions
>      on "/dev/kmem" so that I can use kvm_nextproc()?
>

No.

>
>   2. Is there another way that I can get information about all of the
>      other active processes in the kernel?
>

No.

>
>Thanks for any help you can give me.
>

   The only "legitimate" way to do this is to have your binary 
sgid kmem.  And I guess the only way you can do that is with
root access.  I'm sure that if you explain to your SysAdmin
what it is that you're doing that he will set it for you.
If you have a lot of debugging to do and you have to re-compile
a lot, then he might not like you very much.  You see, every time
you re-write the file you loose the sgid.  Good luck.

>  ----------------------------------------------------------------------
>  Kris V. Rande                                "My opinions are my own."
>  Motorola Radio Telephone Systems Group
>  Arlington Heights, Illinois                         rande@rtsg.mot.com
>
-- 

+--------------------------------------+-------------------------------------+
| Tim Peoples                          | The time has come the hacker said   |
| tep@engr.uark.edu                    | to talk of many things,             |
| Dept. of Computer Systems Engineering| of simms and sockets and semaphores |
| University of Arkansas, Fayetteville | of processes and pings....          |
+--------------------------------------+-------------------------------------+
|    I need no disclaimer; nobody listens to what I have to say anyway!!     |
+----------------------------------------------------------------------------+

Newsgroups: comp.unix.programmer,ca.unix,comp.unix.questions,netcom.general
From: mcentral@netcom.com (Media Central)
Subject: want something similar to getchar() !!!
Date: Thu, 10 Sep 92 22:27:55 GMT
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Followup-To: poster
Distribution: ca
Keywords: getchar keyboard input

My apologies if you find this in the wrong group.

I got a very simple problem. I want to sense if the user has pressed some
designated keys and if so take some appropriate actions else continue
with the default process. In other words i want something similar to 
getchar() without halting permanently for the user input.

many many thanks in advance,
shahid ahmed
Newsgroups: comp.unix.programmer
From: jtb@hacker.Prime.COM ( James Bruner )
Subject: Checking if a process is still logged in
Followup-To: comp.unix.programmer
Keywords: pid
Reply-To: jtb@hacker.Prime.COM
Organization: Prime Computer, Renton, WA
Date: Tue, 15 Sep 1992 23:04:13 GMT

What I'm trying to do is to check and see if a process is logged in
or not.  The process is not a child but I do know its pid.  Currently
I've been using a system(3) call with ps piped to grep which is piped to
a file.  I then open file and check for the pid I'm looking for.  I've
also setup signals and ipc on the processes in question.  I can then check
by sending the process a sigusr2 or something and wait for him to send
me a ipc message back.
what I'm trying to find out, being new to the game, is are there better
ways on doing what I'm doing.  How have other people needing to do
this jumped this hurdle. 

Thanks for any input you can give me!

-- 
===================================================================
                            *
 James Bruner               | Internet: J.Bruner@CS-REN.Prime.COM
 Technical Support          |           or jtb@hacker.Prime.COM
 Computervision, Renton, WA |    Phone: (206) 251-0879
                            *
===================================================================
From: kudva@ecn.purdue.edu (Gautham K. Kudva)
Newsgroups: comp.unix.programmer
Subject: SIGALRM handlers and sleep
Date: 14 Sep 92 20:33:55 GMT
Distribution: usa
Organization: Purdue University Engineering Computer Network


I'm trying to write a program that needs to interlace computations with
communications. The platform is a Sun SPARC IPC running SunOS 4.1, though
I'd like to keep the code as portable as possible. Previously I was using
Sun's lwp package, but a bug in their code put paid to those plans. Now
I'm trying to use signals. I'm installing a handler for SIGALRM and set
alarms at uniform intervals. Compuatations go on as usual. Whenever the
SIGALRM handler is called, it executes the communication code. Things 
work out ok till I use a sleep() call. The call uses its own signal
handler, and things get screwy. Rochkind does not mention anything about
this. Richard Stevens' "UNIX Network Programming" says that sleep can 
interact with a process' own SIGALRM handlers; but no details are given. 
I haven't found anything on these lines in the man pages either. So is there 
any way in which my signal handler can peacefully co-exist with sleep()?
Or do I need to replace all sleep calls (using defines or something)
with my custom sleep function which handles alarms right? I don't like
the latter option, since I could be using pre-compiled code that contains
calls to sleep. References to any book that addresses this issue would
also be great. 

Thanks in advance,
Gautham Kudva
kudva@ecn.purdue.edu
Newsgroups: comp.unix.programmer
From: bobb@netcom.com (Bob Beaulieu)
Subject: Re: HELP!!! How do I get rid of .tar
Date: Sun, 13 Sep 92 21:24:35 GMT
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Summary: Easiest way to get "rid" of a .tar

In article <1992Sep12.174106.59402@ns1.cc.lehigh.edu>, mas4@ns1.cc.lehigh.edu (MICHAEL ANTHONY STRAUSS) writes:
> I cant extarct the files out of a filoe called xtank1.3e.tar
> 
> Can anyone out there help me.
> 
>         -Strauss
>          -mas4@Lehigh.edu


Subject say:   How can I get rid of a .tar
                         ^^^^^^^


rm xtank1.3e.tar


Comments say:  I can't exract the files out of a file called xtank1.3e.tar


tar xvf ./xtank1.3e.tar


Bob Beaulieu
bobb@netcom.com
-- 

 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Bob Beaulieu  San Jose, CA   bobb@netcom.com  (408)723-0556 |
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: kanagn@athina.cc.uch.gr (Kostas Anagnostakis)
Newsgroups: comp.unix.programmer
Subject: logging stdin/stdout/stderr
Date: 8 Sep 92 13:47:21 GMT
Organization: Computer Science Department, University of Crete HELLAS
X-Newsreader: Tin 1.1 PL3

Hi..     

Is there a way to log stdin/stdout/stderr to a file (like a programm called
'script' on Unix). Are there any sources available ?

Thanks in advance,
Kostas
From: zzang@stat.ufl.edu (Zhuo Zang)
Newsgroups: comp.unix.programmer
Subject: What is Beta-test?
Date: 13 Sep 92 14:41:25 GMT
Distribution: usa
Organization: University of Florida
Originator: zzang@manta

Hello,
I often see some software in their release notes
say that this is Beta-test version.
What is this Beta-test?
what kind of features it has?
Is it available to the public for testing the program?

Thanks in advance!

-- 
Zhuo Zang[~{j0WA~}]
Department of Statistics
University of Florida            Email: zzang@stat.ufl.edu
From: tonya@casbah.acns.nwu.edu (Tonya Hill)
Newsgroups: comp.unix.programmer
Subject: PUBLIC DOMAIN RCS INFO. WANTED!
Date: 8 Sep 92 15:04:32 GMT
Article-I.D.: news.1992Sep8.150432.21473
Organization: Northwestern University, Evanston Illinois.

In an effort to provide order to our programming staff, I am seeking
BIASED opinions on your favorite Public Domain RCS programs. Please
include an ftp site with your appraisal.

If enough responses are obtained I will post the results.

Thanx in advance.
tonya@casbah.acns.nwu.edu
Newsgroups: comp.unix.programmer
Subject: Re: FIFOs vs. Stdio
From: ecmtwhk@ccu1.aukuni.ac.nz (Thomas Koenig)
Date: Sun, 6 Sep 1992 01:26:35 GMT
Organization: University of Auckland, New Zealand.

sinclair@dcs.glasgow.ac.uk (Duncan Sinclair) writes:

>Is it reasonable to fopen a fifo with mode "a", and expect it to work?
[...]
>Anyhow, FYI, SunOs 4.1.1 doesn't allow it, because stdio gets
>an illegal seek as it tries to lseek to the end of the pipe.

Same problem with IRIX 4.0.5, a SVR3 deviate. The strange thing is that
fdopen() actually works with "a", even if the file handle describes a
pipe.
-- 
Thomas Koenig, ecmtwhk@ccu1.aukuni.ac.nz, ib09@rz.uni-karlsruhe.de
The joy of engineering is to find a straight line on a double logarithmic
diagram.
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.unix.programmer
Subject: Re: malloc() and free()
Date: 9 Sep 1992 05:06:20 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: gandalf.think.com

In article <1992Sep8.171947@is.morgan.com> scairns@is.morgan.com (Scott Cairns) writes:
>It's always been my understanding that this memory has been free()'d
>but only to the process which initially malloc()'ed it.  Is this
>correct?  If so, how does that process reuse this freed memory?

Yes, in most Unix implementations of free(3), the memory is not returned to
the OS.  Future malloc(3) calls by that process may reuse the freed memory.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
From: dickerso@fester.dell.com (Russell Dickerson - X5409)
Newsgroups: comp.unix.programmer
Subject: Waiting I/O in a FILE *
Date: 10 Sep 92 21:27:01 GMT
Reply-To: dickerso@cpat.stortek.com
Distribution: usa
Organization: IO SpecialistsConsulting

I'm trying to filedesc = popen(...) in a program.  I've had it working
for a while but would like to modify it so I can check to see if there
is any output before I attempt to read from the pipe since the read is
blocking.  Since this is in an X program, blocking is not desirable.

I saw something posted akin to this some time back but I can't find the
printout.

reply>>> dickerso@cpat.stortek.com

--
-----------------------------------------------------------------------
Russell Dickerson	Unix/X Consultant	IOSpecialists
(303) 673-5409 ---REPLY TO>>> dickerso@cpat.stortek.com <<<!!!!--------
For every vision, there is an equal and opposite Congressional revision.
Newsgroups: comp.unix.programmer
From: jdavis@bordeaux.kpno.noao.edu (Jim Davis)
Subject: Re: spurious early wakeups by SIGALRM under SunOS 4.1
Summary: Get patch 100458-02
Organization: Blurkmann Planetarium
Date: Mon, 14 Sep 1992 22:35:15 GMT

In article <10728@sun13.scri.fsu.edu> mueller@pi.fsu.edu (Frank Mueller) writes:
>Has anybody else experienced any spurious early wakeups by the timer signal
>which was requested by a setitimer (real-time timer) under SunOS 4.1.1?
>
>Any ideas why this happens? Is it a known bug?

Yup.  Here's the patch README.  BTW, mail to pi.fsu.edu bounced with a 'Host
unknown' error...

Patch-ID# 100458-02
Keywords: signal, alarm, time, setitimer, call, deliver,sigalrm
Synopsis: SunOS 4.1;4.1.1;4.1.2: Setitimer sometimes fails to deliver a SIGALRM.
Date: 05-May-92
 
SunOS release: 4.1, 4.1.1, 4.1.2 

Unbundled Product: N/A
 
Unbundled Release: N/A

Note: Patch release 02 is to provide a DBE 1.2 compatible version for the
	4.1.2 version of the patch
 
Topic: SunOS Setitimer calls.
 
BugId's fixed with this patch: 1076393

Architectures for which this patch is available: sun3, sun3x, sun4, sun4c, sun4m

Obsoleted By:

Patches which may conflict with this patch:

Files included with this patch: README, kern_sig.o

Problem Description: SunOS 4.1.1: Setitimer calls sometimes fail to deliver a SIGALRM.

INSTALL:  
This example illustrates the sun4c case. 

As root:

Save the previous object file.
mv /sys/`arch -k`/OBJ/kern_sig.o /sys/`arch -k`/OBJ/kern_sig.o.orig

Install the new file into the system configuration area.
cp {4.1,4.1.1,4.1.2}/`arch -k`/kern_sig.o /sys/`arch -k`/OBJ

Rebuild the kernel.

Copy the new vmunix to /vmunix and reboot the machine.
-- 
Jim Davis            | "I'm bringing the dynamite!"
jdavis@noao.edu      |   -- Pete's brother Pete
From: aj639@cleveland.Freenet.Edu (Michael Cox)
Newsgroups: comp.unix.programmer
Subject: YP client calls
Date: 8 Sep 1992 18:28:30 GMT
Organization: Case Western Reserve University, Cleveland, OH (USA)
Reply-To: aj639@cleveland.Freenet.Edu (Michael Cox)
NNTP-Posting-Host: hela.ins.cwru.edu


If anyone is familiar with doing YP client calls, please mail me.

I am trying to do yp_get_default_domain and just print the domain to the
screen, but all I get is a core dump.

Mike
-- 
Okay, look for AmoNER Disk #4 on:
ux1.cso.uiuc.edu (128.174.5.59) in /amiga/amoner
nic.funet.fi (128.214.6.100) in /pub/amiga/programming/amos
From: hurtta@cs.Helsinki.FI (Kari E. Hurtta)
Newsgroups: comp.unix.programmer
Subject: Re: pathname "cleanup" routine
Date: 10 Sep 92 12:23:37 GMT
Organization: Department of Computer Science, University of Helsinki, Finland

In article <1992Sep10.043443.20693@leland.Stanford.EDU> schemers@leland.Stanford.EDU (Roland Schemers) wrote:
> Before I reinvent the wheel, does anyone have or know of a
> pathname "cleanup" function that will do the following:
> 
> Remove  "/../" and "/./" and "//" from a path.
> Expand ~ and environment variables.
> Add leading "/" if not present.

Warning:

if tmp is symbolic link, then
	tmp/../foo	isn't same as	foo 

- K E H
From: cew6@po.CWRU.Edu (Carlin E. Wiegner)
Newsgroups: comp.unix.programmer
Subject: Access TCP/IP in real time question...
Date: 13 Sep 1992 19:53:06 GMT
Organization: Case Western Reserve University, Cleveland, Ohio (USA)
NNTP-Posting-Host: thor.ins.cwru.edu


I'm hoping to write a program that will let people talk in 
real time between two unix machines and I was wondering how
do I send the information between computers. Could someone
give me the name of a good book or help me personally?
Thanks...

P.S. Please email Replies...
CW
From: jhelberg@nl.oracle.com (Joost Helberg)
Newsgroups: comp.unix.programmer
Subject: Re: TCP reliability
Date: 14 Sep 92 13:50:56 GMT
Organization: Oracle Europe
X-Newsreader: Tin 1.1 PL3

X-Disclaimer: This message was written by an unauthenticated user
              at Oracle Corporation.  The opinions expressed are those
              of the user and not necessarily those of Oracle.

droux@hei.unige.ch writes:
: 
: TCP/IP BERKELEY SOCKETS: Transmission problems with doublicated packets
: -----------------------------------------------------------------------
: 
: We are currently implementing a distributed system providing the use of
: different computers (different UNIX workstations) connected by Internet.
: Our System is based on a server - client model using berkeley sockets.
: 
: These two entities are communicating through AF_INET family
: sockets of SOCK_STREAM type. Our Problem is, that a receiver implemented on
: a NeXT receives much more packets than the sender implemented on 
: a Sun workstation sends (1.3 : 1).
: 
: As TCP is known as sequenced, reliable and two-way connection based, this
: fact is surprising to us. Is it possible to avoid this ? 

No, TCP gives you a connection to put a stream of bytes on, not packets.
This means that while sending 200 packets, the other side may receive
100 packets. The number of data-bytes sent and received however must be 
the same.

TCP offers SOCK_STREAM, counting packets works using SOCK_DGRAM (using udp).


--  
   Joost Helberg                                Rijnzathe 6
   jhelberg@oracle.nl                           NL-3454 PV De Meern
   jhelberg@nl.oracle.com                       The Netherlands

   Oracle Europe BV                             Product Line Development	
   Phone: +31 3406 94211                        Fax:   +31 3406 65609
Newsgroups: comp.unix.programmer
From: int233p@mdw033.cc.monash.edu.au (Mr A.J. Bucknell)
Subject: Trying to write my own ls
Summary: Help with inodes and struct direct
Keywords: inodes
Organization: Monash University
Date: Wed, 9 Sep 1992 12:50:31 GMT

   I am trying to write a small program that lists the files and subdirectories
of a specified directory. I have got the following program running, and it
works fine when I run it on the home directory, but when I run it on any other
directory, it gives incorrect file sizes. Can anyone point my error ? The 
code is :


#include <stdio.h>
#include <sys/types.h>
#include <sys/dir.h>
#include <sys/stat.h>

void main(int argc, char *argv[])
{
	struct stat buf;
	DIR *dirp;
	struct direct *dp;
	
	dirp = opendir(argv[1]);
        for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp))
	{
		stat(dp->d_name, &buf);
		printf("%-15s%8d\n", dp->d_name, buf.st_size);
	}
	closedir(dirp);
}

Thanks in advance for any help. Replies via email, or to here if you think its
of interest to others.
Xref: sparky comp.unix.programmer:4628 comp.lang.c:13492
From: ghe@ruhets.rutgers.edu (Guangliang He)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: argv in main
Keywords: argv, main(), NULL
Date: 11 Sep 92 03:54:35 GMT
Followup-To: comp.lang.c
Organization: Rutgers Univ., New Brunswick, N.J.

It may be a FAQ, but I could not find it in the FAQ list.

According to the "C: A Reference Manual" (2nd Edition, by Harbison &
Steele), the argument argv[argc] of main(argc, argv) may be a null
pointer, but is not so in allimplementations. How safe is it to assume
argv[argc] == NULL ? Should I be cautious about this?

Thanks for the info.

Email the answer please. I will summerize if there is enough interest.

Guangliang He
ghe@physics.rutgers.edu
Newsgroups: comp.unix.programmer
From: jrpg8255@uxa.cso.uiuc.edu (Jeremy Payne )
Subject: checking stdin for keypress
Summary: How do I check for available keystrokes?
Organization: University of Illinois at Urbana
Date: Thu, 10 Sep 1992 17:12:13 GMT
Keywords: keypress stdin


I'm trying to port someone's PC-code, and just realized that I've never
needed the unix equivalent of kbhit() before.  How does one check for 
keystrokes in the buffer (how are they buffered?) without calling getchar() and
having to wait for one?  I could include it in the X portion of the code but
I'd really like to know how to do it w. stdin.  On a similar note, could 
someone mention if and how scan codes etc. are generated for things like 
function keys etc.?  A quick RTFM is fine :-) I've never used curses BTW if
that turns out to be the answer ...

Thanks a bunch,


---------------------------
Jeremy Payne
UIUC Neuroscience program /
College of Medicine
jrpayne@uiuc.edu
(217)244-4478
---------------------------
Newsgroups: comp.unix.programmer
From:  ddw@soft.sapsan.msk.su (0000-Admin(0000))
Subject: I need PD ansi C (full) LIBC
Reply-To: ddw@soft.sapsan.msk.su
Organization: Research & Production Centre SAPSAN
Date: Mon,  7 Sep 92 17:15:54 +0300 

Has anybody ANSI C public domain libc (portable) ?
I need internationals functions.
Help me please.

	Thanks in advance.
	Dmitry Doronin.

-- 
Dmitry W. Doronin | RUSSIA, MOSCOW 274-6329, 581-2039(HOME) | ddw@sapsan.msk.su


Newsgroups: comp.unix.programmer
From: subbarao@tex.Princeton.EDU (Kartik Subbarao)
Subject: Re: Creating accounts in C
Organization: Princeton University
Date: Fri, 11 Sep 1992 01:32:45 GMT

In article <k6tny!p.rkitts@netcom.com> rkitts@netcom.com (Rick Kitts) writes:
>
> I seem to be having a problem creating accounts from within a C program
>using only C function calls. I can create the information correctly (I
>think), add it to /etc/passwd and /etc/shadow in a form which seems to
>be rational but I am unable to login to the account. This is Esix SVR4
>running on a 486 by the way. Does any one have any idea of what I could
>be doing wrong or, better, have code that does this already? Any
>help would be appreciated.

Why do say ``I can create the information correctly (I think)''? Why don't
you just check for yourself and be sure? Compare the information you added to 
the passwd files with your program to the previous entries that you manually 
put there. See what the differences are, and that tells you where you screwed 
up.

Oftentimes, oneself can be an infinitely faster resource than USENET.

	-Kartik
From: wade@nb.rockwell.com (Wade Guthrie)
Newsgroups: comp.unix.programmer
Subject: Re: checking stdin for keypress
Keywords: keypress stdin
Date: 11 Sep 1992 16:25:34 GMT
Organization: Rockwell International


In article <BuDH4F.LFv@news.cso.uiuc.edu>, jrpg8255@uxa.cso.uiuc.edu (Jeremy Payne ) writes:
> 
> How does one check for 
> keystrokes in the [UNIX tty] buffer?

This is done by talking to the tty driver (one uses the 'ioctl' system
call -- short for I/O control, but usually pronounced 'eye-octal' -- to do this 
under UNIX).  TFM to R is 'man 4 termio', but I'll try to summarize here.

ioctl is called with three arguments: the file descriptor, the request (both
are integers) and the argument to the request (check out man 2 ioctl).

If I remember right, you need to call 'ioctl(fd, TCGETS, &termios)' to get the 
value of the 'termios' structure.  You then replace termios->c_cc[VMIN] (this
indicates the minimum characters to read on that file descriptor) with 0
and termios->c_cc[VTIME] (this indicates the time before timeout in 0.10 second
intervals) with 0.  Next, you call 'ioctl(fd, TCSETS, &termios)' to reset 
the values for the file descriptor.

Once you've done this, you can do a read and check for the number of characters
returned.  In conjunction with buffered I/O, I'm not sure how well this works;
you may have to use 'read' rather than 'getchar'.

It's been awhile, so you may want to check out the man pages before you try
this at home.

> (how are they buffered?) 

Well, how and whether keystrokes get buffered is a matter for the tty driver
which is accessed by your program.  Keystrokes go into a queue in the tty driver
called the raw queue.  The raw queue typically buffers keystrokes, including
things like <delete> (others are interpereted, like <ctrl-c> until a newline
is entered.  When this happens, the raw queue is dumped into another queue
called the cannonical queue; it is during this dump that the <delete> and other
special characters are interpereted.  All of this happens when the tty driver
is in 'cooked' mode.

Another couple of modes exist.  The simplest is 'raw' mode (you could taste that
one comming, huh?) wherein ALL characters that go into the raw queue are
immediately flushed into the cannonical queue -- no interpretation involved.
A mode in-between 'raw' and 'cooked' exists; this is called 'cbreak' mode.  This
mode is just like 'raw' mode except a <cntrl-c> still is interpreted as a <break>
(hence the name of the mode).

> On a similar note, could 
> someone mention if and how scan codes etc. are generated for things like 
> function keys etc.?  
> A quick RTFM is fine :-) I've never used curses BTW if
> that turns out to be the answer ...

'curses' is a fine answer to the function key stuff, but may be an overkill.
It may be the only portable way to solve that problem, however.

Hope this helps

Wade
wade@nb.rockwell.com
Newsgroups: comp.unix.programmer