-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bruno Haible wrote:

| Derek Price wrote:
|
|> Should this error still be exiting (EXIT_FAILURE) when this
|> function is defined to return NULL on failure?
|
|
| In this case the error is not "memory exhausted", it is "cannot
| open /dev/zero". This can happen for example if someone is working
| in a chroot environment that is incorrectly set up. I think a clear
| error message is good in this case. But I agree it's hard to say in
| advance which behaviour is better.


It could print the error message with error (0, errno, ...) and then return NULL. The caller could then decide if that error should be fatal or not, as I presume they might wish to if they are calling pagealign_alloc() as opposed to pagealign_xalloc().

Regards,

Derek
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCJ188LD1OTBfyMaQRAisLAKCjzfZm7V5uPkRIXQ3ILJSLhHIHRwCgkNSz
qL4MjglKCWi/7OEocliSR28=
=ubwl
-----END PGP SIGNATURE-----




_______________________________________________ Bug-cvs mailing list Bug-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/bug-cvs

Reply via email to