Welcome, Guest. Please login or register.

Author Topic: Exiting gracefully after created process from disk file...  (Read 2083 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Exiting gracefully after created process from disk file...
« on: June 17, 2005, 05:07:11 PM »
Hi. Can you use the task functions RemoveTask() etc. with processes ? I don't think so, so how do you exit well from a spawed(child) process created from disk then ?

What I'm trying to do would go like this: Signal the child process to prepare to finish, wich deallocates all stuff it has allocated. Then the child process enters a Wait(0L) state (safe state) waiting for something equivalent to RemoveTask() to be called in the main process. Then the main process can delete the child process (in my case UnLoadSeg it).
I'm also supposing one can't just exit() from the child process because then how can it signal the main process to UnLoadSeg it ? A easier thing would be if the child process was a function in the main program but I'm creating it from a file after a LoadSeg...
So it all boils down to how I UnLoadSeg it I guess...
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: Exiting gracefully after created process from disk file...
« Reply #1 on: June 17, 2005, 05:13:38 PM »
BTW, yeah I know there must be also a Forbid() Permit() pair somewhere in the main process too, to avoid currption of the Exec lists...
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: Exiting gracefully after CreateNewProc ()
« Reply #2 on: June 17, 2005, 05:36:16 PM »
Great! BTW the RKM Libs has a bad example then...
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: Exiting gracefully after CreateNewProc ()
« Reply #3 on: June 17, 2005, 05:41:16 PM »
@Karlos

Yeah... :-D
:pint:
\\"We made Amiga, they {bleep}ed it up\\"