Commit Graph

2556 Commits

Author SHA1 Message Date
Christopher Faylor 3d65bb97e8 * child_info.h (CURR_CHILD_INFO_MAGIC): Update. 2004-09-12 18:10:15 +00:00
Christopher Faylor d584454c82 * exceptions.cc: (ctrl_c_handler): Do nothing while a Cygwin subprocess is
starting.
* child_info.h (init_child_info): Remove pid argument from declaration.
* cygheap.h (init_cygheap::pid): New element.
* dcrt0.cc (dll_crt0_0): Eliminate handling of now-noexistent cygpid parameter
in child_info struct.  Set forkee to 'true' rather than cygpid since the pid
value was never used.
(dll_crt0_1): Ditto.
(_dll_crt0): Ditto.
* fork.cc (fork_child): Don't wait for sigthread.  This is handled in the fork
call now.
(fork_parent): Remove obsolete pid argument from init_child_info call.  Don't
do anything special with cygpid when DEBUGGING.
(fork): Delay all signals during fork.
(fork_init): Don't do anything special when DEBUGGING.
* pinfo.cc (set_myself): Remove pid parameter.  Use new pid field in cygheap.
(pinfo_init): Don't pass pid argument to set_myself.
* sigproc.cc (sig_send): Wait for dwProcessId to be non-zero as well as
sendsig.
(init_child_info): Eliminate handling of pid.
(wait_sig): Implement method to temporarily hold off sending signals.
* sigproc.h (__SIGHOLD): New enum.
(__SIGNOHOLD): Ditto.
* spawn.cc (spawn_guts): Remove obsolete pid argument from init_child_info
call.
2004-09-12 03:47:57 +00:00
Corinna Vinschen d495ee9ff0 * fhandler.cc (fhandler_base::dup): Use debug_printf. 2004-09-10 08:34:37 +00:00
Corinna Vinschen 4875a4b66e * Makefile.in: Create libutil.a from bsdlib.o exports.
* bsdlib.cc (logwtmp): Move from syscalls.cc to here.
	(login): Ditto.
	(logout): Ditto.

	* winsup.h (EXPORT_ALIAS): New macro.
	* exec.cc: Define alias symbols using EXPORT_ALIAS macro.
	* syscalls.cc: Ditto.
	* times.cc: Ditto.
2004-09-10 08:30:51 +00:00
Corinna Vinschen 1f97020ae6 * fhandler_tape.cc (fhandler_dev_tape::open): Fix typo. 2004-09-09 11:35:15 +00:00
Corinna Vinschen 6423296840 * pipe.cc (create_selectable_pipe): Work around bug in Windows 95
where CreateNamedPipe returns NULL.
2004-09-09 08:58:44 +00:00
Pierre Humblet a456320915 2004-09-05 Pierre Humblet <pierre.humblet@ieee.org>
* cygheap.h (cwdstuff::drive_length): New member.
        (cwdstuff::get_drive): New method.
        * path.cc (normalize_win32_path): Simplify by using cwdstuff::get_drive.
        (mount_info::conv_to_win32_path): Use cwdstuff::get_drive as default for /.
        (cwdstuff::set): Initialize drive_length.
