Amiga.org
Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: Jose on September 01, 2004, 03:58:35 AM
-
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.
-
@Jose
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().
-
A bit off topic here, but I have Executive Commander running and I
have a task called -
Just a hyphen!
It's like:
Name PID TYPE PRI RPRI NICE
- 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.
:-(
-
@Piru
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
@Hyperspeed
Could be, a virus can be programmed to be anything executable I guess..