Welcome, Guest. Please login or register.
Amiga Kit Amiga Store Iridium Banner AMIStore App Store A1200/A600 4xIDE Interface

AuthorTopic: Child tasks/processes created from processes launched in a Shell window question  (Read 732 times)

0 Members and 1 Guest are viewing this topic.

Offline Jose

Do they start automatically?
I managed to kill the bugs and make a small test proggie work. It basically sets up a secondary process of a certain name if it finds it in Ram:. Error checking is included. I was surprised it worked :lol: If it doesn't find the file it prints some message. If I put an executable file of the same name as the name the program searches for it prints another string.
The only problem is that I expected the executable to start itself after I use the CreateProc function...
At first I though that the startup and cleanup code of the compiler handled this and that the second task was forced to terminate after the first one exits. But I tested that with  a delay of 2 seconds (200 ticks), and still nothing happends.
\\"We made Amiga, they {bleep}ed it up\\"

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
  • Total likes: 0
    • http://www.iki.fi/sintonen/

CreateProc doesn't set up CLI for the command (pr_CLI), so typically commands with startupcode will just wait for WB startup message till doomsday. If you want to launch the 2nd process with CLI, you need to look into CreateNewProc() and NP_Cli (dos/dostags.h). Also take a look at NP_SegList, NP_FreeSeglist, NP_Input and NP_Output.

Simplest would be just to use SystemTags() call.

If you just want to run the 2nd cmd syncron, look into RunCommand().

Offline Hyperspeed

A bit off topic here, but I have Executive Commander running and I
have a task called -

Just a hyphen!

It's like:
-    206 task   0    0    0

What is this? What would a virus look like as a task?

Hope it's just some funny patch like the MapROM or SetPatch.


Offline Jose


Yes, I'll use CreateNewProc() with 2.04+ machines, but I wanted to use CreatePro() conditionally on 1.3 machines (1.3 doesn't have CreateNewProc()). So I guess on these the only solution would be to set up the structure myself, boring :-o


Could be, a virus can be programmed to be anything executable I guess..
\\"We made Amiga, they {bleep}ed it up\\"