2004-09-07 23:26:28 +00:00
Christopher Faylor 6f7a746cee * cygtls.cc (_cygtls::init_thread): Set __sdidinit to negative value to
indicate that it is "special".
* thread.cc (pthread::exit): If __sdidinit is < 0, it was never really
initialized so reset it to 0 before calling _reclaim_reent.
2004-09-07 04:05:14 +00:00
Christopher Faylor dda37cd219 * include/cygwin/version.h: Bump DLL minor number to 12. 2004-09-05 16:08:44 +00:00
Corinna Vinschen eea5dd9707 * security.cc: Fix a few more strace_prints. 2004-09-03 08:18:41 +00:00
Christopher Faylor 0cd9f74fa5 Regularize most strace_prints throughout so that %E is always preceded by a
comma and elminate most uses of "foo = %s" to "foo %s".
2004-09-03 01:53:12 +00:00
Christopher Faylor 6644c628f5 Christopher Faylor <cgf@timesys.com>
* autoload.cc (NtQueryInformationFile): Return nonzero on error.
* ntdll.h (FILE_PIPE_LOCAL_INFORMATION): Add.
(NtQueryInformationFile): Fix types for last two arguments.
* pipe.cc: Include stdlib.h, limits.h, and ntdll.h.
(create_selectable_pipe): New function to create a pipe that can be used with
NtQueryInformationFile for select.
(fhandler_pipe::create): Call create_selectable_pipe instead of CreatePipe.
(pipe): Use DEFAULT_PIPEBUFSIZE as argument to create_pipe.
* select.cc: Include limits.h and ntdll.h.
(peek_pipe): Add select_printf output.  Call NtQueryInformationFile to
implement select for write on pipes.
(fhandler_pipe::select_read): Reorder field assignments to be consistent with
fhandler_pipe::select_write.
(fhandler_pipe::select_write): Initialize startup, verify, cleanup, and
write_ready fields for select_record.
(fhandler_pipe::select_except): Tweak indentation to be consistent with
fhandler_pipe::select_write.
2004-09-03 01:32:02 +00:00
Christopher Faylor 72067ccafa * fork.cc (fork_parent): Return the cygpid directly derived from the winpid. 2004-08-31 03:34:04 +00:00
Christopher Faylor 1af912ce3c * fork.cc (fork_parent): Record child's pid when we're sure that it has been
filled out by the child.
* pinfo.cc (pinfo::init): Trivial change.
2004-08-30 22:08:50 +00:00
Corinna Vinschen c01edcda76 * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Allow to report
success on systems with ntsec and ntea set.
2004-08-29 09:32:49 +00:00
Corinna Vinschen ddea76a66b * fhandler.cc (fhandler_base::write): In the lseek_bug case, set EOF
before zero filling. Combine similar error handling statements.
2004-08-28 15:46:57 +00:00
Pierre Humblet 2e41976b56 2004-08-28 Pierre Humblet <pierre.humblet@ieee.org>
* syscalls.cc (ftruncate64): On 9x, call write with a zero length
        to zero fill when the file is extended.
2004-08-28 01:37:27 +00:00
Corinna Vinschen bb647ab68c * syscalls.cc (link): Avoid compiler warning. 2004-08-24 22:49:16 +00:00
Corinna Vinschen 12618f5ff5 * environ.cc (set_ntea): New function.
(set_ntsec): Ditto.
	(set_smbntsec): Ditto.
	(parse_thing): Change ntea, ntsec and smbntsec settings to call
	appropriate functions.
2004-08-21 15:50:33 +00:00
Corinna Vinschen 7c48171279 * fhandler_tape.cc (fhandler_dev_tape::raw_read): Use ?: instead of
if/else.
	(fhandler_dev_tape::raw_write): Return -1 in case of error.
2004-08-20 13:40:35 +00:00
Corinna Vinschen b9188d6c1e * errno.cc (_sys_errlist): Change various text to their english Linux
counterparts.  Unify layout.
	(strerror): Remove switch statement.
2004-08-19 18:26:58 +00:00
Corinna Vinschen 8cb783ba56 * fhandler.cc (fhandler_base::open): Set shared flags to 0 when
opening a tape device.
2004-08-19 15:47:51 +00:00
Corinna Vinschen f0eeb667b8 * ChangeLog: Fix typo. 2004-08-19 15:31:53 +00:00
Corinna Vinschen 82b3018088 * fhandler_socket.cc (fhandler_socket::dup): Decrement dtable's
need_fixup_before counter on successful dup.
	* net.cc (cygwin_getpeername): Add file descriptor to debug output.
