2004-06-10 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mono / io-layer / ChangeLog
index 0886c9d818fa4a0ed37055df0dc507f47218e245..77087d9c149b8c9a97f2cfc72d01c6858ae16c55 100644 (file)
@@ -1,3 +1,414 @@
+2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
+
+       * threads.c: Implemented SleepEx.
+       * threads.h: Fixed SleepEx signature.
+
+2004-06-03  Miguel de Icaza  <miguel@ximian.com>
+
+       * threads.c: When running under valgrind, do not allocate too much
+       stack, as Valgrind default is 1 meg.
+
+2004-05-27  Dick Porter  <dick@ximian.com>
+
+       * io.h:
+       * io.c: Implemented LockFile() and UnlockFile()
+
+2004-05-21  Dick Porter  <dick@ximian.com>
+
+       * io.c (CreateFile): Check for existing share modes when opening
+       a file.
+
+       * handles.c: 
+       * handles-private.h: 
+       * daemon-messages.h: 
+       * daemon.c: Maintain a hash of file share modes, keying on device
+       and inode (to cope with symlinks.)
+
+2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
+
+       * daemon-messages.c: Retry if the communication with the daemon is
+         interrupted by a signal.
+       * io.c, sockets.c: Check for EINTR in every syscall that can be interrumped. 
+         Only return an error in this case if there is something in the apc queue
+         (which means that it is an interruption requested by the "user").
+       * processes.c: Use WaitForSingleObjectEx. No need to pass "alertable" as
+         true since the wait is small.
+       * shared.c: Retry write calls when interrumped by a signal.
+       * timed-thread.h, timed-thread.c: added _wapi_thread_apc_pending, which
+         returns TRUE if there are pending asynchronous calls (APC) for the
+         provided thread. Also added _wapi_thread_dispatch_apc_queue which calls
+         the enqueued APCs. Defined a new struct ApcInfo that holds information
+         about an enqueued APC.
+       * thread-private.h, threads.c: Implemented QueueUserAPC (which does the same
+         as in win32),_wapi_thread_apc_pending and _wapi_thread_dispatch_apc_queue. 
+         These last two methods call the corresponding apc methods in 
+         thread-private using the provided thread handle.
+       * threads.h: Added QueueUserAPC.
+       * uglify.h: Added WapiApcProc (needed by QueueUserAPC).
+       * wait.c, wait.h: Changed WaitForSingleObject to WaitForSingleObjectEx, and
+         WaitForMultipleObjects to WaitForMultipleObjectsEx. Implemented support
+         for APCs in those two methods and also in SleepEx.
+
+2004-05-17  Dick Porter  <dick@ximian.com>
+
+       * io.c (CopyFile): Speed up.  Fixes bug 57859.
+
+2004-05-13  Dick Porter  <dick@ximian.com>
+       * mono-mutex.c (mono_mutex_unlock): Return EPERM when the current
+       thread doesn't own the mutex, rather than assert()ing.
+
+2004-05-11  Dick Porter  <dick@ximian.com>
+
+       * shared.c (_wapi_shm_attach): Cope when a previous daemon startup
+       attempt failed, leaving shared files that look like a daemon is
+       still starting.
+
+2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * io.c:
+       (SetFileAttributes): don't the the exec bit if the corresponding read
+       bit is not set.
+
+2004-05-10  Zoltan Varga  <vargaz@freemail.hu>
+
+       * io.c (FindFirstFile): Fix invalid free.
+
+2004-05-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * io.c: translate from GFileError to errno codes and don't free
+       variables right after calling mono_io_scandir, as we may overwrite
+       errno value.
+
+2004-05-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * io.c: g_dir_open return ENOENT for directories on which we don't have
+       read/execute permission, while returning EPERM for anything below those.
+       So, change ENOENT by EPERM if the directory exists.
+
+2004-05-07  Dick Porter  <dick@ximian.com>
+
+       * io.c (SetFileAttributes): Don't have failed chmod()s cause a
+       "file not found" error.  Fixes bug 54032.
+       
+2004-05-07  Dick Porter  <dick@ximian.com>
+
+       * io.c (FindFirstFile): Comment out a windows-compatibility check
+       that breaks when directories have metachars in their names.
+       Workaround for bug 58116.
+
+2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * io.c: fixed for FindFirstFile for empty directories. Closes
+       bug #58147.
+
+2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * processes.c: set the start time for the current process. Fixes bug
+       #58109.
+
+2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * io-private.h: 'namelist' is now a gchar ** in _WapiHandlePrivate_find.
+       * io.c: implemented scandir using glib functions.
+
+2004-05-04  Dick Porter  <dick@ximian.com>
+
+       * daemon.c (read_message): Return FALSE on error so the GSource
+       callback itself can return FALSE.  Cures the infinite loop poll()
+       warning on MacosX.
+       * shared.c: Fix some daemon startup race conditions.
+
+2004-04-29  Miguel de Icaza  <miguel@ximian.com>
+
+       * io.c (CopyFile): Use 32k buffers to copy the file instead of 2k,
+       use the stack, do not use dynamic memory.
+
+2004-04-29  Zoltan Varga  <vargaz@freemail.hu>
+
+       * io.c: Add scandir implementation for platforms which do not have
+       it, like solaris.
+
+2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * io.[ch]: implemented GetLogicalDriveStrings.
+
+2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * io.c:
+       * sockets.c: use the field name from configure when accessing sigval
+       pointer field. Makes this work on the Mac.
+
+2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
+
+       * atomic.c: (InterlockedExchange) fix typo for
+       mutex name
+
+2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * io.c:
+       * sockets.c: added check for sys/aio.h.
+
+2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * error.[ch]: added _wapi_get_win32_file_error...
+       * io.c: ... which was _wapi_get_win32_error here.
+       * sockets.c: rename the function calls here too.
+
+2004-04-28  Dick Porter  <dick@ximian.com>
+
+       * daemon-messages.c: Avoid a deadlock when a thread is killed while
+       waiting for the daemon by using a recursive mutex.  Helps bug 56699.
+
+2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * io.c: fixed leak in async_notifier().
+
+       * sockets.[ch]: added AIO support for sockets and fixed WSAIoctl
+       declaration.
+
+       * threads.c: removed old comment.
+
+2004-04-26  David Waite  <mass@akuma.org>
+
+       * daemon-messages.h:
+       * daemon-private.h
+       * error.h:
+       * io.h:
+       * processes.h:
+       * shared.h:
+       * thread-private.h:
+       * wapi-private.h: remove comma from end of enumeration declarations
+       * status.h: cast unsigned int types to int for enum assignment
+
+2004-04-26 David Waite <mass@akuma.org>
+
+       * io.c:
+       * timefuncs.c: declare 64-bit constants as long long types (i.e.
+       10ULL)
+
+2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * socket-wrappers.h: _wapi_socket == WSASocket now. Added
+       WSA_FLAG_OVERLAPPED.
+
+       * sockets.c: new unused parameters for _wapi_socket.
+
+2004-04-22  Miguel de Icaza  <miguel@ximian.com>
+
+       * timed-thread.c: Replace sem_init with MONO_SEM_INIT to handle
+       the fact that MacOS X is a piece of junk (sem_init is *defined* in
+       the libc, but they return `not implemented'). 
+
+2004-04-22  Dick Porter  <dick@ximian.com>
+
+       * handles.c: 
+       * handles-private.h: Reference the handle when it is locked, so
+       that another thread can't blow it away while we're waiting for it
+       to become signalled.
+       
+       * wait.c: 
+       * timed-thread.c: 
+       * threads.c: 
+       * sockets.c: 
+       * semaphores.c: 
+       * mutexes.c: 
+       * mono-mutex.c: 
+       * io.c: 
+       * handles.c: 
+       * handles-private.h: 
+       * events.c: 
+       * error.c: 
+       * daemon-messages.c: 
+       * critical-sections.c: 
+       * atomic.c: Added pthreads cleanup handlers and error asserts
+
+       * shared.c: 
+       * handles.c: Fixed the gcc "variable might be used uninitialised"
+       warnings.  They can't happen, but gcc doesn't know that
+       g_assert()s don't return.
+
+       Fixed the declaration of _wapi_handle_process_kill() so that it
+       expects the correct type for the pid.
+       
+       * threads.c: Removed the TLS_PTHREAD_MUTEX style locking that
+       hasn't been used in ages and just made the code more complex.
+
+2004-04-17  Zoltan Varga  <vargaz@freemail.hu>
+
+       * processes.c: Include <signal.h> for SIGKILL and SIGILL + fix some
+       warnings. Fixes #57168.
+
+2004-04-16  Dick Porter  <dick@ximian.com>
+
+       * threads.c (Sleep): Using div(3) with a negative (when signed)
+       numerator causes the quotient to be 0 and the remainder to be the
+       numerator.  This feeds a small negative value to nanosleep(3),
+       which will return immediately and cause a busy wait.  Fixes bug
+       56351.
+
+2004-04-15  Dick Porter  <dick@ximian.com>
+
+       * io-private.h:
+       * io.c: Rewrite FindFirstFile and FindNextFile using scandir(3)
+       and fnmatch(3) instead of glob(3).  glob() can't cope with being
+       given filenames containing metachars.  This fixes bug 40557.
+
+2004-04-14  Bernie Solomon  <bernard@ugsolutions.com>
+
+       * security.c: #warning is a GCC-ism
+
+2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * security.c: Removed GetUserName as glib g_get_user_name does a
+       better (portability) job. Added ImpersonateLoggedOnUser and
+       RevertToSelf.
+
+2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * mono-mutex.h: move pthread_mutex_timedlock declaration to...
+       * mono-mutex.c: ...here. It was causing a warning that prevented
+       libgdiplus compilation.
+
+2004-04-04  Miguel de Icaza  <miguel@ximian.com>
+
+       * security.c (GetUserName): Make it work on MacOS X
+
+2004-04-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * security.c: use getpwuid_r if available. This one is thread-safe.
+
+2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * Makefile.am: Added security.c|h.
+       * security.c: New file for security related functions. Added function
+       GetUserName to fix #56144.
+       * security.h: New. Header file for security.c
+       * wapi.h: Added include for security.h
+
+2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * daemon-messages.h: added kill structs.
+
+       * daemon.c: implemented process_process_kill.
+       * handles-private.h:  define process_process_kill.
+       * handles.c: implemented _wapi_handle_process_kill.
+       * processes.[ch]: implemented TerminateProcess.
+
+2004-03-25  Bernie Solomon  <bernard@ugsolutions.com>
+
+       * daemon.c (rem_fd): On solaris you seem to get an
+       error even after removing the input source so don't
+       try and rem_fd it twice.
+
+2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
+
+       * daemon.c: in process_post_mortem, If the child terminated due to the 
+       receipt of a signal, the exit status must be based on WTERMSIG, since 
+       WEXITSTATUS returns 0 in this case.
+
+2004-03-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * daemon.c: turned a warning into a DEBUG statement. Now we may hit it.
+
+2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * daemon.c: only call getdtablesize () once.
+       * processes.c: wait 500 ms to check if execve failed and throw the same
+       exception as MS on failure. Fixes bug #32809.
+
+2004-03-17  Bernie Solomon  <bernard@ugsolutions.com>
+
+       * io.c (async_notifier): use "union sigval" rather
+       than sigval_t as Solaris doesn't have sigval_t
+       (which isn't in IEEE 1003.1 either).
+
+2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * io.c: added debug stuff and removed a few redundant lines in
+       file_write.
+
+2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * io-private.h: added new fields for file structure. Declare
+       _wapi_io_add_callback.
+
+       * io.c: added _wapi_get_win32_error, support aio_read/write in
+       file_read/write. Implemented _wapi_io_add_callback, which is where
+       BindHandle ends up.
+       
+       * io.h: added new fields for WapiOverlapped and typedef for the
+       callback.
+
+       * processes.c: fixed off-by-one bug when handling environment variables 
+       passed in.
+
+       * threads.[ch]: implemented BindIoCompletionCallback.
+
+       * uglify.h: added typedef for LPOVERLAPPED_COMPLETION_ROUTINE.
+
+2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
+
+       * socket-wrappers.h: Remove extra semicolon.
+
+2004-03-03  Dave Camp  <dave@ximian.com>
+
+       * daemon.c: (add_fd), (fd_activity), (_wapi_daemon_main):
+       Use a new main context.
+
+2004-03-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * io.c:
+       (GetFileAttributes): set the error depending on errno instead of
+       setting ERROR_FILE_NOT_FOUND always. See bug #55160.
+
+2004-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * io.c:
+       (CopyFile): free the buffer on error.
+       * sockets.c:
+       (WSAIoctl): free the buffer on error.
+
+2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * error.c: fixed mapping for EPROTONOSUPPORT and ESOCKTNOSUPPORT.
+
+       * sockets.[ch]: retry creating the socket for AF_INET, SOCK_RAW
+       using IP protocol with IP over IP. Implemented WSAIoctl UNIX-style.
+
+2004-01-27  Bernie Solomon  <bernard@ugsolutions.com>
+
+       * shared.c (_wapi_shm_file): add hostname
+       to shared data file names to handle NFS mounted
+       .wapi directories.
+
+Mon Jan 26 16:15:03 CET 2004 Paolo Molaro <lupus@ximian.com>
+
+       * sockets.h: remove obsolete soklen_t typedef.
+
+Fri Jan 23 21:07:02 CET 2004 Paolo Molaro <lupus@ximian.com>
+
+       * socket-wrappers.h, sockets.h, sockets.c, Makefile.am: move socket
+       wrappers to its own non-installed header file.
+
+2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * io.c:
+       (FindFirstFile): unlock the handle if FindNextFile fails.
+       (FindNextFile): g_free a couple of pointers before retrying.
+
+       * wait.c:
+       (WaitForMultipleObjects): if only one handle provided, use
+       WaitForSingleObject.
+
+2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
+
+       * handles-private.h: (_wapi_handle_type) check
+       for segment in range before using it
+
+2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
+
+       * thread-private.h: _wapi_thread_ops is now const
+       must match .c file.
 
 Mon Dec 22 18:29:03 CET 2003 Paolo Molaro <lupus@ximian.com>