*BSD News Article 1818


Return to BSD News archive

Xref: sserve comp.lang.c:29894 comp.sources.wanted:12724 comp.unix.misc:4268 comp.unix.questions:24109 comp.sys.apollo:12455 comp.unix.bsd:1851
Newsgroups: comp.lang.c,comp.sources.wanted,comp.unix.misc,comp.unix.questions,comp.sys.apollo,comp.unix.bsd,uiowa.comp.apollo
Path: sserve!manuel!munnari.oz.au!uunet!news.uiowa.edu!icaen.uiowa.edu!gdcarson
From: gdcarson@icaen.uiowa.edu (Gregory Donald Carson)
Subject: Fork ?
Sender: news@news.uiowa.edu (News)
Message-ID: <1992Jul6.005853.21925@news.uiowa.edu>
Date: Mon, 6 Jul 1992 00:58:53 GMT
Nntp-Posting-Host: temp2.icaen.uiowa.edu
Organization: Iowa Computer Aided Engineering Network, University of Iowa
Lines: 16

Hello All;
	I have a question about fork's.  I have a C program that I need to call
repeatedly.  Meaning that I wish to be able to have this program called and
run several times from the same program.  The C program that I need to call 
takes a long time to run, and I want it to run, while the main program
continues.  I have heard of a thing called a fork, and was hoping someone could
explain it and perhaps send me an example. (I have been lead to believe that
fork is the answer to this problem)
	The system I am using is under unix, and the C compiler is at least
ansi compatible, beyond that I am not sure and really for portaability should
avoid anything outside the ansi standard.  The C program that I wish to call
is passed an image data array, and then displays it, its normal quit returns
control to the calling program.
	Is fork the answer?  Please help if you can.

- Greg -- gdcarson@icaen.uiowa.edu