home *** CD-ROM | disk | FTP | other *** search
- Path: news.tau.ac.il!usenet
- From: Avi Lev <avil@sapiens.com>
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Removing Processes
- Date: Tue, 19 Mar 1996 08:42:52 +0200
- Organization: Sapiens Technologies
- Message-ID: <314E576C.4E36@sapiens.com>
- References: <84215-826944629@mindlink.bc.ca>
- NNTP-Posting-Host: honda.sapiens.co.il
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (WinNT; I)
-
- Dave Thomas wrote:
- >
- > Hi! I'm writing a program which spawns a sub-process to do another task
- > while the main program handles input. The problem I'm finding is that the
- > sub-process doesn't exit reliably. Sometimes it appears to exit, and
- > sometimes not. Currently, I am allowing the subprocess to run to the end,
- > when (I assume) it does an "RTS" and returns to the OS for removal. Should
- > I be using "RemTask()" to remove the sub-process? And, if so, should it be
- > called from the sub-process, or from the main program? BTW, the
- > sub-process is a procedure in the program, and uses some global variables
- > and string constants.
-
- NO!!! RemTask() removes tasks not processes. how do you know if the sub-process actually finished, it
- might be suspended cuz of higher priority process. i think there's a wait() function which checks to
- see if the process finished and if not it waits until it does, you might want to go in that direction
- first. what you're describing sounds like it's a task NOT a real AmigaDos process cuz the 'process'
- sits in your own program, if that's the case then it's a task not a process and then you can use
- RemTask() from the creator of the task.
- >
- > Next question: I am using a process because I am writing a NNTP news reader
- > program, and I want the sub-process to do the communication across the 'net
- > (using AmiTCP). It's not clear to me that a task would be sufficient to do
- > this. Would it be?
- >
-
- Again NO!!! Tasks are very limited in their capabilities, they can't use DOS services i believe, but
- if you're not using any i guess a task would suffice.
-
- > Final question: I'm using SASC 6.55 and find that when I write a smakefile
- > and use smake to compile, it trashes some of my source files. I've stopped
- > using smake, but it's a pain when I need to recompile everything. I've
- > also had this problem with older versions. Has anyone else noticed this?
-
- what do you mean it trashes some of your sources, you mean it overwrites them???? if that's the case
- then your smake sources are either buggy or there's a serious problem somewhere in the development
- environment. what you can do is simply write a Dos script which builds everything instead of doing
- manually every time.
-
- Regards, Avi.
-