HDTenEightyP/NetNews huggingface dataset:
From: gaf@alpha.aosg.gsf.dec.com (Gerald Feldman)
Subject: Re: client/server question.....
Reply-To: gaf@aosg.gsf.dec.com
Organization: Digital Equipment Corporation
Date: Wed, 27 Jan 1993 22:31:24 GMT

In article <1k6fa5INN1m6@opsin.cs.unc.edu>, panvalka@cs.unc.edu (Anay Panvalkar) writes:
|> In article <1993Jan26.221617.53627@slate.mines.colorado.edu> iarit@slate.mines.colorado.edu (ARIT ISMAIL) writes:
|> 
|> >I don't want to fork because the info should be generated on one
|> >program, send to server and the server has to respond to every
|> >program connected with the same info( if I fork, how can I transfer
|> >that info to child?).
|> 
|> One solution is open a temp. file and write your info to it.
|> Then when you fork() the child will get its own copy of the
|> parent's descriptors. But, if the child modifies this info,
|> it will affect any later read or writes to it by the parent.
|> 
|> > check_new_connection(); /* how can I check if there is any new
|> >                           without waiting, as far as I know accept(..)
|> >                           blocks you 'till you get some connection*/
|> 
|> Well, read the man page for select(2)...
|>      Selecting true for reading on a socket descriptor upon which
|>      a  listen(2) call has been performed indicates that a subse-
|>      quent accept(2) call on that descriptor will not block.
|> 
|> >My problem is getting new connections without waiting.
|> >I appreciate any help.
|> >iarit@slate.mines.colorado.edu
|> 
|> -Anay
|> 
|> --
|> ===============================================================================
|> Anay S. Panvalkar
|> Biomedical Engineering                  ****GO TARHEELS****
|> University of North Carolina        

-- 
Maybe a more appropriate solution is to use threads (or lightweight
processes). With threads, your program is viewed as a single process by
the OS (although the Kernel does know about Kernel threads). Also, if
you use Posix threads your application will be somewhat portable between
operating systems and platforms. Your application could be more easily
ported to Sun, Digital Unix (Ultrix or OSF/1), Digital VMS, HP-UX.
Your global memory is shared by each thread, but each thread has its own
stack. This approach eliminates keeping a temp file. It also eliminates
the non-portability of using a shared memory or IPC solution. The only
real problem is that the Posix threads standard is subject to change.
But, this is probably the most portable solution, and it does not lock
your application into anyone's hardware or OS since threads can be
implemented on many different types of operating systems.
+-------------------------------------------------------------+
Jerry Feldman		   AOSG
Mailstop: GSF1-1/K13	   DTN:264-5863
Digital Equipment Corp.    EXT:(603)884-5863
5 Wentworth Drive          ip(DEC): gaf@aosg.gsf.dec.com
Hudson, NH 03051           enet: alpha::gaf
			   Internet(HOME):gaf@palantir.newton.ma.us
+-------------------------------------------------------------+
Newsgroups: comp.unix.programmer
From: tone@leland.Stanford.EDU (Tony Lin)
Subject: How does one turn the cursor off?
Keywords: curses, cursor 
Organization: Stanford University, CA 94309, USA
Date: Sat, 23 Jan 93 23:50:28 GMT

Hi everyone!

   Do any of you know how to turn the cursor off?   I'm writing in C and
using the Curses library on VT100 terminal emulators.   When I write things
to different parts of the screen, the cursor flickers around and is kind of
annoying.  Is there a control code or something that I can send to enable/
disable the cursor?  I don't think there is a curses function that does it.
I'd appreciate any help I can get... send replies to tone@leland.Stanford.EDU
Thanks!

						Tony Lin
Newsgroups: comp.unix.programmer
From: michaelh@g2syd.genasys.com.au (Michael Haldey)
Subject: Re: longjmp() from a signal handler
Keywords: longjmp signals
Organization: Genasys II, Sydney, Australia
Date: Tue, 26 Jan 1993 13:24:57 GMT

