Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
63 user(s) are online (36 user(s) are browsing Forums)

Members: 1
Guests: 62

BillE, more...

Support us!

Headlines

 
  Register To Post  

« 1 (2)
Re: clean way howto use clib4
Home away from home
Home away from home


See User information
@joerg

I have a working vfork for AmigaOS4...
so now its not only MorphOS that has it...

the stack is moved, so never do &local to get the address, before the vfork(), besides closing BPTR file pointers, and doing stuff like that will be like begging for problems and bugs. a lot of stuff must be atomic..
vfork is messy not so easy to see where the vfork thread ends.

I guess pthreads spawn is safer, easier to read. and less likely to break on a system update. (in anycase the way I did it might be quite system friendly... besides the side effects.), unless the OS is updated to 64bit, or we change to a different CPU type.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: clean way howto use clib4
Quite a regular
Quite a regular


See User information
@LiveForIt

Nice work! Can I try it?

And MorphOS does not have fork() yet, as Piru explained.
I wrote that information because I compiled a program with fork() that ran fine.
However, I didn't notice the warning about the implicit declaration of fork(), and the program ran in a branch where fork() was not used.

AmigaOS3: Amiga 1200
AmigaOS4: Micro A1-C, AmigaOne XE, Pegasos II, Sam440ep, Sam440ep-flex, AmigaOne X1000
MorphOS: Efika 5200b, Pegasos I, Pegasos II, Powerbook, Mac Mini, iMac, Powermac Quad
Go to top
Re: clean way howto use clib4
Home away from home
Home away from home


See User information
@sailor


It is mostly just a prototype, can be nice with a readme and maybe fix exit.. but that might be more speculative code. Something we should avoid, next logical step is to build it into clib4, to avoid workarounds.

for now exit with RemTask(FindTask(NULL)); for it to die witht out closing libraries and classes and so on.

maybe:

#define vforkExit() RemTask(FindTask(NULL));

Maybe put a marker in the child process so it knows it’s a vforked thread.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top

  Register To Post
« 1 (2)

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )



Polls
Running AmigaOS 4 on?
AmigaOne SE/XE or microA1 12% (26)
Pegasos2 3% (8)
X5000 22% (48)
X1000 14% (30)
A1222 8% (19)
Sam 440/460 18% (40)
Classic PowerPC Amiga 2% (6)
WinUAE emulation 7% (16)
Qemu emulation 9% (21)
Total Votes: 214
The poll closed at 2025/12/1 12:00
7 Comments


Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project