>> An fprintf returning 0 is a suspicious event; it's easy to imagine >> cases where it makes sense, but I don't think I have ever coded one. >> Probably > N (where N is the smallest reasonable output, defaulting >> to 1) may be a better test in real code. > On older systems fprintf returns 0 on success and EOF on failure. The books I have all recommend testing for "a negative return value" to detect printf errors. The C standard also specifies "a negative value" for errors --- it is not guaranteed that that value is EOF. regards, tom lane
- [HACKERS] RE: [GENERAL] pg_dump return status.. Matthew
- Re: [HACKERS] RE: [GENERAL] pg_dump return status.. Philip Warner
- [HACKERS] Re: [GENERAL] pg_dump return status.. Tom Lane
- Re: [HACKERS] Re: [GENERAL] pg_dump return statu... Philip Warner
- Re: [HACKERS] Re: [GENERAL] pg_dump return s... Tom Lane
- Re: [HACKERS] pg_dump return status.. Ian Lance Taylor
- Re: [HACKERS] pg_dump return status.. Pete Forman
- Re: [HACKERS] pg_dump return status... Philip Warner
- Re: [HACKERS] pg_dump return st... Pete Forman
- Re: [HACKERS] pg_dump retur... Tom Lane
- Re: [HACKERS] pg_dump return status... Bruce Momjian