In article <rturner.727977268@imagen> rturner@imagen.com (Randy Turner) writes:
>I was reading the POSIX.1 standard the other day and it mentions that you
>cannot use the longjmp() library routine from inside a signal handler.  I
>was under the impression that this was valid under BSD 4.3...Can 
>anyone confirm the compatibility of using longjmp() from a signal handler
>when trying to write portable code?
>
As far as I remember, it is not compatible. Therre are two functions:
siglongjmp and sigsetjmp which are supported by POSIX and you can use
them freely. The reason is a behavour of the signal mask.

My 0.002
Michael
-- 
Michael Haldey  |  Genasys II Pty Ltd, Sydney, Australia
                |  Phone:    +61-2-954-2878 (-9930 FAX)
                |  Internet: michaelh@g2syd.genasys.com.au
From: chetanm@visionware.co.uk (Chetan Mistry)
Newsgroups: comp.unix.programmer
Subject: RPC/rpcbind (sys 5.4)
Date: 25 Jan 93 10:52:57 GMT
Organization: VisionWare Ltd., Leeds, UK
X-Newsreader: Tin 1.1 PL4

Does anybody know much about rpc's (and RPCBIND) under system 5 release 4 ??
I am currently trying to port an old RPC application which uses the portmapper
routines and NOT rpcbind. But according to the documentation RPCBIND has
support for all the old portmapper routines. Is it also possible to
register a service with rpcbind using tcp/udp and not the loopback thingy ??!!

Any help would be appreciated.

Chet
From: gbr@rubicon.muug.mb.ca (Gerald Brandt)
Newsgroups: comp.unix.programmer
Subject: Re: How does one turn the cursor off?
Distribution: world
Date: 25 Jan 93 08:22:02 CDT
Organization: Rubicon BBS UUCP Test Site

In article <1993Jan23.235028.16334@leland.Stanford.EDU> tone@leland.Stanford.EDU (Tony Lin) writes:
>Hi everyone!
>
>   Do any of you know how to turn the cursor off?   I'm writing in C and
>using the Curses library on VT100 terminal emulators.   When I write things
>to different parts of the screen, the cursor flickers around and is kind of
>annoying.  Is there a control code or something that I can send to enable/
>disable the cursor?  I don't think there is a curses function that does it.
>I'd appreciate any help I can get... send replies to tone@leland.Stanford.EDU
>Thanks!
>
>						Tony Lin

I believe there IS a curses function to turn the cursor off.  Unfortunately,
I can't remember it.  I do remember that it didn't work under Interactive
Unix 3.2, and AT&T SVR4.  What I ended up doing is placing a white cursor on
a white part of the screen.

--
Gerald Brandt    	                    email: gbr@rubicon.muug.mb.ca
Winnipeg, Manitoba, CANADA            BBS  : 1-204-669-1666

"To crush your enemies, and to see them driven before you.  And to hear 
the lamentations of thier women!"
                                      Conan
Newsgroups: comp.unix.programmer
Subject: Re: need help with UNIX/SPARC/ptrace() single stepping...
From: daniel@ug.eds.com (Daniel Dignam)
Date: 28 Jan 93 00:39:03 PDT
X-Newsreader: TIN [version 1.1 PL6]

I hacked up something that did something simlar to this once. It provided a way 
of checking tah all writes and reads where to valid memory addresses. I took a 
different approach.

Basically, you replace malloc with rou own written on top of memory mapping.
Then write protect the pages. Then every time a write is made you get an access
violation. Trap this, look at the data your given, the faulting address will be
one of these. Once you've logged the reference, return from you signal handler to 
restart the faulting instruction.

This seemed to work fine, it was however very slow in our application, so as a 
form of total paranoia it wasn't very useful. But it was an interesting hack.

You should be able to read protect pages as well, so this should cover all 
references to allocated memory. It doesn't however cover references to stack, 
or program data. Although the later could be done in a similar manner to 
allocated memory.

--

