home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 5718 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.6 KB

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