Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
44 user(s) are online (32 user(s) are browsing Forums)

Members: 0
Guests: 44

more...

Support us!

Headlines

 
  Register To Post  

STDOUT per thread (SOLVED)
Quite a regular
Quite a regular


See User information
Given a program that creates mutliple threads and each of those threads writes to STDOUT and if we have a wrapper script that does something like:
myprog stdout

Only the "parent" thread will write results to the file named "stdout". The created thread's stdout is not sent to "stdout".

I get that there are no such thing as threads in AmigaOS4. It is just a separate process.

Is there a workaround for this? Should this be something that we fix?

When running the executable, standalone, the effective results are fine. But for the script, this is not the case.

===
Test file: STDOUT.lha

FTP: tellusregio.duckdns.org
PORT: 32463
Anonymous login

Run: run_test_22_ThreadLocalStorage_clib4_STATIC.script


Edited by rjd324 on 2024/12/31 0:12:52
Edited by rjd324 on 2025/1/1 3:58:49
Go to top
Re: STDOUT per thread
Home away from home
Home away from home


See User information
@rjd324
Did you try if it works with the AmigaOS 4.x C library?

If it does it's a bug in clib4 which has to be fixed.
I wouldn't be surprised at all if clib4 still includes some of the known to be broken I/O code from clib2.

If it doesn't work with newlib either, which would be strange, you may have to open the file in shared instead of exclusive mode, i.e.
myprog >> stdout

Go to top
Re: STDOUT per thread (SOLVED)
Quite a regular
Quite a regular


See User information
Right. It is something that needs fixing in CLIB4.

Regards,

Go to top

  Register To Post

 




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



Polls
Running AmigaOS 4 on?
AmigaOne SE/XE or microA1
Pegasos2
X5000
X1000
A1222
Sam 440/460
Classic PowerPC Amiga
WinUAE emulation
Qemu emulation
Total Votes: 186
The poll will close at 2025/12/1 12:00
4 Comments


Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project