Daniel Dignam  

Internet: daniel@sdl.ug.eds.com
    UUCP: {uunet,uupsi}!ug!daniel


Newsgroups: comp.unix.programmer
From: yikes@netcom.com (Michael Brill)
Subject: Memory management from Unix to Windows/Mac
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
Date: Sat, 23 Jan 1993 04:29:23 GMT

I'm developing an app on the NeXT that I'd like to take the bulk                
of to either Windows and/or Macintosh.  I think I know how to                   
port everything but the UI and memory management.  Note that the                
pieces of the app I want to port are just plain old ANSI C.                     
                                                                                
As far as the UI goes, I'm not going to worry about now.  What I                
am worried about is memory management.  I've scanned through the                
Windows docs and understand how memory management works there                   
(getting handle, locking, operating, unlocking) and I'm looking                 
for an established scheme to make the port seamless between Unix                
and Windows/Mac.                                                                
                                                                                
Any ideas?  Thanks, ...Michael Brill (yikes@netcom.com)
                                                       
-- 
----
Xref: sparky comp.unix.programmer:6068 comp.unix.wizards:5672
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.unix.programmer,comp.unix.wizards
Subject: Re: Using mmap()
Date: 28 Jan 1993 17:49:25 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
Distribution: usa
NNTP-Posting-Host: telecaster.think.com

In article <1k7eqrINN3dr@TEDDY.SYSTEMSY.CS.YALE.EDU> freeman-elisabeth@cs.yale.edu (Elisabeth Freeman) writes:
>DESCRIPTION
>     mmap() establishes a mapping between the  process's  address
>     space  at  an  address pa for len bytes to the memory object
>     represented by fd at off for len bytes.  
>
>What is this memory object pointed to by fd, and how do I define
>fd?   I want to map some pages created by valloc() to another
>virtual address space.  Can I use mmap() for this purpose?

That description really sucks, IMHO.  The purpose of mmap(2) is to map a
portion of a file into virtual memory.  The "memory object" is a file, and
fd is a file descriptor returned by open(2).

You can use mmap to create shared memory between two processes by having
both of them map the same file in MAP_SHARED mode.  You can also use the
shm*() family of system calls for this.  But I believe neither mmap() nor
shmat() let you turn an existing part of your address space (such as memory
allocated with valloc()) into shared memory; they are used for *adding*
objects to your address space.  But you can probably use shmat() *instead*
of valloc() to allocate this memory.

-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
Newsgroups: comp.unix.programmer,comp.unix.questions
From: zqx@wucs1.wustl.edu (Zeqing Xia)
Subject: Need recommendation on communication books
Organization: Washington University, St. Louis MO
Date: Wed, 27 Jan 1993 16:23:26 GMT


Hi everyone,

	I'd like to know if there is any good books on programming
for TCP/IP. I saw serveral books which contain very few examples and
focus only on the layer organization instead of the application 
programming interface, i.e., the C library. The only one I know dealing
with API is Stevens of 1990. I think there should be something newer.

	Any suggestions are greatly appreciated.

Zeqing Xia
From: caedmon@cats.ucsc.edu (Axeman)
Newsgroups: comp.unix.programmer
Subject: Re: How does one turn the cursor off?
Date: 24 Jan 1993 01:51:02 GMT
Organization: University of California, Santa Cruz
NNTP-Posting-Host: am.ucsc.edu
Keywords: curses, cursor


tone@leland.Stanford.EDU (Tony Lin) writes:


>   Do any of you know how to turn the cursor off?

A cheezy pickup line?  "What's your sign?"
-jq

-- 
,;';,.,;';,.,;';,.,;';,.,;';,.,;';,.,;';,.,;';,.,;';,.,;';,.,;';,.,;';,
,;';,   caedmon@ucscb.ucsc.edu               Jeff Ishaq          .,;';,
,;';,   I am a meatball:  Bite me.           Guitar withdrawal!  .,;';,
,;';,.,;';,.,;';,.,;';,.,;';,.,;';,.,;';,.,;';,.,;';,.,;';,.,;';,.,;';,
Newsgroups: comp.unix.programmer
From: lundman@kauri.vuw.ac.nz (L Lundman)
Subject: More advanced popen()
Organization: Disorganised.
Date: Wed, 27 Jan 1993 10:39:35 GMT
Distribution: comp