2004-08-19 10:58:37 +00:00
Corinna Vinschen 8f663bd642 * fhandler.h (fhandler_dev_dsp:~fhandler_dev_dsp): Delete.
(fhandler_dev_dsp::open_count): Delete.
	(fhandler_dev_dsp::close_audio_in): New method declaration.
	(fhandler_dev_dsp::close_audio_in): Ditto.
	* fhandler_dsp.cc: Add and edit debug_printf throughout.
	(fhandler_dev_dsp::Audio::denyAccess): Delete.
	(fhandler_dev_dsp::Audio::fork_fixup): Ditto.
	(fhandler_dev_dsp::Audio::getOwner): Ditto.
	(fhandler_dev_dsp::Audio::clearOwner): Ditto.
	(fhandler_dev_dsp::Audio::owner_): Ditto.
	(fhandler_dev_dsp::Audio::setformat): Ditto, rename to setconvert.
	(fhandler_dev_dsp::Audio::lock): Ditto, move to queue.
	(fhandler_dev_dsp::Audio::unlock): Ditto.
	(fhandler_dev_dsp::Audio::lock_): Ditto.
	(fhandler_dev_dsp::Audio::bufferIndex_): New member, from Audio_out
	and Audio_in.
	(fhandler_dev_dsp::Audio::pHdr_): Ditto.
	(fhandler_dev_dsp::Audio::wavehdr_): Ditto.
	(fhandler_dev_dsp::Audio::bigwavebuffer_): ditto.
	(fhandler_dev_dsp::Audio::Qisr2app_): Ditto.
	(fhandler_dev_dsp::Audio::setconvert): New method, from old setformat.
	(fhandler_dev_dsp::Audio::queue::lock): New method.
	(fhandler_dev_dsp::Audio::queue::unlock): Ditto.
	(fhandler_dev_dsp::Audio::queue::dellock): Ditto.
	(fhandler_dev_dsp::Audio::queue::isvalid): Ditto.
	(fhandler_dev_dsp::Audio::queue::lock_): New member.
	(fhandler_dev_dsp::Audio::queue::depth1_): Delete.
	(fhandler_dev_dsp::Audio_out::fork_fixup): New method.
	(fhandler_dev_dsp::Audio_out::isvalid): New method.
	(fhandler_dev_dsp::Audio_out::start): Remove arguments.
	(fhandler_dev_dsp::Audio_out::parsewav): Change arguments and set
	internal state.
	(fhandler_dev_dsp::Audio_out::emptyblocks): Delete.
	(fhandler_dev_dsp::Audio_out::Qapp2app_): Ditto.
	(fhandler_dev_dsp::Audio_out::Qisr2app_): Ditto, move to Audio.
	(fhandler_dev_dsp::Audio_out::bufferIndex_): Ditto.
	(fhandler_dev_dsp::Audio_out::pHdr_): Ditto.
	(fhandler_dev_dsp::Audio_out::wavehdr_): Ditto.
	(fhandler_dev_dsp::Audio_out::bigwavefuffer_): Ditto.
	(fhandler_dev_dsp::Audio_out::freq_): New member.
	(fhandler_dev_dsp::Audio_out::bits_): New member.
	(fhandler_dev_dsp::Audio_out::channels_): New member.
	(fhandler_dev_dsp::Audio_in::fork_fixup): New method.
	(fhandler_dev_dsp::Audio_in::isvalid): New method.
	(fhandler_dev_dsp::Audio_in::Qapp2app_): Delete.
	(fhandler_dev_dsp::Audio_in::Qisr2app_): Ditto, move to Audio.
	(fhandler_dev_dsp::Audio_in::bufferIndex_): Ditto.
	(fhandler_dev_dsp::Audio_in::pHdr_): Ditto.
	(fhandler_dev_dsp::Audio_in::wavehdr_): Ditto.
	(fhandler_dev_dsp::Audio_in::bigwavefuffer_): Ditto.
	(fhandler_dev_dsp::Audio::queue::queue): Simplify.
	(fhandler_dev_dsp::Audio::queue::send): Use lock.
	(fhandler_dev_dsp::Audio::queue::query): Do not use depth1_.
	(fhandler_dev_dsp::Audio::queue::recv): Ditto.
	(fhandler_dev_dsp::Audio::Audio): Adapt to new class members.
	(fhandler_dev_dsp::Audio::~Audio): Ditto
	(fhandler_dev_dsp::Audio_out::start): Reorganize.
	(fhandler_dev_dsp::Audio_out::stop): Simplify.
	(fhandler_dev_dsp::Audio_out::init): Reset the queue and clear flag.
	(fhandler_dev_dsp::Audio_out::write): Reorganize to allocate audio_out.
	(fhandler_dev_dsp::Audio_out::buf_info): Use appropriate block size.
	(fhandler_dev_dsp::Audio_out::callback_sampledone): Do not use lock.
	(fhandler_dev_dsp::Audio_out::waitforspace): Simplify.
	(fhandler_dev_dsp::Audio_out::waitforallsent):Ditto.
	(fhandler_dev_dsp::Audio_out::sendcurrent): Reorganize.
	Clear flag before requeuing.
	(fhandler_dev_dsp::Audio_out::parsewav):
	(fhandler_dev_dsp::Audio_in::start): Reorganize.
	(fhandler_dev_dsp::Audio_in::stop): Simplify.
	(fhandler_dev_dsp::Audio_in::queueblock): Ditto.
	Requeue header in case of error.
	(fhandler_dev_dsp::Audio_in::init): Reset the queue and clear flag.
	(fhandler_dev_dsp::Audio_in::waitfordata): Simplify.
	Do not UnprepareHeader if the flag is zero.
	(fhandler_dev_dsp::Audio_in::buf_info): Ditto.
	(fhandler_dev_dsp::Audio_in::callback_blockfull): Do not use lock.
	(fhandler_dev_dsp::open_count): Delete.
	(fhandler_dev_dsp::open): Only check existence, do not allocate
	anything. Set flags appropriately. Create archetype.
	(fhandler_dev_dsp::write): Call archetype as needed. Create audio_out.
	(fhandler_dev_dsp::read): Call archetype as needed. Create audio_in.
	(fhandler_dev_dsp::close): Call archetype as needed.
	Call close_audio_in and close_audio_out.
	(fhandler_dev_dsp::close_audio_in): New function.
	(fhandler_dev_dsp::close_audio_out): New function.
	(fhandler_dev_dsp::dup): Use archetypes.
	(fhandler_dev_dsp::ioctl): Call archetype as needed. Reorganize for
	new structures.
	(fhandler_dev_dsp::fixup_after_fork): Call archetype as needed.
	(fhandler_dev_dsp::fixup_after_exec): Call archetype as needed.
	Clear audio_in and audio_out.
