Re: stdout not open?
From: Dan Pop (Dan.Pop_at_cern.ch)
Date: 10/08/04
- Next message: Dan Pop: "Re: What is a type?"
- Previous message: Christopher Benson-Manica: "Re: stdout not open?"
- In reply to: Randy Yates: "stdout not open?"
- Next in thread: Randy Yates: "Re: stdout not open?"
- Reply: Randy Yates: "Re: stdout not open?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 8 Oct 2004 13:54:26 GMT
In <xxplleiv4i4.fsf@usrts005.corpusers.net> Randy Yates <randy.yates@sonyericsson.com> writes:
>When I try
>
> fprintf(file, "Report of File %s\n", sMF->fileName);
>
>I get a core dump. This works fine if fprintf is changed to
>sprintf and a string buffer used instead as the first
>parameter.
>
>It looks like the standard descriptors are not really open.
Whenever you have such a suspicion, try to validate it with a trivial
program, like:
#include <stdio.h>
int main()
{
fprintf(stdout, "hello world\n");
return 0;
}
Translate and execute it *exactly* the same way you're translating and
executing your application.
If you get a core dump from this program, there is something very wrong
with your compilation/execution environment. If this program works fine,
then your problem is elsewhere.
Post a *minimal*, but complete program reproducing it and we may be
able to provide additional help.
Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Dan.Pop@ifh.de
Currently looking for a job in the European Union
- Next message: Dan Pop: "Re: What is a type?"
- Previous message: Christopher Benson-Manica: "Re: stdout not open?"
- In reply to: Randy Yates: "stdout not open?"
- Next in thread: Randy Yates: "Re: stdout not open?"
- Reply: Randy Yates: "Re: stdout not open?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]