After finding out that popen() only read or wrote to a process and not both
I was told I had to write one of my own if I wanted one. Can someone
inform me why this code doesn't seem to work?

(Knowing my luck, it's some dumb mistake ;) )


int 
  mypopen(int *read, int *write, char *path)
{

  /* First check to see if path is executable... */
  int childfd[2];
  int childpid;


  if (pipe(childfd)) return -1;

  childpid = fork();
  if (!childpid) {
    /* this is the child */

    dup2(childfd[0] , 0);
    dup2(childfd[1], 1);
    execl(path,path,NULL,NULL);
    
    exit(0); /* Not needed ? */
  }
  else {
    *read = childfd[0];
    *write = childfd[1];
    return childpid;
  }
}

--
-------------------------------------------------------------------------------
Jorgen Lundman         eMail: lundman@kauri.vuw.ac.nz, lundman@rata.vuw.ac.nz.
8 Atua Street          My thoughts are my own and not VUW's..
Johnsonville,wgtn      "Research indicate that only 21 percent of what goes
New Zealand            wrong here is actually my fault."
Phone: +64 4 478 2724 (GMT+11 hrs) Amiga Archive Admin on ftphost.vuw.ac.nz
Newsgroups: comp.unix.programmer,comp.unix.questions
From: channui@ranma.austin.ibm.com (Christopher Chan-Nui)
Subject: Re: Need recommendation on communication books
Date: Thu, 28 Jan 93 03:09:20 GMT
Organization: IBM T. J. Watson Research
X-Newsreader: TIN [version 1.1 PL8]
Followup-To: comp.unix.programmer,comp.unix.questions

Zeqing Xia (zqx@wucs1.wustl.edu) wrote:

: Hi everyone,

: 	I'd like to know if there is any good books on programming
: for TCP/IP. I saw serveral books which contain very few examples and
: focus only on the layer organization instead of the application 
: programming interface, i.e., the C library. The only one I know dealing
: with API is Stevens of 1990. I think there should be something newer.

: 	Any suggestions are greatly appreciated.

Try UNIX Network Programming by W. Richard Stevens (ISBN 0-13-949876-1)

It's a great book with good explanations and examples.


---
Christopher Chan-Nui    |                                                      
channui@austin.ibm.com  | Murphy was an optimist.                              
#include <disclaimer.h> |                                                      



--
---
Christopher Chan-Nui    | The remaining work to finish in order to reach your  
channui@austin.ibm.com  | goal increases as the deadline approaches.           
#include <disclaimer.h> |                                                      
Newsgroups: comp.unix.programmer,comp.unix.questions
From: zqx@wucs1.wustl.edu (Zeqing Xia)
Subject: where can i find ftp protocol doc?
Organization: Washington University, St. Louis MO
Date: Tue, 26 Jan 1993 14:21:40 GMT

Hi everyone,

	I'd like to know if there is any ftp site for me to get the
documentation of the ftp protocol. I think it should be somewhere.

	Thanks in advance.

Zeqing Xia


Newsgroups: comp.unix.programmer
From: eggert@twinsun.com (Paul Eggert)
Subject: Re: Can you place an obj/exe file under RCS?
Keywords: rcs RCS
Organization: Twin Sun Inc, El Segundo, CA, USA
X-Newsreader: NN version 6.4.19
Date: Thu, 21 Jan 1993 22:02:11 GMT

>		1) Can obj code/executables be placed under RCS, if so
>		   what is the exact command?

