summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
Commit message (Collapse)AuthorAgeFilesLines
* * select.cc (cygwin_select): Remove select_timeout test.Christopher Faylor2012-06-103-6/+9
| | | | | (select_stuff::wait): Return select_set_zero on timeout. (thread_socket): Report timeout when debugging.
* * include/elf.h: Update from FreeBSD.Yaakov Selkowitz2012-06-068-245/+1401
| | | | | | | | | | | | * include/machine/elf.h: New header, from FreeBSD. * include/sys/elf.h: Ditto. * include/sys/elf32.h: Update from FreeBSD. * include/sys/elf64.h: Ditto. * include/sys/elf_common.h: Ditto. (R_IA64_*): Define Linux-style names as aliases to R_IA_64_*. (R_SH_*): Define, based on sh-4 psABI. (R_390_*): Define, based on s390x psABI. * include/sys/elf_generic.h: Ditto.
* * fhandler_disk_file.cc (fhandler_disk_file::link ): TranslateCorinna Vinschen2012-06-042-1/+7
| | | | STATUS_NOT_SUPPORTED to EPERM as well.
* * dtable.cc (dtable::dup3): Only return with lock set when O_EXCL flag isChristopher Faylor2012-06-043-2/+16
| | | | | passed in. * syscalls.cc (dup_finish): Pass O_EXCL in flags to dtable::dup3.
* * DevNotes: Add entry cgf-000011.Christopher Faylor2012-06-037-20/+74
| | | | | | | | | | | | | | | | | | | * fhandler.h (fhandler_base::refcnt): Delete. (fhandler_base::inc_refcnt): New function. (fhandler_base::dec_refcnt): New function. * cygheap.h (cygheap_fdnew::~cygheap_fdnew): Accommodate split of refcnt to inc_refcnt/dec_refcnt. (cygheap_fdget::cygheap_fdget): Ditto. (cygheap_fdget::~cygheap_fdget::cygheap_fdget): Ditto. * dtable.cc (dtable::release): Ditto. (cygwin_attach_handle_to_fd): Ditto. (dtable::init_std_file_from_handle): Ditto. (dtable::dup3): On success, return with fdtab locked. * dtable.h (dtable): Add dup_finish as a friend. * syscalls.cc (dup_finish): Define new function. Increment refcnt while fdtab is locked. (dup2): Use common dup_finish() to perform dup operation. (dup3): Ditto.
* *** empty log message ***Corinna Vinschen2012-06-031-0/+2
|
* * globals.cc (ro_u_refs): New R/O unicode string.Corinna Vinschen2012-06-0310-23/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | * mount.cc (fs_info::update): Recognize ReFS. * mount.h (enum fs_info_type): Add refs. (class fs_info): Add refs flag and accessor methods. * ntdll.h (RtlAddAccessAllowedAceEx): Declare. (RtlAddAccessDeniedAceEx): Declare. * path.h (path_conv::fs_is_refs): Define. * sec_helper.cc (_recycler_sd): New function to create security descriptors suitable for the recycler bin starting with Vista. * security.cc (add_access_allowed_ace): Use RtlAddAccessAllowedAceEx and drop code to set AceFlags explicitely. (add_access_denied_ace): Use RtlAddAccessDeniedAceEx and drop code to set AceFlags explicitely. * security.h (_recycler_sd): Declare. (recycler_sd): Define. * syscalls.cc (desktop_ini): Change formatting. (desktop_ini_ext): Define third line of recycler desktop.ini file since Vista, (try_to_bin): Handle ReFS just like NTFS. Write Vista and later Recycler in all uppercase, just like shell32 does when recreating it. Fix comments to include ReFS. Don't implicitely reuse object attributes from earlier NtOpenFile call, rather recreate it for safety. Use recycler_sd call when creating security descriptor for Recycler dirs and files on Vista and later. Write third line of desktop.ini when on Vista and later.
* * winbase.h: Add missing copyright date.Christopher Faylor2012-06-032-1/+5
|
* * select.cc (cygwin_select): Make sure that we only return -1 as an errorChristopher Faylor2012-06-032-6/+17
| | | | | return. (select_stuff::wait): Semi-revert to previous method for filling out w4.
* * select.cc (cygwin_select): Add some comments.Christopher Faylor2012-06-032-8/+24
| | | | (select_stuff::wait): Ditto.
* * DevNotes: Add entry cgf-000010.Christopher Faylor2012-06-035-149/+216
| | | | | | | | | | | | | | | | * select.cc (set_handle_or_return_if_not_open): Remove unneeded final backslash from definition. (cygwin_select): Reorganize to incorporate outer retry loop. Move remaining time recalculation here for retry case. Use select_stuff::wait_states for loop control. (select_stuff::cleanup): Avoid unneeded initialization. (select_stuff::wait): Modify definition to return select_stuff::wait_states. Eliminate is_cancelable. Don't element 1 of an array if it is a cancel handle. Remove loop. Rely on being called from enclosing loop in cygwin_select. Remove time recalculation when restarting. Try harder to always return from the bottom. * select.h (select_stuff::wait_state): New enum. (select_stuff::wait): Modify declaration to return select_stuff::wait_states.
* * exceptions.cc (setup_handler): Make debugging output a little more verbose.Christopher Faylor2012-06-032-1/+6
|
* * cygtls.h (_cygtls::protect_linked_list): Delete unused field.Christopher Faylor2012-06-022-1/+4
|
* * hookapi.cc (find_first_notloaded_dll): Extend comment. Fix usage ofCorinna Vinschen2012-05-303-9/+23
| | | | | | | | mapped memory. Shorten static library name buffer to MAX_PATH. Use strlcpy to copy library name to buffer. Only Unmap "map" if it has been Mapped before. * pinfo.cc (status_exit): Drop unneeded declaration of find_first_notloaded_dll in favor of the declaration in winsup.h.
* * thread.cc: Remove temporary newlib workaround, now that newlibCorinna Vinschen2012-05-302-85/+12
| | | | | | | | | | handles thread cancellation by itself. (class __cygwin_lock_handler): Remove. (__cygwin_lock_cleanup): Remove. (__cygwin_lock_lock): Revert newlib workaround, (__cygwin_lock_trylock): Ditto. (__cygwin_lock_unlock): Ditto. (pthread::pop_cleanup_handler): Ditto.
* * select.cc (select_stuff::wait): Temporarily disable restartingCorinna Vinschen2012-05-292-3/+14
| | | | entirely.
* * security.h (cygsidlist::+=): Correctly copy well_known_sid info fromCorinna Vinschen2012-05-292-3/+11
| | | | source cygsid.
* * registry.cc (reg_key::build_reg): Fix typo in debug output.Corinna Vinschen2012-05-252-1/+5
|
* * select.cc (select_stuff::wait): When not returning after receivingCorinna Vinschen2012-05-252-4/+16
| | | | | a signal, recalculate timeout. Apply temporary fix to avoid crashes after calling the signal handler. Explain.
* * fhandler_serial.cc (fhandler_serial::raw_read): Check forCorinna Vinschen2012-05-252-1/+6
| | | | ERROR_OPERATION_ABORTED rather than ERROR_IO_INCOMPLETE after CancelIo.
* * fhandler_serial.cc (fhandler_serial::raw_read): Just call ReadFileCorinna Vinschen2012-05-252-12/+14
| | | | directly in case of non-blocking I/O and handle result gracefully.
* * thread.cc (__cygwin_lock_lock): Replace null thread check with testCorinna Vinschen2012-05-242-14/+21
| | | | | | for cygwin_finished_initializing to handle process startup. (__cygwin_lock_trylock): Ditto. (__cygwin_lock_unlock): Ditto.
* * thread.cc (__cygwin_lock_lock): Take null thread at process startupCorinna Vinschen2012-05-232-11/+28
| | | | | | into account. (__cygwin_lock_trylock): Ditto. (__cygwin_lock_unlock): Ditto.
* * thread.cc (pthread::cancel): Re-allow asynchronous cancellation fromCorinna Vinschen2012-05-232-26/+17
| | | | Cygwin code since it looks like the problem is Windows only.
* * thread.cc: Add a temporary workaround to help Cygwin along whileCorinna Vinschen2012-05-232-1/+89
| | | | | | | | | | | | | newlib doesn't install cleanup handlers. Explain the problem. (class __cygwin_lock_handler): New class. (__cygwin_lock_cleanup): New function. (__cygwin_lock_lock): Push __cygwin_lock_cleanup thread cleanup handler. (__cygwin_lock_trylock): Ditto. (__cygwin_lock_unlock): Pop thread cleanup handler. (pthread::pop_cleanup_handler): Temporarily allow cleanup function to destroy cleanup handler so we can pop in another function than we pushed in.
* * thread.cc (pthread::cancel): Only allow asynchronous cancellationCorinna Vinschen2012-05-232-2/+26
| | | | if the thread is not executing Cygwin or Windows code. Explain why.
* * thread.cc (pthread::precreate): Make sure mutex is recursive.Corinna Vinschen2012-05-232-2/+17
| | | | Explain why.
* * thread.cc (pthread::pop_cleanup_handler): Move setting the cancelstateCorinna Vinschen2012-05-232-3/+10
| | | | | | to PTHREAD_CANCEL_DISABLE from here... (pthread::pop_all_cleanup_handlers): ...to here, otherwise any explicit call to pthread_cleanup_pop disables cancellation for this thread.
* * fhandler.h (refcnt): Add i interlocked. Explain why.Corinna Vinschen2012-05-233-2/+29
| | | | | * winbase.h (ilockadd): New function. (InterlockedAdd): Define as ilockadd.
* * devices.in: Fix native name of /dev/kmem.Corinna Vinschen2012-05-225-4/+14
| | | | | | | | * devices.cc: Regenerate. * dtable.cc (fh_alloc): Don't forget FH_KMEM. * fhandler_mem.cc (fhandler_dev_mem::open): Set errno to EACCES rather than ENOENT on systems not granting access to physical memory from user space.
* * thread.cc (pthread::cancel): Set thread's cancel_event inCorinna Vinschen2012-05-222-0/+17
| | | | PTHREAD_CANCEL_ASYNCHRONOUS case, too. Explain why.
* * strace.cc (strace::activate): Move printing heap size from here...Corinna Vinschen2012-05-213-5/+16
| | | | | * heap.cc (heap_init_info): ...to here. Explain why. Print heap size in hex and decimal.
* *** empty log message ***Corinna Vinschen2012-05-211-0/+6
|
* * net.cc (cygwin_recvfrom): Don't shortcircuit if len == 0. Add commentCorinna Vinschen2012-05-212-3/+22
| | | | | | to explain why. (cygwin_recv): Ditto. (cygwin_recvmsg): Ditto.
* * fhandler_disk_file.cc (path_conv::isgood_inode): Rearrange, takeCorinna Vinschen2012-05-212-5/+25
| | | | Samba versions >= 3.5.4 into account, add comments.
* * DevNotes: Add entry cgf-000009.Christopher Faylor2012-05-173-30/+28
| | | | | | * smallprint.cc (__small_vsprintf): Always treat '%c' and '%C' as characters. Don't decode them if they are > 127. (__small_vswprintf): Ditto.
* * DevNotes: Add entry cgf-000008.Christopher Faylor2012-05-164-8/+53
| | | | | * fhandler_tty.cc (bytes_available): Simplify by returning the number of bytes available in the message unless that is zero.
* * child_info.h (CURR_CHILD_INFO_MAGIC): Update.Christopher Faylor2012-05-142-1/+5
|
* * DevNotes: Add entry cgf-000007.Christopher Faylor2012-05-146-3/+52
| | | | | | | | | * child_info.h (child_info_spawn::parent_winpid): Declare new field. (child_info_spawn::get_parent_handle): Declare new function. * dcrt0.cc (child_info_spawn::get_parent_handle): Define new function. (child_info_spawn::handle_spawn): Recreate parent handle if possible when dynamically loaded. Don't mess with parent handle if it's NULL. * spawn.cc (child_info_spawn::worker): Set parent_winpid appropriately.
* * DevNotes: Add entry cgf-000006.Christopher Faylor2012-05-124-0/+25
| | | | | * thread.cc (pthread::pop_cleanup_handler): Set cancel state to disabled to avoid recursively waiting for cancel.
* * DevNotes: Add entry cgf-000005.Christopher Faylor2012-05-125-6/+41
| | | | | | | * fhandler.h (PIPE_ADD_PID): Redefine to something we actually DON'T use. * pipe.cc (fhandler_pipe::create): Avoid clearing all open_mode bits when checking for PIPE_ADD_PID. Properly keep track of len so that passed in name is not overwritten.
* *** empty log message ***Corinna Vinschen2012-05-101-0/+4
|
* * cygwin.din (memrchr): Export.Corinna Vinschen2012-05-104-1/+10
| | | | | * posix.sgml (std-gnu): Add memrchr. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
* * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 16.Corinna Vinschen2012-05-102-1/+5
|
* Add url for reported mailing list problemChristopher Faylor2012-05-081-2/+4
|
* * DevNotes: Add entry cgf-000004.Christopher Faylor2012-05-085-8/+60
| | | | | | | | * pinfo.cc (pinfo::init): Reuse shared memory if the state is marked with PID_REAPED. * spawn.cc (child_info_spawn::worker): Don't duplicate myself_pinfo into non-cygwin child. * fork.cc (frok::parent): Improve error output.
* Add additional observation to cgf-000003Christopher Faylor2012-05-071-1/+3
|
* * DevNotes: Add entry cgf-000003.Christopher Faylor2012-05-077-24/+110
| | | | | | | | | | | | | * cygheap.h (init_cygheap::pid_handle): Delete. * dcrt0.cc (child_info_spawn::handle_spawn): Keep parent open if we have execed. * pinfo.cc (pinfo::thisproc): Remove pid_handle manipulations. (pinfo::init): Don't consider a reaped process to be available. * spawn.cc (child_info_spawn::worker): Remove pid_handle manipulations. Make wr_proc_pipe and parent noninheritable when starting a program which doesn't use the Cygwin DLL. Conditionally reset wr_proc_pipe to inheritable if CreateProcess fails. Inject wr_proc_pipe handle into non-Cygwin process. Consider a non-cygwin process to be 'synced'.
* *** empty log message ***Corinna Vinschen2012-05-061-0/+24
|
* * DevNotes: Add entry cgf-000002.Christopher Faylor2012-05-043-2/+53
| | | | | | * fhandler_tty.cc (bytes_available): Revert to previous Oct-2011 behavior where a dummy buffer is used to determine how many bytes will be read. (fhandler_pty_master::ioctl): Correct coercion in assignment.