Hi
@Jose
Haven't read the whole thread (no time :-() but you can use a really simple fake seglist instead of a real seglist in CreateProc():
Think you have a pointer to the function that should be the entrypoint into your new process:
void (*pfv)(void);
Now you can simply get a BPTR to this function using:
BPTR sl;
sl = MKBADDR(pfv) - 1;
Now you can create your process:
struct MsgPort *mp;
mp = CreateProc ("ChildProc", DEFAULT_PRI, sl, DEFAULT_STACK);
The entry address of a function used this way must be aligned to a longword address, under SAS/C the first function of an object module can be considered appropriate for this conversion; it may have to be declared with the __saveds keyword.
This is documented in "The Amiga Guru Book" from Ralph Babel and I have tested it under every AmigaOS 1.3+. I think you will get problems if the code should be converted to OS 4.0 :-)
Noster