Yes, if you have RCS version 5.5 or later.  You first should prepare
the RCS file with the command `rcs -ko filename', so that RCS doesn't
alter (which would change the length of) keyword strings.  Other than
that, the regular RCS commands work fine.
Newsgroups: comp.unix.programmer,comp.unix.ultrix
From: roy@spectrum.cs.unsw.oz.au (Prabal Kumar Roy)
Subject: =========Problem using mmap on DECstations========
Reply-To: roy@spectrum.cs.unsw.oz.au (Prabal Kumar Roy)
Organization: none
Date: Thu, 28 Jan 1993 00:26:10 GMT

 Greetings:

  I am trying to use the mmap command on DECStation 5000.  In the following test 
program I am trying to reserve 1000 bytes of memory and trying to write some stuff
in that area.

However, at the statement    *intptr = 1; I am getting the following error.
pid 10810 (a.out) was killed on kernel access, at pc 0x400284.  Bus error (core 
dumped).  

So the statement result = (caddr_t) mmap(0,..............) has got me some
memory which is in the kernel area, so when I am trying to access it later I am 
getting a core dump.  Any help will be greatly appreciated.

Prabal K. Roy
AI Lab
U. of New South Wales
Sydney 2033
AUSTRALIA
----------

#include <sys/types.h>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <string.h>
#include <limits.h>
#define PERMS 0666
#define TRUE 1
#define FALSE 0

main ()
{
  int fd;
  caddr_t result;
  int *intptr;
  char *charptr;

  fd = creat("myfile", PERMS);

  result = (caddr_t) mmap(0, 1000, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
  close(fd);

  intptr = (int *) result;
  *intptr = 1;
  result = result + sizeof(int);
  charptr = (char *) result;
  strcpy(charptr, "hello world");

}
From: leisner@wrc.xerox.com ( Marty Leisner)
Newsgroups: comp.unix.programmer
Subject: Shared ram questions...
Date: 27 Jan 93 22:46:35 GMT
Reply-To: leisner@eso.mc.xerox.com
Organization: Xerox
X-Newsreader: TIN [version 1.1 PL8]

I want several processes to access the same block of ram (actually an 8086 emulator with ram and
registers).

For starters, the emulator should be able to write to ram, and the disassembler should merely be
able to read ram...

What I want to do is:
	1) have shared ram for this...
	2) fork off the dissasembler
	3) have the disassembler run in its own xterm window (I supposed I'll have to give it
new ptys)

How can I do this in a portable way (if possible).

I'm using sunOs 4.1.x...

I'd appreciate an example for this...(RTFM is not the place I want to start with this...)

--
marty
leisner.henr801c@xerox.com  leisner@eso.mc.xerox.com
Member of the League for Programming Freedom
Newsgroups: comp.unix.programmer
From: gjohnson@athena.cs.uga.edu
Subject: Re: Need Some Help: A painfully complete book
Organization: University of Georgia, Athens
Date: Mon, 25 Jan 1993 06:16:03 GMT

UNIX NETWORK PROGRAMMING
W. Richard Stevens

Prentice Hall
ISBN 0-13-949876-1


Cost me $45, has everything you want to know & more. (IP level, sockets, 
SysV transport layer stuff, security, ad infinitum.)


-- 

/* Just some random thoughts from Greg Johnson (gjohnson@athena.cs.uga.edu)
 /\^/\  (706) "And the men who hold high places must be the first to start      
<_GCJ_>548-7983  to mold a new reality, closer to the heart"...Rush
From: panvalka@cs.unc.edu (Anay Panvalkar)
Newsgroups: comp.unix.programmer
Subject: Re: client/server question.....
Date: 27 Jan 1993 12:04:05 -0500
Organization: The University of North Carolina at Chapel Hill
NNTP-Posting-Host: opsin.cs.unc.edu

In article <1993Jan26.221617.53627@slate.mines.colorado.edu> iarit@slate.mines.colorado.edu (ARIT ISMAIL) writes:

>I don't want to fork because the info should be generated on one
>program, send to server and the server has to respond to every
>program connected with the same info( if I fork, how can I transfer
>that info to child?).

One solution is open a temp. file and write your info to it.
Then when you fork() the child will get its own copy of the
parent's descriptors. But, if the child modifies this info,
it will affect any later read or writes to it by the parent.

> check_new_connection(); /* how can I check if there is any new
>                           without waiting, as far as I know accept(..)
>                           blocks you 'till you get some connection*/

Well, read the man page for select(2)...
     Selecting true for reading on a socket descriptor upon which
     a  listen(2) call has been performed indicates that a subse-
     quent accept(2) call on that descriptor will not block.

>My problem is getting new connections without waiting.
>I appreciate any help.
>iarit@slate.mines.colorado.edu

-Anay

--
===============================================================================
Anay S. Panvalkar
Biomedical Engineering                  ****GO TARHEELS****
University of North Carolina        
Newsgroups: comp.unix.programmer
From: 890758k@dragon.acadiau.ca (Wing Ho Kwan - Louie)
Subject: Problem for shared memory
Summary: How to share a adjacent linked-list within two independent processes
Keywords: AA
Organization: Acadia University
Date: Fri, 22 Jan 1993 02:33:27 GMT

Hi, 
I am doing a client and server program.
I bulit a adjacent linked list in one process and want to share this linked list
in another process. Therefore, two processes can access to this memory independently.
These processes can add or remove any items with this linked list.
 
Can anyone suggest me how to do it.
Thanks

Regards,
Louie Kwan

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*||||||||||||||  ASU Box 6696, Wolfville, N.S. Canada  |||||||||||||||*
*|||||||||||||||||||||||||||  B0P  1Z1  ||||||||||||||||||||||||||||||*
*|||||||||||||||||  Tel : 902-542-9912  (Room 128)  ||||||||||||||||||*
*|||||||||||||||  E-mail : 890758k@dragon.acadiau.ca  ||||||||||||||||*
***********************************************************************

Newsgroups: comp.unix.programmer,comp.lang.c
From: dan@mordor.webo.dg.com (Dan Zehme)
Subject: reading and writing the inbox
Date: Thu, 21 Jan 93 16:11:22 GMT
Organization: Data General Corporation

I am working a program that will work with a user's mail inbox (i.e.
/usr/mail/$USER).  I have been unable to find what I need to do to
read and write the file without the system or anybody else
interferring with the file.  Is there a particular lock file that I
need to create or a system call that I need to make.  My system
uses DG/UX (System V.4 compatible).  Thanks in advance.


Dan Zehme, MS F134, Data General, 4400 Computer Drive, Westboro, MA 01580
Internet: dan@mordor.webo.dg.com, Phone: (508) 870-9237, Fax: (508) 898-4060
Newsgroups: comp.unix.programmer
From: mayerh@lpr.e-technik.tu-muenchen.de (Herbert Mayer)
Subject: Problems with job control
Keywords: job control
Organization: Lehrstuhl f. Prozessrechner, Techn. Univ. Muenchen, Germany
Date: Thu, 21 Jan 1993 13:47:20 GMT
Summary: problems with job control


I have problems with job control on AIX.

I'm writing a turorial-program for UNIX.
In this programm the user has the possibility to do an exercise in a shell.
This shell will be created from the program with a fork() and an exec() command.After the exercise the tutorial-program should be continued.
For the shell exists a time limit. If the user doesn't exit the shell before 
the time is over, the program has to kill the shell.
In order to kill all processes, that are running on this shell, it is necessary
to assign it to an own processgroup and kill the whole group at the time limit.
With a tcsetpgrp() command in the tutorial-program it is possible to put the
processgroup of the shell in the foreground and the tutorial-programm in the
background. Because the tcsetpgrp() command only works in a process who is in
foreground, I can't get the tutorial-program back to the foreground after the 
shell was killed. 
Exactly this is my problem.

Please e-mail your answer to mayerh@lpr.lpr.e-technik.tu-muenchen.de


Thanks in advance

Herbert

Newsgroups: comp.unix.programmer