2004-08-17 09:52:50 +00:00
Pierre Humblet 252dd88138 2004-08-14 Pierre Humblet <pierre.humblet@ieee.org>
* fhandler.cc (fhandler_base::open_9x): Set file attributes
	for new files.
2004-08-14 03:01:21 +00:00
Christopher Faylor cb3f750c79 * net.cc (cygwin_gethostbyname): Show failing host name on error. 2004-08-11 18:34:32 +00:00
Christopher Faylor 34b14e0b26 white space 2004-08-10 15:18:36 +00:00
Christopher Faylor fe3db6cc89 * select.cc (select_stuff::wait): Correctly check for w4 array bounds. 2004-08-10 15:05:37 +00:00
Corinna Vinschen 3410b5be3e * errno.cc (errmap): Add ERROR_TOO_MANY_LINKS -> EMLINK mapping.
* syscalls.cc (link): Only copy files if FS doesn't support hard links.
2004-08-03 14:37:26 +00:00
Corinna Vinschen 2646298531 * fhandler_proc.cc (format_proc_cpuinfo): Remove Intel-specific flags
from /proc/cpuinfo on non-Intel processors. Added new AMD-specific
	flags. Changed Intel flag names to match Linux.
2004-07-26 13:19:03 +00:00
Christopher Faylor 634d51d94e * dcrt0.cc (dll_crt0_0): Use proper boolean arguments.
* pinfo.cc (pinfo::init): Don't consider MapViewOfFileEx error to be fatal if
exiting.
* pinfo.h (pinfo::init): Eliminate default argument and supply the argument in
the one case that needed it.
2004-07-24 19:18:58 +00:00
Corinna Vinschen 65c5aa77fb * autoload.cc (GetNativeSystemInfo): Add.
(IsWow64Process): Add.
	* init.cc (respawn_wow64_process): New function.
	(dll_entry): If process has been started from a 64 bit
	process, call respawn_wow64_process.
	* uname.cc (uname): On 64 bit systems, use GetNativeSystemInfo.
	Show actual CPU type.
