Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
20 user(s) are online (13 user(s) are browsing Forums)

Members: 0
Guests: 20

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
Just can't stay away
Just can't stay away


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,

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top

  Register To Post

 




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




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project