summaryrefslogtreecommitdiffstats
path: root/winsup
Commit message (Collapse)AuthorAgeFilesLines
...
* * devices.in (dev_cygdrive_storage): Revert mapping to \Device\Null.Corinna Vinschen2013-10-3112-79/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (dev_storage): Ditto for /dev. * devices.cc: Regenerate. * fhandler.cc (fhandler_base::open_null): New method to open a fake \Device\Null handler. (fhandler_base::open): Fix formatting. Change O_ACCMODE test to a switch statement. Simplify a test which still tested for a now unused create_disposition. * fhandler.h (fhandler_base::open_null): Declare. (fhandler_netdrive::close): Declare. * fhandler_dev.cc (fhandler_dev::open): Open fake \Device\Null handle by just calling new open_null method. * fhandler_disk_file.cc (fhandler_cygdrive::open): Ditto. * fhandler_netdrive.cc (fhandler_netdrive::open): Call open_null rather than setting nohandle. (fhandler_netdrive::close): New method. * fhandler_registry.cc (fetch_hkey): Fix token in RegOpenUserClassesRoot call. Create valid key for HKEY_CURRENT_CONFIG by mapping to real key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Hardware Profiles\Current. (fhandler_registry::open): Set nohandle only when using pseudo registry handle. * fhandler_virtual.cc (fhandler_virtual::opendir): Call open rather than just setting nohandle here. * fhandler_virtual::fstatvfs): Set ST_RDONLY fs flag. * globals.cc (ro_u_null): New readonly UNICODE_STRING for \Device\Null. * path.h (path_conv::set_path): Revert previous change caring for wide_path.
* *** empty log message ***Corinna Vinschen2013-10-301-0/+11
|
* * devices.in (dev_cygdrive_storage): Map to \Device\Null.Corinna Vinschen2013-10-3010-102/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (dev_storage): Map /dev and /dev/windows to \Device\Null. * devices.cc: Regenerate. * dir.cc (opendir): Create unique id. Explain why. * fhandler.h (fhandler_dev::get_dev): Implement inline. (fhandler_cygdrive::close): Drop declaration. (fhandler_cygdrive::get_dev): Implement inline. (fhandler_windows::get_hwnd): Ditto. (fhandler_windows::set_close_on_exec): Drop declaration. (fhandler_windows::fixup_after_fork): Ditto. * fhandler_dev.cc (fhandler_dev::open): Call fhandler_disk_file::open without O_CREAT flag. Explain why. Create \Device\Null handle if /dev/ doesn't actually exist. (fhandler_dev::close): Drop nohandle case. (fhandler_dev::fstatvfs): Drop nohandle check. Test for fs_got_fs instead. Set ST_RDONLY fs flag for simulated /dev. (fhandler_dev::opendir): If /dev doesn't exist, call open() to create fake \Device\Null handle. Don't set nohandle. Set dir_exists correctly. (fhandler_dev::rewinddir): Call fhandler_disk_file::rewinddir only if /dev is a real directory. * fhandler_disk_file.cc (fhandler_disk_file::opendir): If called for the cygdrive dir, call open() to create fake \Device\Null handle. Only attach __DIR_mounts buffer to dir if not called for cygdrive dir. Don't set nohandle. (fhandler_cygdrive::open): Create \Device\Null handle. (fhandler_cygdrive::close): Remove. (fhandler_cygdrive::fstatvfs): Set ST_RDONLY fs flag. * fhandler_windows.cc (fhandler_windows::open): Create \Device\Null handle. (fhandler_windows::read): Don't add io_handle to WFMO handle array. Change subsequent test for return value accordingly. Fix test for "message arrived". (fhandler_windows::set_close_on_exec): Remove. (fhandler_windows::fixup_after_fork): Remove. * path.h (path_conv::set_path): Make sure wide_path is NULL when setting a new path. * select.cc (peek_windows): Use correct hWnd value, not io_handle. (fhandler_windows::select_read): Don't use io_handle as wait object. (fhandler_windows::select_write): Ditto. (fhandler_windows::select_except): Ditto.
* *** empty log message ***Corinna Vinschen2013-10-281-3/+4
|
* * exception.h: Fold in content of include/exceptions.h.Corinna Vinschen2013-10-274-126/+107
| | | | * include/exceptions.h: Remove.
* * devices.in (dev_storage): Map /dev/dsp to \Device\Null.Corinna Vinschen2013-10-266-18/+32
| | | | | | | | | | | * devices.cc: Regenerate. * fhandler_dsp.cc (fhandler_dev_dsp::open): Call fhandler_base::open. (fhandler_dev_dsp::close): Call fhandler_base::close. (fhandler_dev_dsp::fixup_after_fork): Call fhandler_base::fixup_after_fork. * fhandler_raw.cc (fhandler_dev_raw::fixup_after_fork): Call fhandler_base::fixup_after_fork.
* * exception.h (_exception_list): Drop redefinition for x86_64.Corinna Vinschen2013-10-263-5/+11
| | | | | * include/exceptions.h: Disable content for x86_64 since it's not using frame based exception handling anymore.
* * flock.cc (fhandler_base::lock): Only refuse to lock nohandle andCorinna Vinschen2013-10-254-12/+26
| | | | | | | | old-style console devices when called to perform BSD flock locking. Add a FIXME to comment and align description. * ntdll.h (THREADINFOCLASS): Following MSDN, rename throughout from THREAD_INFORMATION_CLASS.
* * devices.in (dev_storage): Map /dev/clipboard to \Device\Null.Corinna Vinschen2013-10-256-28/+23
| | | | | | | | | | | * devices.cc: Regenerate. * fhandler.h (fhandler_dev_clipboard::open): Drop declaration. * fhandler_clipboard.cc (fhandler_dev_clipboard::dup): Drop call to open. Set private members to 0 and call fhandler_base::dup. (fhandler_dev_clipboard::open): Remove so that default fhandler_base::open is used to open \Device\Null. (set_clipboard): Drop gratuitios call to RegisterClipboardFormatW. (fhandler_dev_clipboard::close): Call fhandler_base::close from here.
* * fhandler_disk_file.cc (fhandler_base::fstat_fs): Fix comment.Corinna Vinschen2013-10-252-1/+5
|
* * fhandler_clipboard.cc (fhandler_dev_clipboard::open): Drop gratuitiosCorinna Vinschen2013-10-253-4/+13
| | | | | | handling of membuffer. It's NULL anyway. (fhandler_dev_clipboard::lseek): Set membuffer to NULL after freeing it to avoid subsequent crashes when accessing invalid pointer.
* * devices.in (dev_storage): Map /dev/random and /dev/urandom toCorinna Vinschen2013-10-257-46/+27
| | | | | | | | | | | | | | \Device\Null. * devices.cc: Regenerate. * fhandler.h (fhandler_dev_random::open): Drop declaration. (fhandler_dev_random::close): Ditto. (fhandler_dev_random::crypt_gen_random): Convert to static method. * fhandler_random.cc (fhandler_dev_random::open): Remove so that default fhandler_base::open is used to open \Device\Null. (fhandler_dev_random::close): Ditto. * fhandler_socket.cc (entropy_source): Delete. (fhandler_socket::af_local_set_secret): Remove entropy_source code and call fhandler_dev_random::crypt_gen_random directly instead.
* * fhandler.h (fhandler_dev_zero::lseek): Convert to inline method.Corinna Vinschen2013-10-246-46/+24
| | | | | | | | | | | | | (class fhandler_dev_random): Drop dummy_offset. (fhandler_dev_random::lseek): Convert to inline method. (fhandler_dev_dsp::lseek): Ditto. * fhandler_dsp.cc (fhandler_dev_dsp::lseek): Drop here. * fhandler_random.cc (fhandler_dev_random::open): Drop setting dummy_offset. (fhandler_dev_random::lseek): Drop here. * fhandler_tape.cc (fhandler_dev_tape::lseek): Make no-op, but keep old code for reference. * fhandler_zero.cc (fhandler_dev_zero::lseek): Drop here.
* * external.cc (fillout_pinfo): If start_time is 0, wait a while beforeChristopher Faylor2013-10-246-1/+28
| | | | | | | | | | returning the pinfo structure. * fhandler.cc (fhandler_base::open_setup): Convert from inline. * fhandler.h (fhandler_base::open_setup): Declare. * fhandler_console.cc (fhandler_console::open_setup): Always call fhandler_base::open_setup. * fhandler_tty.cc (fhandler_pty_slave::open_setup): Ditto. (fhandler_pty_master::open_setup): Ditto.
* Fix typo.Corinna Vinschen2013-10-241-1/+1
|
* * devices.in (dev_storage): Map /dev/zero and /dev/full to \Device\Null.Corinna Vinschen2013-10-2411-64/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * devices.cc: Regenerate. * dtable.h (struct dtable): Make fhandler_base friend, rather than fhandler_disk_file. * fhandler.cc (fhandler_base::open_with_arch): Create unique id. (fhandler_base::cleanup): Call del_my_locks. (fhandler_base::fcntl): Handle F_GETLK, F_SETLK and F_SETLKW. * fhandler.h (fhandler_base::get_dev): Return real device number. (fhandler_base::set_unique_id): New inline method. (fhandler_disk_file::lock): Drop declaration. (fhandler_disk_file::get_dev): New method, return pc.fs_serial_number. (fhandler_dev_zero::open): Drop declaration. * fhandler_disk_file.cc (fhandler_disk_file::close): Move del_my_locks call to fhandler_base::open_with_arch. (fhandler_disk_file::fcntl): Move handling of locking commands to fhandler_base::fcntl. (fhandler_base::open_fs): Drop call to NtAllocateLocallyUniqueId. * fhandler_zero.cc (fhandler_dev_zero::open): Remove so that default fhandler_base::open is used to open \Device\Null. * flock.cc (fixup_lockf_after_exec): Finding a single fhandler is enough here. (fhandler_base::lock): Replace fhandler_disk_file::lock. Refuse to lock nohandle devices. Handle read/write test using POSIX flags. Explain why. Never fail on SEEK_CUR or SEEK_END, rather assume position 0, just as Linux. * net.cc (fdsock): Create unique id.
* * include /cygwin/config.h (_READ_WRITE_BUFSIZE_TYPE): Define.Corinna Vinschen2013-10-232-0/+5
|
* * fhandler.cc (fhandler_base::fstat): Drop FH_FULL case to alignCorinna Vinschen2013-10-232-3/+5
| | | | /dev/full permissions to Linux.
* * fhandler.h (fhandler_base::cleanup): Mark as extern rather than inline.Christopher Faylor2013-10-224-1/+16
| | | | | | * fhandler_base.cc (fhandler_base::cleanup): Define. * fhandler_tty.cc (fhandler_pty_slave::cleanup): Call fhandler_base::cleanup. (fhandler_pty_master::cleanup): Ditto.
* .Christopher Faylor2013-10-191-0/+3
|
* * fhandler_termios.cc (tty_min::kill_pgrp): Don't send a signal to myself ifChristopher Faylor2013-10-182-1/+6
| | | | this process is exiting.
* * tty.cc (tty_list::allocate): Set sid to 0 rather than -1 since -1 is an errorChristopher Faylor2013-10-182-1/+6
| | | | condition.
* * fhandler_process.cc (format_process_ctty): Fix random content ofCorinna Vinschen2013-10-163-1/+15
| | | | | /proc/$PID/ctty if the process has no controlling tty. Set to just "\n" instead.
* *** empty log message ***Corinna Vinschen2013-10-151-0/+4
|
* * autoload.cc (CryptAcquireContextW): Remove.Corinna Vinschen2013-10-154-49/+62
| | | | | | | | | | | | | | | | | | | | (CryptGenRandom): Remove. (CryptReleaseContext): Remove. (SystemFunction036): Define. Add comment to explain that this is actually the RtlGenRandom function. * fhandler.h (class fhandler_dev_random): Drop crypt_prov member. (fhandler_dev_random::fhandler_dev_random): Define inline. (fhandler_dev_random::dup): Drop declaration. * fhandler_random.cc (fhandler_dev_random::fhandler_dev_random): Remove here. (fhandler_dev_random::crypt_gen_random): Use RtlGenRandom to drop dependency to old Crypto API. (fhandler_dev_random::read): Implement an enhanced version of reading random bytes from RtlGenRandom for the sake of a better /dev/random emulation. (fhandler_dev_random::close): Just return 0 since crypt_prov doesn't exisyt anymore. (fhandler_dev_random::dup): Drop entirely for the same reason.
* * mmap.cc (mmap64): Convert pagesize from DWORD to size_t to avoidCorinna Vinschen2013-10-152-1/+6
| | | | a rounding error for allocations beyond 4 Gigs.
* * ntdll.h: Guard against new header files.Christopher Faylor2013-10-052-0/+6
|
* * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 26.Christopher Faylor2013-09-252-1/+5
|
* * sigproc.h (hold_everything::ischild): Declare as reference.Christopher Faylor2013-09-253-2/+21
| | | | | (hold_everything::hold_everything): Store address of caller's notion of "ischild".
* * thread.cc (semaphore::_getvalue): Set *sval as appropriate. Set errno andChristopher Faylor2013-09-253-3/+19
| | | | return -1 on error.
* * dump_setup.cc (find_tar_ext): Generalize search for .tar extension, avoidingChristopher Faylor2013-09-162-9/+9
| | | | looking for specific compression types.
* * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Belatedly bumpCorinna Vinschen2013-08-312-1/+6
| | | | to 25.
* * heap.cc (RAISEHEAP_SIZE): New definition.Corinna Vinschen2013-08-312-6/+19
| | | | | | (user_heap_info::sbrk): Make failed commit an error condition again. Only reserve RAISEHEAP_SIZE sized chunk for further heap reservations by default.
* *** empty log message ***Corinna Vinschen2013-08-301-1/+3
|
* .Christopher Faylor2013-08-301-0/+4
|
* * cygheap.h (user_heap_info::sbrk): Declare new function.Christopher Faylor2013-08-304-70/+78
| | | | | | | | | | | | (user_heap_info::init): Ditto. * heap.cc (user_heap_info::init): Rename from heap_init(). Avoid explictly using cygheap->user_heap. (sbrk): Use user_heap_info method via cygheap->user_heap. (user_heap_info::sbrk): Renamed from sbrk(). Eliminate explicit use of cygheap->user_heap. Change some pointer arithmetic to use (char *) for consistency. * shared.cc (shared_info::initialize): Change heap_init call to cygheap->user_heap.init.
* *** empty log message ***Corinna Vinschen2013-08-301-0/+7
|
* * heap.cc (sbrk): Add a FIXME comment to VirtualFree call. Fix memoryCorinna Vinschen2013-08-301-18/+43
| | | | | | reservation and commit strategy when more memory is requested than available on the heap. Release newly reserved memory if commiting it fails. Add more comments to explain what we do.
* * fhandler_tape.cc (mtinfo_drive::open): Handle bus reset gracefullyCorinna Vinschen2013-08-302-1/+9
| | | | after opening the device.
* * sigproc.cc (pending_signals::add): Properly maintain linked list.Christopher Faylor2013-08-302-3/+9
| | | | (wait_sig): Use already calculated 'next' element when signal is blocked.
* * mtinfo.h (class mtinfo_part): Change type of block numbers to int64_t.Corinna Vinschen2013-08-263-29/+51
| | | | | | | | | | | | | | | | | | | (mtinfo_part::initialize): Ditto for nblock parameter in declaration. (class mtinfo_drive): Change type of block number to int64_t. Change all parameters indicating a block number to int64_t in method declarations. * fhandler_tape.cc (mtinfo_part::initialize): Ditto in definition. (mtinfo_drive::get_pos): Ditto. Replace low and high with a ULARGE_INTEGER and use it's components in call to GetTapePosition. Store full value in block. (mtinfo_drive::_set_pos): Change type of count parameter to int64_t. Change call to SetTapePosition accordingly. (mtinfo_drive::set_pos): Change type of count parameter to int64_t. Change local variables holding block numbers accordingly. (mtinfo_drive::get_status): Don't bail out early if fetching media parameters fails. (mtinfo_drive::ioctl): Add explicit cast matching receiving type in MTTELL and MTIOCPOS calls.
* * flock.cc (lockf_t::from_obj_name): Fix test for valid pid.Corinna Vinschen2013-08-232-1/+5
|
* * cygcheck.cc (package_grep): Accommodate arch-specific package layout.Christopher Faylor2013-08-232-2/+10
|
* cygwin changes:Christopher Faylor2013-08-235-19/+15
| | | | | | | | * spawn.cc (child_info_spawn): Revert previous change. Always set lpReserved2. * release/1.7.25: Change wording. doc changes: * new-features.xml (ov-new1.7.25): Change wording.
* * child_info.h (PROC_MAGIC_GENERIC): Define differently for x86 vs. x86_64.Christopher Faylor2013-08-232-1/+10
|
* * new-features.xml (ov-new1.7.25): Add new section.Corinna Vinschen2013-08-232-0/+24
|
* *** empty log message ***Corinna Vinschen2013-08-231-0/+5
|
* * path.h (enum path_types): Drop definition of PATH_64BITEXEC.Corinna Vinschen2013-08-233-15/+23
| | | | | | | | | (path_conv::iscygexec32): Drop unused inline function. (path_conv::iscygexec64): Ditto. (path_conv::set_cygexec): Remove unnecessary setting of PATH_64BITEXEC. * spawn.cc (child_info_spawn::worker): Disable setting of STARTUPINFOW::lpReserved2 and STARTUPINFOW::cbReserved2 for non-Cygwin child processes. Explain why.
* * fhandler_tape.cc (mtinfo_drive::create_partitions): Allow partitioningCorinna Vinschen2013-08-215-6/+30
| | | | | | | | | of drives supporting select partitions. (mtinfo_drive::get_status): Fill in current partition and number of partitions on tape into mt_resid. * include/cygwin/mtio.h (struct mtget): Align mt_resid comment to aforementioned change. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
* * fhandler_tape.cc (mtinfo_drive::create_partitions): Fix long-standingCorinna Vinschen2013-08-203-4/+31
| | | | | | | | bug disabling creation of two partitions on drives supporting initiator partitions. (mtinfo_drive::set_blocksize): Update media information after setting blocksize succeeded. (mtinfo_drive::get_status): Fetch fresh media information.