On Sun, May 9, 2010 at 8:23 PM, Alexandre Julliard <julli...@winehq.org> wrote: > You can't print warnings from the server, they usually won't go where > you want them to.
That's unfortunate. The only remaining place to do that is in ntdll/FILE_CreateFile and check for status code STATUS_TOO_MANY_OPENED_FILES. We can't differentiate between ENFILE (the global open file limit was reached, given by fs.file-max sysctl) and EMFILE (RLIMIT_NOFILE was reached), but that wouldn't be a problem since ENFILE should be rare enough and there's also a KERN_INFO message to inform of that). Also, would it be ok to call getrlimit from ntdll, wrapped in a HAVE_SETRLIMIT ifdef (which is already used in libs/wine/loader.c)? Octavian