#include <pthread.h>
#include <errno.h>
#include <unistd.h>
+#ifdef HAVE_SIGNAL_H
#include <signal.h>
+#endif
#include <string.h>
#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
int
wapi_getdtablesize (void)
{
-#ifdef HAVE_GETRLIMIT
- struct rlimit limit;
- int res;
-
- res = getrlimit (RLIMIT_NOFILE, &limit);
- g_assert (res == 0);
- return limit.rlim_cur;
-#else
- return getdtablesize ();
-#endif
+ return eg_getdtablesize ();
}
/*
_wapi_global_signal_mutex = &_WAPI_PRIVATE_HANDLES (GPOINTER_TO_UINT (_wapi_global_signal_handle)).signal_mutex;
wapi_processes_init ();
-
- /* Using atexit here instead of an explicit function call in
- * a cleanup routine lets us cope when a third-party library
- * calls exit (eg if an X client loses the connection to its
- * server.)
- */
- mono_atexit (handle_cleanup);
}
void
_wapi_error_cleanup ();
_wapi_thread_cleanup ();
wapi_processes_cleanup ();
+ handle_cleanup ();
}
static void _wapi_handle_init_shared (struct _WapiHandleShared *handle,
return s->inode;
}
-gboolean _wapi_handle_get_or_set_share (dev_t device, ino_t inode,
+gboolean _wapi_handle_get_or_set_share (guint64 device, guint64 inode,
guint32 new_sharemode,
guint32 new_access,
guint32 *old_sharemode,
void _wapi_handle_check_share (struct _WapiFileShare *share_info, int fd)
{
gboolean found = FALSE, proc_fds = FALSE;
- pid_t self = _wapi_getpid ();
- int pid;
int thr_ret, i;
/* Prevents entries from expiring under us if we remove this