I noticed that when I executed any SDL program I made on windows, two files
appeared : stderr.txt and stdout.txt.
I guess it’s due to the lack of STDERR and STDOUT streams on windows. But is
there a way to avoid such files to be created if they don’t need to (I mean
that they’re void) ?
I noticed that when I executed any SDL program I made on windows, two files
appeared : stderr.txt and stdout.txt.
I guess it’s due to the lack of STDERR and STDOUT streams on windows. But is
there a way to avoid such files to be created if they don’t need to (I mean
that they’re void) ?
How about if they are deleted on program exit if they are empty?
See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software
Well, you should recompile sdlmain library and remove creation of those
files in sdlmain.c (i guess it was so named).
KovacsOn Fri, 8 Sep 2000, Julien Olivier wrote:
I noticed that when I executed any SDL program I made on windows, two files
appeared : stderr.txt and stdout.txt.
I guess it’s due to the lack of STDERR and STDOUT streams on windows. But is
there a way to avoid such files to be created if they don’t need to (I mean
that they’re void) ?
At 07:59 8/09/2000 Friday, you wrote:
I noticed that when I executed any SDL program I made on windows, two files
appeared : stderr.txt and stdout.txt.
I guess it’s due to the lack of STDERR and STDOUT streams on windows. But is
there a way to avoid such files to be created if they don’t need to (I mean
that they’re void) ?How about if they are deleted on program exit if they are empty?
Any chance of moving the following defines in SDL_main.c
/* The standard output files */
#define STDOUT_FILE "stdout.txt"
#define STDERR_FILE "stderr.txt"
into SDL_main_h to make make your suggested solution easier to maintain.
-dv
yes, I think that removing them if they’re empty is the best solution.
More over, I don’t think it’s difficult at all :]
“Sam Lantinga” a ?crit dans le message
news:…
I noticed that when I executed any SDL program I made on windows,
two filesappeared : stderr.txt and stdout.txt.
I guess it’s due to the lack of STDERR and STDOUT streams on
windows. But isthere a way to avoid such files to be created if they don’t need to
(I mean> > that they’re void) ?How about if they are deleted on program exit if they are empty?
See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software
yes, I think that removing them if they’re empty is the best solution.
More over, I don’t think it’s difficult at all :]
Actually it is. SDL doesn’t have any control over the program as it
exits. Perhaps this can be done in SDL_Quit()…
-Sam Lantinga, Lead Programmer, Loki Entertainment Software
yes, I think that removing them if they’re empty is the best solution.
More over, I don’t think it’s difficult at all :]Actually it is. SDL doesn’t have any control over the program as it
exits. Perhaps this can be done in SDL_Quit()…
Whouldn’t it be better if it’s done in WinMain() since they are created
there anyway?
yes, I think that removing them if they’re empty is the best solution.
More over, I don’t think it’s difficult at all :]Actually it is. SDL doesn’t have any control over the program as it
exits. Perhaps this can be done in SDL_Quit()…
Whouldn’t it be better if it’s done in WinMain() since they are created
there anyway?
exit() doesn’t return to WinMain()
-Sam Lantinga, Lead Programmer, Loki Entertainment Software
Whouldn’t it be better if it’s done in WinMain() since they are created
there anyway?exit() doesn’t return to WinMain()
Install a exit function with atexit. I’m using that very often.
Proff–
Florian ‘Proff’ Schulze - @Florian_Schulze
Member: TeamTNT - http://www.teamtnt.com
Homepage: - http://proff.fly.to
ICQ#: - 40510245
Whouldn’t it be better if it’s done in WinMain() since they are created
there anyway?exit() doesn’t return to WinMain()
Install a exit function with atexit. I’m using that very often.
It crashes the program when SDL is loaded dynamically and unloaded later.
atexit handlers should never be installed by a library for that reason,
and the fact that the order of handler calling is indeterminant.
See ya,
-Sam Lantinga, Lead Programmer, Loki Entertainment Software
It crashes the program when SDL is loaded dynamically and unloaded later.
atexit handlers should never be installed by a library for that reason,
and the fact that the order of handler calling is indeterminant.
Oh shi*, yes. I didn’t think of the library problem. Sorry.
Proff–
Florian ‘Proff’ Schulze - @Florian_Schulze
Member: TeamTNT - http://www.teamtnt.com
Homepage: - http://proff.fly.to
ICQ#: - 40510245
It crashes the program when SDL is loaded dynamically and unloaded later.
atexit handlers should never be installed by a library for that reason,
and the fact that the order of handler calling is indeterminant.Oh shi*, yes. I didn’t think of the library problem. Sorry.
Unless you make it a part of the staticly linked WinMain, wich I think
it should be since this is a Windows-only problem (is it not?)
Of course there is still the problem with the files already being
closed when your handler is being calles.