* gioenums.h: Add a G_IO_ERROR_TOO_MANY_OPEN_FILES error code.
Requested by Olivier Sessink.
* gioerror.c: Translate EMFILE to G_IO_ERROR_TOO_MANY_OPEN_FILES.
* glocalfileenumerator.c: Translate G_FILE_ERROR_MFILE to
G_IO_ERROR_TOO_MANY_OPEN_FILES.
svn path=/trunk/; revision=7782
+2009-01-07 Matthias Clasen <mclasen@redhat.com>
+
+ Bug 566770 – error code 0 for Too many open files is useless
+
+ * gioenums.h: Add a G_IO_ERROR_TOO_MANY_OPEN_FILES error code.
+ Requested by Olivier Sessink.
+
+ * gioerror.c: Translate EMFILE to G_IO_ERROR_TOO_MANY_OPEN_FILES.
+
+ * glocalfileenumerator.c: Translate G_FILE_ERROR_MFILE to
+ G_IO_ERROR_TOO_MANY_OPEN_FILES.
+
2009-01-05 Matthias Clasen <mclasen@redhat.com>
* === Released 2.19.4 ===
* #GDesktopAppInfo is an implementation of #GAppInfo based on
* desktop files.
*
- * Note that GDesktopAppInfo belongs to the UNIX-specific GIO interfaces,
- * thus you have to use the <filename>gio-unix-2.0.pc</filename> pkg-config
- * file when using it.
+ * Note that <filename><gio/gdesktopappinfo.h></filename> belongs to
+ * the UNIX-specific GIO interfaces, thus you have to use the
+ * <filename>gio-unix-2.0.pc</filename> pkg-config file when using it.
*/
#define DEFAULT_APPLICATIONS_GROUP "Default Applications"
* @G_IO_ERROR_WOULD_BLOCK: Operation would block.
* @G_IO_ERROR_HOST_NOT_FOUND: Host couldn't be found (remote operations).
* @G_IO_ERROR_WOULD_MERGE: Operation would merge files.
- * @G_IO_ERROR_FAILED_HANDLED: Operation failed and a helper program has already interacted with the user. Do not display any error dialog.
+ * @G_IO_ERROR_FAILED_HANDLED: Operation failed and a helper program has
+ * already interacted with the user. Do not display any error dialog.
+ * @G_IO_ERROR_TOO_MANY_OPEN_FILES: The current process has too many files
+ * open and can't open any more. Duplicate descriptors do count toward
+ * this limit. Since 2.20
*
* Error codes returned by GIO functions.
*
G_IO_ERROR_WOULD_BLOCK,
G_IO_ERROR_HOST_NOT_FOUND,
G_IO_ERROR_WOULD_MERGE,
- G_IO_ERROR_FAILED_HANDLED
+ G_IO_ERROR_FAILED_HANDLED,
+ G_IO_ERROR_TOO_MANY_OPEN_FILES
} GIOErrorEnum;
return G_IO_ERROR_WOULD_BLOCK;
break;
#endif
-
+
+#ifdef EMFILE
+ case EMFILE:
+ return G_IO_ERROR_TOO_MANY_OPEN_FILES;
+ break;
+#endif
+
default:
return G_IO_ERROR_FAILED;
break;
case G_FILE_ERROR_NOTDIR:
new_code = G_IO_ERROR_NOT_DIRECTORY;
break;
+ case G_FILE_ERROR_MFILE:
+ new_code = G_IO_ERROR_TOO_MANY_OPEN_FILES;
+ break;
default:
break;
}