2004-07-24 09:41:34 +00:00
Corinna Vinschen 061095b5a3 * dtable.cc (dtable::get_debugger_info): Make stderr r/w according
to SUSv3.
2004-07-23 09:04:59 +00:00
Corinna Vinschen 0544d11637 * fhandler_tty.cc (fhandler_tty_slave::open): Use requested flag
values also when copying fhandler from archetype.
2004-07-22 20:39:08 +00:00
Christopher Faylor 5b7534fec3 * pinfo.cc (pinfo::init): Print handle in hex when MapViewOfFile fails. 2004-07-22 18:25:52 +00:00
Corinna Vinschen 7d9c458d8f * shm.cc: Whitespace fixes. 2004-07-20 16:08:49 +00:00
Christopher Faylor 894c677711 * Makefile.in (clean): Remove cygwin.def since it is autogenerated. 2004-07-20 15:52:33 +00:00
Corinna Vinschen bc2c51140c * fhandler_dsp.cc (fhandler_dev_dsp::Audio_out::init): Fix non-ISO
expression.
	* fhandler_floppy.cc (fhandler_dev_floppy::open): Remove unused
	variable.
	* fhandler_proc.cc (format_proc_meminfo): Fix compiler warning.
2004-07-19 13:13:48 +00:00
Christopher Faylor 1d2fd38847 * pinfo.cc (pinfo::init): Guard against MapViewOfFileEx failure. 2004-07-16 15:49:22 +00:00
Corinna Vinschen e348b39a71 * mmap.cc (mmap_record::alloc_page_map): Mark pages as allocated even
on Windows 9x, FWIW.
2004-07-16 14:32:03 +00:00
Corinna Vinschen 0c0ad23a2c * mmap.cc (mprotect): When MAP_WRITE protection is requested, use
READWRITE or WRITECOPY protection, whatever has been used when the
	page has been allocated initially.
2004-07-15 17:00:44 +00:00
Corinna Vinschen 4243412aa5 * fhandler.h (class fhandler_dev_raw): Remove is_writing flag.
Remove declaration of writebuf.
	(class fhandler_dev_floppy): Remove declaration of close.
	* fhandler_floppy.cc (fhandler_dev_floppy::close): Delete.
	(fhandler_dev_floppy::lseek): Remove calls to writebuf.  Set
	eom_detected to false after successful seek.
	* fhandler_raw.cc (fhandler_dev_raw::writebuf): Delete.
	(fhandler_dev_raw::raw_read): Remove calls to writebuf.
	(fhandler_dev_raw::raw_write): Always invalidate buffer.
2004-07-15 14:56:05 +00:00
Corinna Vinschen 5ba42c7f4c * mmap.cc (class mmap_record): Fix return type of get_offset.
(mmap_record::fixup_page_map): Fix off by one error.
	(list::search_record): Use long as type of "start" argument in both,
	declaration and definition.  Use long as type for local variable "i".
2004-07-15 09:21:16 +00:00
Christopher Faylor 839677149f * fhandler_registry.cc (registry_listing): Correct typo.
(fhandler_registry::fill_filebuf): Set size of newly expanded buffer prior to
calling RegQueryValueEx.
2004-07-15 02:07:14 +00:00
Corinna Vinschen dd3a7a2042 * fhandler_raw.cc (fhandler_dev_raw::raw_write): Remove buffered
write entirely.
2004-07-14 13:51:17 +00:00
Corinna Vinschen 1d4707111a * spawn.cc (spawn_guts): Check if script is executable. 2004-07-08 09:18:29 +00:00
Corinna Vinschen 78c6a5b53a * times.cc (hires_ms::usecs): Don't overreact. 2004-06-30 16:00:32 +00:00
Corinna Vinschen fbd5a0b8da * times.cc (hires_ms::usecs): Reinit timer when system time overflows. 2004-06-30 15:50:08 +00:00
Christopher Faylor 76a3f968a5 * thread.cc (__cygwin_lock_lock): Don't bother locking when there is only one
known thread.
(__cygwin_lock_unlock): Ditto for unlocking.
2004-06-27 19:16:48 +00:00