1 2006-07-18 Christopher Faylor <cgf@timesys.com>
3 * tty.cc (tty_list::terminate): Don't enter the busy loop if we don't
6 2006-07-18 Silvio Laguzzi <slaguzzi@data-al.de>
8 * sec_acl.cc (acltotext32): Add missing handling of default ACL entry
11 2006-07-18 Corinna Vinschen <corinna@vinschen.de>
13 * fhandler_floppy.cc (fhandler_dev_floppy::ioctl): Fix typo in lint
16 2006-07-17 Christopher Faylor <cgf@timesys.com>
19 * cygheap.h (cygheap_user): Remove unneeded class names from function
21 * fhandler.h (fhandler_base): Ditto.
22 (fhandler_dev_floppy): Ditto.
23 (fhandler_console): Ditto.
24 * wininfo.h (wininfo): Ditto.
25 * exceptions.cc (sigpacket::process): Avoid compiler errors about gotos
27 * fhandler_fifo.cc (fhandler_fifo::open): Ditto.
28 * fhandler_floppy.cc (fhandler_dev_floppy::ioctl): Ditto.
29 * fhandler_tty.cc (fhandler_tty_slave::ioctl): Ditto.
30 * mmap.cc (mmap64): Ditto.
31 * pipe.cc (fhandler_pipe::open): Ditto.
32 * spawn.cc (spawn_guts): Ditto.
34 * sec_helper.cc: Fix some comments.
35 (get_null_sd): Move file-scope static to only function where it is
38 2006-07-14 Christopher Faylor <cgf@timesys.com>
40 * fork.cc (fork): Lock the process before forking to prevent things
41 like new fds from being opened, etc.
42 * sync.h (lock_process::dont_bother): New function.
44 2006-07-14 Christopher Faylor <cgf@timesys.com>
46 * include/cygwin/types.h: Update copyright.
48 2006-07-14 Christopher Faylor <cgf@timesys.com>
50 * cygwin.sc: Make sure there's something in the cygheap.
51 * dllfixdbg: Accommodate newer binutils which put the gnu_debuglink at
52 the end rather than at the beginning.
54 2006-07-13 Christopher Faylor <cgf@timesys.com>
56 * sigproc.cc (waitq_head): Don't initialize to zero.
57 * sigproc.h: Update copyright, fix whitespace.
59 2006-07-13 Christopher Faylor <cgf@timesys.com>
61 * fhandler.cc (fhandler_base::raw_read): Only return EISDIR when we're
62 really trying to read a directory.
64 * sigproc.cc: Use "Static" where appropriate.
66 2006-07-13 Corinna Vinschen <corinna@vinschen.de>
68 * fhandler_socket.cc: Update copyright.
69 * include/pthread.h: Ditto.
71 2006-07-13 Corinna Vinschen <corinna@vinschen.de>
73 * mmap.cc (mmap64): Drop MAP_NORESERVE flag for non-anonymous,
75 (mmap_record::unmap_pages): Only check noreserve flag which now implies
76 anonymous and private.
78 (fixup_mmaps_after_fork): Ditto.
80 2006-07-13 Corinna Vinschen <corinna@vinschen.de>
82 * mmap.cc (mmap64): Drop MAP_RESERVED flag for all non-anonymous,
85 2006-07-13 Corinna Vinschen <corinna@vinschen.de>
87 * exceptions.cc (_cygtls::handle_exceptions): Call new
88 mmap_is_attached_or_noreserve_page function in case of access violation
89 and allow application to retry access on noreserve pages.
90 * mmap.cc (mmap_is_attached_or_noreserve_page): Changed from
91 mmap_is_attached_page. Handle also noreserve pages now. Change
93 * winsup.h (mmap_is_attached_or_noreserve_page): Declare instead of
94 mmap_is_attached_page.
96 2006-07-12 Corinna Vinschen <corinna@vinschen.de>
98 * mmap.cc (mmap_record::alloc_page_map): Don't call VirtualProtect
99 on maps created with MAP_NORESERVE.
101 2006-07-12 Corinna Vinschen <corinna@vinschen.de>
103 * include/pthread.h: Define PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT and
104 PTHREAD_PRIO_PROTECT only if _POSIX_THREAD_PRIO_INHERIT is defined.
106 2006-07-10 Corinna Vinschen <corinna@vinschen.de>
108 * libc/inet_addr.c: Define __INSIDE_CYGWIN_NET__.
109 * libc/inet_network.c: Ditto.
111 2006-07-07 Corinna Vinschen <corinna@vinschen.de>
113 * fhandler_socket.cc (fhandler_socket::wait): Disable SA_RESTART
116 2006-07-07 Corinna Vinschen <corinna@vinschen.de>
118 * Makefile.in (DLL_OFILES): Add inet_addr.o and inet_network.o.
119 * autoload.cc (inet_addr): Drop definition.
121 * net.cc: Forward declare cygwin_inet_aton and cygwin_inet_ntop.
122 (cygwin_inet_ntoa): Call cygwin_inet_ntop instead of Winsock inet_ntoa.
123 (cygwin_inet_addr): Remove here.
124 (cygwin_inet_aton): Ditto.
125 (cygwin_inet_network): Ditto.
126 * libc/inet_addr.c: New file implementing cygwin_inet_aton and
128 * libc/inet_network.c: New file implementing cygwin_inet_network.
130 2006-07-06 Christopher Faylor <cgf@timesys.com>
132 * hookapi.cc: Add comment header
133 (putmem): Make static.
135 (rvadelta): Ditto. Don't assume that a section which ends where the
136 import_rva begins is the import list.
138 * child_info.h: Update copyright.
141 2006-07-05 Christopher Faylor <cgf@timesys.com>
143 * sortdin: Ignore all leading underscores when deriving a sort key.
144 * cygwin.din: Resort.
146 2006-07-05 Christopher Faylor <cgf@timesys.com>
148 * sortdin: New program.
151 2006-07-05 Corinna Vinschen <corinna@vinschen.de>
153 * fhandler.h (fhandler_socket::wait): Reset default timeout to 10ms.
155 2006-07-05 Corinna Vinschen <corinna@vinschen.de>
157 * path.cc (path_conv::check): Ignore has_ea setting, it's always unset
158 at this point anyway.
159 (get_symlink_ea): Remove.
160 (set_symlink_ea): Remove.
161 (symlink_worker): Drop writing symlink into NTFS extended attributes.
162 (symlink_info::check): Drop reading symlinks from NTFS extended
165 2006-07-04 Christopher Faylor <cgf@timesys.com>
167 * libc/rexec.cc (cygwin_rexec): Obvious (?) fix to correct a gcc
168 warning - set port to zero first thing in the function.
170 2006-07-04 Corinna Vinschen <corinna@vinschen.de>
172 * signal.cc (signal): Set sa_mask to sig.
174 2006-07-04 Corinna Vinschen <corinna@vinschen.de>
176 * Makefile.in (DLL_OFILES): Add rexec.o.
177 * autoload.cc (inet_network): Drop definition.
179 * net.cc (rexec): Drop extern declaration.
180 (inet_network): Ditto.
181 (cygwin_inet_network): Implement using inet_addr.
182 (cygwin_rexec): Remove.
183 * libc/rexec.cc: New file.
185 2006-07-04 Corinna Vinschen <corinna@vinschen.de>
187 * fhandler_socket.cc (fhandler_socket::listen): Allow listening on
190 2006-07-04 Corinna Vinschen <corinna@vinschen.de>
192 * fhandler.h (fhandler_socket::wait): Set default timeout to INFINITE.
194 2006-07-03 Corinna Vinschen <corinna@vinschen.de>
196 * autoload.cc (NtQueryEaFile): Define.
197 (NtSetEaFile): Define.
198 * fhandler.cc (fhandler_base::open): Use appropriate open flags
199 in query case when allow_ntea is set.
200 * ntdll.h (struct _FILE_GET_EA_INFORMATION): Define.
201 (struct _FILE_FULL_EA_INFORMATION): Define.
202 (NtQueryEaFile): Declare.
203 (NtSetEaFile): Declare.
204 * ntea.cc (read_ea): Rename from NTReadEA and rewrite using
206 (write_ea): Rename from NTWriteEA and rewrite using NtSetEaFile.
207 * path.cc (get_symlink_ea): Make static. Add handle parameter to
208 accomodate new read_ea call.
209 (set_symlink_ea): Make static. Add handle parameter to accomodate new
211 (symlink_worker): Call set_symlink_ea while file is still open.
212 (symlink_info::check): Call get_symlink_ea after file has been opened.
213 * security.cc (get_file_attribute): Accomodate new read_ea call.
214 (set_file_attribute): Accomodate new write_ea call.
215 * security.h (read_ea): Change declaration accordingly.
218 2006-07-03 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
220 * fhandler.h (class dev_console): Add `metabit' indicating the
221 current meta key mode.
222 * fhandler_console.cc (fhandler_console::read): Set the top bit of
223 the character if metabit is true.
224 * fhandler_console.cc (fhandler_console::ioctl): Implement
225 KDGKBMETA and KDSKBMETA commands.
226 * fhandler_tty.cc (process_ioctl): Support KDSKBMETA.
227 (fhandler_tty_slave::ioctl): Send KDGKBMETA and KDSKBMETA to the
229 * include/cygwin/kd.h: New file for the meta key mode.
230 * include/sys/kd.h: New file.
232 2006-07-03 Eric Blake <ebb9@byu.net>
234 * include/stdint.h (UINT8_C, UINT16_C): Unsigned types smaller
235 than int promote to signed int.
237 2006-07-03 Corinna Vinschen <corinna@vinschen.de>
239 * net.cc (cygwin_sendto): Define appropriate parameters using
240 socklen_t type according to SUSv3.
241 (cygwin_recvfrom): Ditto.
242 (cygwin_setsockopt): Ditto.
243 (cygwin_getsockopt): Ditto.
244 (cygwin_connect): Ditto.
245 (cygwin_accept): Ditto.
246 (cygwin_bind): Ditto.
247 (cygwin_getsockname): Ditto.
248 (cygwin_getpeername): Ditto.
249 (cygwin_recv): Ditto.
250 (cygwin_send): Ditto.
251 * include/cygwin/socket.h (socklen_t): Typedef and define.
252 * include/sys/socket.h: Declare socket functions using socklen_t type.
254 2006-07-02 Christopher Faylor <cgf@timesys.com>
256 * include/cygwin/version.h: Bump DLL minor version number to 21.
258 2006-06-30 Corinna Vinschen <corinna@vinschen.de>
260 * net.cc (cygwin_sendto): Allow zero-sized packets.
261 (cygwin_sendmsg): Ditto.
263 2006-06-26 Corinna Vinschen <corinna@vinschen.de>
265 Revert patches from 2005-10-22 and 2006-06-14 to use event driven
266 accept and connect back to using select:
267 * fhandler.h (class fhandler_socket): Remove accept_mtx.
268 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Drop
269 initializing accept_mtx.
270 (fhandler_socket::accept): Drop event handling.
271 (fhandler_socket.cc (fhandler_socket::connect): Ditto.
272 (fhandler_socket::dup): Drop accept_mtx handling.
273 (fhandler_socket::listen): Ditto.
274 (fhandler_socket::prepare): Ditto.
275 (fhandler_socket::release): Ditto.
276 (fhandler_socket::close): Ditto.
277 * net.cc (cygwin_accept): Revert to calling cygwin_select to
278 implement interuptible accept.
279 (cygwin_connect): Ditto for connect.
281 2006-06-22 Christopher Faylor <cgf@timesys.com>
283 * fhandler_fifo.cc (fhandler_fifo::open): Release process lock and grab
284 a system-wide mutex to prevent a deadlock and a race.
285 * sync.h (lock_process): Make fhandler_fifo a friend.
287 * smallprint.c (__small_vsprintf): Cosmetic change.
289 2006-06-15 Corinna Vinschen <corinna@vinschen.de>
291 * cygwin.din: Export __srget_r, __swbuf_r.
292 * include/cygwin/version.h: Bump API minor number to 156.
294 2006-06-14 Corinna Vinschen <corinna@vinschen.de>
296 * fhandler.h (class fhandler_socket): Add private mutex handle
298 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Initialize
300 (fhandler_socket::dup): Duplicate accept_mtx, if available.
301 (fhandler_socket::listen): Create accept_mtx before trying to listen.
302 (fhandler_socket::prepare): Wait for accept_mtx if available to
303 serialize accepts on the same socket.
304 (fhandler_socket::release): Release accept_mtx.
305 (fhandler_socket::close): Close accept_mtx on successful closesocket.
307 2006-06-12 Christopher Faylor <cgf@timesys.com>
309 * fhandler_tty.cc (fhandler_pty_master::close): Always close
310 from_master/to_master since we always have copies of these handles.
312 2006-06-12 Corinna Vinschen <corinna@vinschen.de>
314 * include/sys/wait.h: Move definition of wait constants from here...
315 * include/cygwin/wait.h: ...to here. New file.
316 * include/cygwin/stdlib.h: Include cygwin/wait.h to conform with SUSv3.
318 2006-06-12 Pierre Humblet Pierre.Humblet@ieee.org
320 * heap.cc (heap_init): Only commit if allocsize is not zero.
322 2006-06-12 Corinna Vinschen <corinna@vinschen.de>
324 * net.cc (fdsock): Disable raising buffer sizes. Add comment to
327 2006-06-04 Christopher Faylor <cgf@timesys.com>
329 * ioctl.cc (ioctl): Accommodate change in reported pty master device
331 * select.cc (peek_pipe): Ditto.
333 2006-06-04 Christopher Faylor <cgf@timesys.com>
335 * cygtls.h (CYGTLS_PADSIZE): Reset to a size that XP SP1 seems to like.
336 * tlsoffsets.h: Regenerate.
338 2006-06-03 Christopher Faylor <cgf@timesys.com>
340 * cygthread.cc (cygthread::terminate_thread): In debugging output, use
341 name of thread being terminated rather than thread doing the
344 * fhandler.h (fhandler_pty_master::slave): Delete.
345 (fhandler_pty_master::get_unit): Ditto.
346 (fhandler_pty_master::setup): Change argument declaration to
347 accommodate new usage.
348 * fhandler_tty.cc (fhandler_tty_master::init): Remove obsolete slave
349 assignment. Pass argument to setup indicating that this is a tty.
350 (fhandler_tty_slave::open): Use dev() method rather than referencing
352 (fhandler_pty_master::open): Don't create archetype based on ptym
353 device number. Set device number to use DEV_TTYM_MAJOR and tty number.
354 Pass argument to setup indicating that this is a pty.
355 (fhandler_pty_master::setup): Change single argument to a flag
356 indicating whether we're creating a pty and use appropriately.
357 Calculate 't' variable here rather than in caller.
359 * fhandler_dsp.cc (fhandler_dev_dsp::open): Use dev() method rather
360 than referencing pc.dev directly.
362 2006-06-03 Christopher Faylor <cgf@timesys.com>
364 * dcrt0.cc (dll_crt0_0): Call tty_list::init_session here.
365 (dll_crt0_1): Reflect renaming from tty_init to tty::init_session.
366 (do_exit): Reflect moving of tty_terminate into tty_list.
367 * exceptions.cc (events_init): Move tty_mutex stuff elsewhere.
368 * fhandler_console.cc (set_console_title): Use lock_ttys class.
369 * fhandler_termios.cc (fhandler_termios::bg_check): Make debug output
371 * fhandler_tty.cc (fhandler_tty_slave::open): Reflect move of
372 attach_tty into tty_list class. Don't attempt to grab master end of
373 pty if master doesn't exist.
374 (fhandler_pty_master::open): Reflect move of allocate_tty into tty_list
375 class. Use lock_ttys::release to release mutex. Improve debugging
377 (fhandler_pty_master::setup): Remove if 0'ed block. Fix argument to
378 SetNamedPipeHandleState.
379 * pinfo.cc (_pinfo::set_ctty): Lock ttys before setting sid/pgid.
380 Improve debugging. Add temporary debugging.
381 * tty.cc (tty_list::init_session): New function.
382 (tty::init_session): Rename from tty_init. Reflect move of attach_tty
384 (tty::create_master): Rename from create_tty_master.
385 (tty_list::attach): Rename from attach_tty. Reflect renaming of
386 connect_tty to connect. Ditto for allocate_tty.
387 (tty_terminate): Delete.
388 (tty_list::terminate): Subsume tty_terminate. Use lock_ttys rather
389 than manipulating mutex directly.
390 (tty_list::allocate): Rename from allocate_tty. Use lock_ttys rather
391 than manipulating mutex directly. Don't set sid here since linux
392 apparently doesn't do this. Reflect move of create_tty_master into
394 (lock_ttys::lock_ttys): Define new constructor.
395 (lock_ttys::release): New function.
396 * tty.h (tty::exists): Return false immediately if !master_pid.
397 (tty::set_master_closed): Define new function.
398 (tty::create_master): Ditto.
399 (tty::init_session): Ditto.
400 (tty_list::mutex): New field.
401 (tty_list::allocate): Define new function.
402 (tty_list::connect): Ditto.
403 (tty_list::attach): Ditto.
404 (tty_list::init_session): Ditto.
405 (lock_ttys): New class.
406 (tty_init): Delete declaration.
407 (tty_terminate): Ditto.
409 (create_tty_master): Ditto.
411 2006-06-03 Christopher Faylor <cgf@timesys.com>
413 * Makefile.in (libdl.a): New library.
415 2006-06-03 Christopher Faylor <cgf@timesys.com>
417 * fhandler_tty.cc (fhandler_pty_master::close): Don't close handles if
419 (fhandler_pty_master::setup): Make sure that original handle is closed
420 when changing inheritance.
421 (fhandler_pty_master::fixup_after_fork): Set from_master/to_master to
423 (fhandler_pty_master::fixup_after_exec): Clear from_master/to_master
426 2006-06-03 Christopher Faylor <cgf@timesys.com>
428 * cygheap.cc (init_cygheap::close_ctty): Remove obsolete code.
429 * dcrt0.cc (child_info_spawn::handle_spawn): Signal ready after we've
430 run fixup_after_exec.
431 * dtable.cc (dtable::fixup_after_exec): Add debugging output.
432 * fhandler_tty.cc (fhandler_pty_master::doecho): Use class version of
434 (fhandler_tty_common::close): Remove obsolete code.
435 (fhandler_tty_slave::fixup_after_exec): Don't close, since this is done
436 in dtable's fixup_after_exec. (revisit later?)
437 (fhandler_pty_master::fixup_after_exec): Ditto.
439 2006-06-02 Christopher Faylor <cgf@timesys.com>
441 * cygtls.h (CYGTLS_PADSIZE): Bump up or suffer a regrettable collision
443 * tlsoffsets.h: Regenerate.
445 * dcrt0.cc (break_here): Define unconditionally for use elsewhere.
446 Call DebugBreak, if appropriate.
447 (initial_env): Rely on break_here() to call DebugBreak.
448 * exceptions.cc (try_to_debug): Ditto.
450 2006-06-02 Christopher Faylor <cgf@timesys.com>
452 * fhandler.cc (fhandler_base::fixup_after_exec): Declare here.
453 * fhandler.h (fhandler_base::fixup_after_exec): Make non-inline.
454 (fhandler_termios::fixup_after_fork): Delete declaration.
455 (fhandler_termios::fixup_after_exec): Ditto.
456 (fhandler_tty_common::inuse): Remove.
457 (fhandler_tty_common::dup): Delete declaration.
458 (fhandler_tty_common::fixup_after_fork): Ditto.
459 (fhandler_tty_slave::fixup_after_exec): Declare new function.
460 (fhandler_pty_master::dwProcessId): New variable.
461 (fhandler_pty_master::from_master): Ditto.
462 (fhandler_pty_master::to_master): Ditto.
463 (fhandler_pty_master::setup): New function.
464 (fhandler_pty_master::fixup_after_fork): Ditto.
465 (fhandler_pty_master::fixup_after_exec): Ditto.
466 * fhandler_termios.cc (fhandler_termios::fixup_after_exec): Delete
468 (fhandler_termios::fixup_after_fork): Ditto.
469 * fhandler_tty.cc (fhandler_tty_master::init): Use fhandler_pty_master
470 setup function rather than obsolete tty::common_init. Delete obsolete
472 (fhandler_tty_slave::fhandler_tty_slave): Set inuse to NULL here.
473 (fhandler_tty_slave::open): Change debugging output for clarity. Check
474 for different things when doing a sanity check on the tty. Reflect the
475 fact that master_pid now is the cygwin pid rather than the windows pid.
476 Use "arch" rather than "archetype" for consistency.
477 (fhandler_tty_slave::close): Close inuse here.
478 (fhandler_tty_slave::dup): Remove old if 0'ed code.
479 (fhandler_pty_master::dup): New function. Handles pty master
481 (fhandler_pty_master::fhandler_pty_master): Zero pty_master specific
483 (fhandler_pty_master::open): Implement using archetypes, similar to
484 slave. Use fhandler_pty_master setup function rather than obsolete
485 tty::common_init. Don't set inuse.
486 (fhandler_tty_common::close): Don't deal with inuse. Delete old if
488 (fhandler_pty_master::close): Implement using archetypes. Close
489 from_master and to_master.
490 (fhandler_tty_common::set_close_on_exec): Just set close_on_exec flag
491 here since everything uses archetypes now.
492 (fhandler_tty_common::fixup_after_fork): Delete definition.
493 (fhandler_tty_slave::fixup_after_exec): Define new function.
494 (fhandler_pty_master::setup): New function, derived from
496 (fhandler_pty_master::fixup_after_fork): New function.
497 (shared_info.h): Reset SHARED_INFO_CB to reflect new tty size.
498 * tty.cc (tty_list::terminate): Close individual handles from
500 (tty::master_alive): Delete.
501 (tty::make_pipes): Ditto.
502 (tty::common_init): Ditto.
503 * tty.h (tty::from_slave): Delete.
504 (tty::to_slave): Ditto.
505 (tty::common_init): Delete declaration.
506 (tty::make_pipes): Ditto.
507 (tty::master_pid): Define as pid_t since it is now a cygwin pid.
509 2006-06-01 Christopher Faylor <cgf@timesys.com>
511 * cygheap.cc (cygheap_fixup_in_child): Don't close parent handle here.
512 Let the caller do that.
513 * dcrt0.cc (child_info_spawn::handle_spawn): Close parent handle here
514 to allow fixup_after_exec functions to use it.
516 * cygtls.cc (_cygtls::call2): Avoid calling exit thread if called with
518 * cygtls.h (_cygtls::isinitialized): Check that we actually have a tls
519 before seeing if it is initialized.
520 * gendef (_sigfe_maybe): Ditto.
521 * dcrt0.cc (dll_crt0_1): Remove static, use just one argument.
522 * dll_init.cc (dllcrt0_info): New structure.
523 (dll_dllcrt0): Change into a front-end to renamed dll_dllcrt0_1 so that
524 we'll always be assured of having something like a tls.
525 (dll_dllcrt0_1): New function, basically renamed from from dll_dllcrt0.
526 Unconditionally call _my_tls.init_exception_handler now that we are
527 assured of having a tls. Change variable name from "linking" to "linked".
528 * winsup.h (dll_crt0_1): Declare.
529 (dll_dllcrt0_1): Ditto.
531 2006-05-30 Christopher Faylor <cgf@timesys.com>
533 * cygtls.cc (_cygtls::call2): Don't call ExitThread on the main thread.
535 2006-05-29 Christopher Faylor <cgf@timesys.com>
537 * winf.h (MAXCYGWINCMDLEN): Set down size to 30000 or suffer fork
540 2006-05-28 Christopher Faylor <cgf@timesys.com>
542 * sigproc.cc (child_info::proc_retry): Mask all of the bits we're
543 interested in, which includes bits above and below 0xc0000000.
545 2006-05-27 Christopher Faylor <cgf@timesys.com>
547 * dll_init.cc (dll_dllcrt0): Previous change didn't work very well with
548 fork. Semi-revert it but change name of variable to something that
551 2006-05-27 Christopher Faylor <cgf@timesys.com>
553 * thread.cc (verifyable_object_isvalid): Check for NULL specifically.
555 2006-05-27 Christopher Faylor <cgf@timesys.com>
557 * dll_init.cc (dll_dllcrt0): Call _my_tls.init_exception_handler if
558 we've finished initializing (Thanks to Gary Zablackis for noticing this
559 problem). Just use cygwin_finished_initializing rather than defining a
562 2006-05-25 Christopher Faylor <cgf@timesys.com>
564 * debug.h (ModifyHandle): Define new macro.
565 (modify_handle): Declare new function.
566 * debug.cc (modify_handle): Define new function.
567 * fhandler.h (fhandler_base::fork_fixup): Change return value from void
569 * fhandler.cc (fhandler_base::fork_fixup): Return true if fork fixup has
571 * pipe.cc (fhandler_pipe::set_close_on_exec): Set inheritance of
572 protected handle via ModifyHandle if DEBUGGING.
573 (fhandler_pipe::fixup_after_fork): Protect guard handle if fork fixup
576 2006-05-24 Christopher Faylor <cgf@timesys.com>
578 * cygtls.cc (_cygtls::call): Call call2 using _my_tls.
579 (_cygtls::init_exception_handler): Always replace existing exception
580 handler with cygwin exception handler.
581 * cygtls.h (_cygtls::call2): Remove static designation.
582 * dcrto.cc (dll_crt0_1): Define in a way that allows calling via
584 (_initialize_main_tls): Delete.
585 (_dll_crt0): Call dll_crt0_1 via cygtls::call. Set _main_tls here.
586 * external.cc (cygwin_internal): Implement CW_CYGTLS_PADSIZE.
587 * include/sys/cygwin.h (CW_CYGTLS_PADSIZE): Define.
588 * tlsoffsets.h: Regenerate.
590 2006-05-24 Christopher Faylor <cgf@timesys.com>
592 * configure.in: Update to newer autoconf.
593 (thanks to Steve Ellcey)
594 * configure: Regenerate.
595 * aclocal.m4: New file.
597 2006-05-23 Lev Bishop <lev.bishop+cygwin@gmail.com>
599 * fhandler.cc (readv): Remove nonsensical assert.
601 2006-05-23 Christopher Faylor <cgf@timesys.com>
603 * select.cc (start_thread_socket): Delay setting thread local exitsock
604 until we know it's correct. Return correct value on error.
606 2006-05-23 Lev Bishop <lev.bishop+cygwin@gmail.com>
607 Christopher Faylor <cgf@timesys.com>
609 * select.cc (start_thread_socket): Clean up exitsock in case of error.
610 Use si->exitcode consistently.
612 2006-05-21 Christopher Faylor <cgf@timesys.com>
614 * child_info.h (_CI_SAW_CTRL_C): New enum.
615 (CURR_CHILD_INFO_MAGIC): Reset.
616 (saw_ctrl_c): New function.
617 (set_saw_ctrl_c): Ditto.
618 * sigproc.cc (child_info::proc_retry): Return EXITCODE_OK if we get
619 STATUS_CONTROL_C_EXIT and we actually saw a CTRL-C.
620 * spawn.cc (dwExeced): Delete.
621 (chExeced): New variable.
622 (spawn_guts): Set chExeced;
623 * exceptions.cc (dwExeced): Delete declaration.
625 (ctrl_c_handler): Detect if we're an exec stub process and set a flag,
628 * fhandler_tty.cc (fhandler_tty_common::__release_output_mutex): Add
629 extra DEBUGGING test.
631 * pinfo.cc: Fix comment.
633 2006-05-21 Christopher Faylor <cgf@timesys.com>
635 * fhandle.h (fhandler_pipe::create_guard): Revert change which
636 eliminated SECURITY_ATTRIBUTES argument.
637 * pipe.cc (fhandler_pipe::open): Duplicate guard from other process and
638 protect it appropriately. Eliminate unneeded writepipe_exists
639 temporary variable. Set inheritance appropriately.
640 (fhandler_pipe::set_close_on_exec): Revert change which eliminated
641 handling guard inheritance.
642 (fhandler_pipe::fixup_after_fork): Ditto. Use correct name of entity
643 being checked by fork_fixup.
644 (fhandler_pipe::fixup_after_exec): Don't bother with guard here.
645 (fhandler_pipe::dup): Cosmetic changes and revert creation of
646 writepipe_exists as noninheritable.
647 (fhandler_pipe::create): Revert change which eliminated
648 SECURITY_ATTRIBUTES argument. Revert change which always made
649 writepipe_exists noninheritable.
651 2006-05-21 Christopher Faylor <cgf@timesys.com>
653 * debug.cc (add_handle): Print handle value when collision detected.
654 * dtable.cc (dtable::stdio_init): Cosmetic change.
655 * fhandler.h (fhandler_base::create_read_state): Protect handle.
656 (fhandler_pipe::create_guard): Ditto. Always mark the handle as
658 (fhandler_pipe::is_slow): Return boolean value rather than numeric 1.
659 * pipe.cc (fhandler_pipe::fhandler_pipe): Always flag that we need fork
661 (fhandler_pipe::open): Don't pass security attributes to create_guard.
662 (fhandler_pipe::set_close_on_exec): Don't handle guard here.
663 (fhandler_pipe::close): Accommodate now-protected guard handle.
664 (fhandler_pipe::fixup_in_child): Don't protect read_state here.
665 (fhandler_pipe::fixup_after_exec): Close guard handle if close_on_exec.
666 (fhandler_pipe::fixup_after_fork): Don't bother with guard here.
667 (fhandler_pipe::dup): Don't set res to non-error prematurely. Use
668 boolean values where appropriate. Protect guard and read_state.
669 (fhandler_pipe::create): Don't call need_fork_fixup since it is now the
670 default. Don't protect read_state or guard.
672 * pipe.cc (fhandler_base::ready_for_read): Use bool values for "avail".
674 * spawn.cc (spawn_guts): Set cygheap->pid_handle as inheritable when
677 2006-05-15 Lev Bishop <lev.bishop+cygwin@gmail.com>
678 Christopher Faylor <cgf@timesys.com>
680 * select.cc (fhandler_pipe::ready_for_read): Actually get the guard
681 mutex for blocking reads.
683 2006-05-20 Christopher Faylor <cgf@timesys.com>
685 * fhandler_tty.cc (fhandler_tty::close): Remove problematic hExeced guard.
687 2006-05-20 Christopher Faylor <cgf@timesys.com>
689 * fhandler_tty.cc (fhandler_tty_slave::open): Reinstate call to
690 need_invisible on first pty open.
692 2006-05-18 Christopher Faylor <cgf@timesys.com>
694 * fhandler_console.cc (fhandler_console::need_invisible): Allocate an
695 invisible window station when ctty != TTY_CONSOLE.
697 2006-05-16 Christopher Faylor <cgf@timesys.com>
699 * cygtls.cc (_cygtls::remove): Don't test for initialization since
700 this function will always be called when _my_tls is initialized.
701 * init.cc (dll_entry): Don't attempt to remove tls info if _my_tls is
702 obviously not even available.
704 2006-05-15 Christopher Faylor <cgf@timesys.com>
706 * sigproc.cc (no_signals_available): Detect hwait_sig ==
707 INVALID_HANDLE_VALUE.
708 (wait_sig): Set hwait_sig to INVALID_HANDLE_VALUE on __SIGEXIT.
710 2006-05-15 Christopher Faylor <cgf@timesys.com>
712 * cygtls.cc (_cygtls::init_thread): Zero entire _my_tls structure and
714 * cygtls.h (_my_tls::padding): Delete.
715 (CYGTLS_PADSIZE): Redefine concept of padding to mean padding at the
717 * dcrt0.cc (initialize_main_tls): Change return to void.
718 * gentls_offsets: Treat const specially, too. Keep going after a '}'
719 is found. Change negative offset calculation to use CYGTLS_PADSIZE.
720 * init.cc (_my_oldfunc): New variable.
721 (threadfunc_fe): Use stored tls value for oldfunc rather than blindly
722 writing to the stack.
723 (munge_threadfunc): Set oldfunc in tls.
724 (dll_entry): Initialize tls allocation.
725 * tlsoffsets.h: Regenerate.
727 2006-05-13 Christopher Faylor <cgf@timesys.com>
729 * ntdll.h (STATUS_INVALID_INFO_CLASS): Conditionalize.
731 2006-05-10 Brian Dessent <brian@dessent.net>
733 * Makefile.in (clean): Also delete *.dbg.
735 2006-05-08 Christian Franke <Christian.Franke@t-online.de>
737 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix typo which
738 caused test for ".." to be skipped.
740 2006-05-02 Christopher Faylor <cgf@timesys.com>
742 * external.cc (cygwin_internal): Set errno on failure.
744 2006-04-27 Corinna Vinschen <corinna@vinschen.de>
746 * pipe.cc (DEFAULT_PIPEBUFSIZE): Raise to 64K.
748 2006-04-26 Corinna Vinschen <corinna@vinschen.de>
750 * fhandler.h (fhandler_base): Change fstat_helper prototype
751 to take file size and inode number as 64 bit values.
752 * fhandler_disk_file.cc (FS_IS_SAMBA): Move to path.cc
753 (FS_IS_SAMBA_WITH_QUOTA): Ditto.
754 (path_conv::hasgood_inode): Delete.
755 (path_conv::is_samba): Delete.
756 (path_conv::isgood_inode): Centralized function to recognize
758 (fhandler_base::fstat_by_handle): Constify fvi_size and fai_size.
759 Accomodate argument change in fstat_helper.
760 (fhandler_base::fstat_by_name): Ditto.
761 (fhandler_base::fstat_helper): Accomodate argument change. Call
762 path_conv::isgood_inode to recognize good inodes.
763 (fhandler_disk_file::opendir): Explain Samba weirdness here.
764 Call path_conv::fs_is_samba instead of path_conv::is_samba.
765 (fhandler_disk_file::readdir): Add STATUS_INVALID_INFO_CLASS
766 as valid return code from NtQueryDirectoryFile to indicate that
767 FileIdBothDirectoryInformation is not supported.
768 Call path_conv::isgood_inode to recognize good inodes.
769 * ntdll.h (STATUS_INVALID_INFO_CLASS): Define.
770 * path.cc (fs_info::update): Rework file system recognition
771 and set appropriate flags.
772 * path.h (struct fs_info): Add is_ntfs, is_samba and is_nfs flags.
773 Constify pure read accessors.
775 2006-04-24 Christopher Faylor <cgf@timesys.com>
777 * environ.cc (getearly): Force correct dereference order when
778 inspecting environ table.
780 2006-04-24 Corinna Vinschen <corinna@vinschen.de>
782 * select.cc (thread_pipe): Raise sleep time only every 8th iteration.
783 (thread_mailslot): Ditto.
785 2006-04-23 Corinna Vinschen <corinna@vinschen.de>
786 Christopher Faylor <cgf@timesys.com>
788 * select.cc (thread_pipe): Raise sleep time dynamically to speed up
789 select on pipes when copying lots of data.
790 (thread_mailslot): Ditto for mailslots.
792 2006-04-22 Christopher Faylor <cgf@timesys.com>
794 * signal.cc (abort): On second thought, just set incyg once.
796 2006-04-22 Christopher Faylor <cgf@timesys.com>
798 * signal.cc (abort): Set incyg manually to help get a reliable gdb
800 * cygwin.din (abort): Make NOSIGFE.
802 2006-04-21 Pierre Humblet Pierre.Humblet@ieee.org
803 Christopher Faylor <cgf@timesys.com>
805 * environ.cc (getearly): Use GetEnvironmentVariable and cmalloc instead
806 of GetEnvironmentStrings.
807 (environ_init): Revert rawenv stuff.
809 2006-04-21 Christopher Faylor <cgf@timesys.com>
811 * environ.cc (rawenv): Make this variable a file-scope static.
812 (getearly): Rename 's' variable to 'len' since 's' is used fairly
813 consistently throughout cygwin as a string variable. Remove rawenv
814 declaration. Perform other minor cleanups.
815 (environ_init): Remove rawenv declaration. Only set rawenv to
816 GetEnvironmentStrings() if it has not already been set. Properly free
819 2006-04-21 Christopher Faylor <cgf@timesys.com>
821 * tty.h (tty::hwnd): Move to tty_min.
822 (tty::gethwnd): Ditto.
823 (tty::sethwnd): Ditto.
824 (tty_min::hwnd): Receive variable from tty class.
825 (tty_min::gethwnd): Receive function from tty classs.
826 (tty_min::sethwnd): Ditto.
827 * dtable.cc (dtable::stdio_init): Only call init_console_handler when
828 we actually own the console.
829 * fhandler_console.cc (fhandler_console::get_tty_stuff): Set tty's hwnd
831 * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Semi-reinstate
832 handling of console when pgrp is set.
834 2006-04-21 Pierre Humblet <Pierre.Humblet@ieee.org>
835 Corinna Vinschen <corinna@vinschen.de>
837 * environ.cc (getearly): New function.
838 (findenv_func): New function pointer, predefined to getearly.
839 (getenv): Call findenv function over the findenv_func pointer.
840 (environ_init): Change findenv_func pointer to my_findenv after Cygwin
841 environment is initialized.
843 2006-04-21 Lars Munch <lars@segv.dk>
845 * include/asm/byteorder.h (__ntohl): Fix the missing uint32_t.
847 2006-04-21 Corinna Vinschen <corinna@vinschen.de>
849 * fhandler_socket.cc (fhandler_socket::wait): Reorder setting
850 WSAError to avoid spurious errors with WSAError set to 0.
852 2006-04-21 Corinna Vinschen <corinna@vinschen.de>
854 * include/asm/byteorder.h: Include stdint.h. Per standard, change
855 datatypes in ntohX and htonX functions to uintXX_t types.
857 2006-04-18 Christopher Faylor <cgf@timesys.com>
859 * exceptions.cc (ctrl_c_handler): Only exit TRUE on CTRL_LOGOFF_EVENT
860 when we have actually handled the event.
862 2006-04-17 Eric Blake <ebb9@byu.net>
864 * mktemp.cc (_gettemp): Open temp files in binary mode.
866 2006-04-14 Corinna Vinschen <corinna@vinschen.de>
868 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Use UINT32_MAX
871 2006-04-14 Corinna Vinschen <corinna@vinschen.de>
873 * fhandler_disk_file.cc (path_conv::hasgood_inode): Make inline.
874 Drop remote fs handling entirely since unreliable inode numbers
875 are now recognized differently.
876 (path_conv::is_samba): Make inline.
877 (fhandler_disk_file::opendir): Reformat comment.
878 (fhandler_base::fstat_helper): Special case remote file systems
879 returning (unreliable) 32 bit inode numbers.
880 (fhandler_disk_file::readdir): Ditto.
881 * fhandler_netdrive.cc (fhandler_netdrive::readdir): Ditto.
883 2006-04-13 Christopher Faylor <cgf@timesys.com>
885 * spawn.cc (spawn_guts): Move ch.set() call back to where it was
888 2006-04-13 Corinna Vinschen <corinna@vinschen.de>
890 * sysconf.cc (sysconf): Add _SC_THREADS, _SC_THREAD_ATTR_STACKSIZE,
891 _SC_THREAD_PRIORITY_SCHEDULING, _SC_THREAD_PROCESS_SHARED,
892 _SC_THREAD_SAFE_FUNCTIONS, _SC_TIMERS handling.
894 2006-04-12 Corinna Vinschen <corinna@vinschen.de>
895 Christopher Faylor <cgf@timesys.com>
897 * spawn.cc (spawn_guts): Revert patch which treated derived cygwin
898 programs differently from those which are mounted with -X. Pass extra
899 argument to linebuf::fromargv.
900 * winf.h (MAXCYGWINCMDLEN): New define.
901 (linebuf::finish): Add a new argument denoting when command line
903 (linebuf::fromargv): Ditto.
904 * winf.cc (linebuf::finish): Implement above change.
905 (linebuf::fromargv): Ditto.
907 2006-04-11 Christopher Faylor <cgf@timesys.com>
909 * Makefile.in (DLL_OFILES): Add winf.o.
910 * spawn.cc: Move command line handling stuff into winf.cc.
914 2006-04-05 Christopher Faylor <cgf@timesys.com>
916 * fhandler_socket.cc: Move iptypes.h include after winsock2 since it
920 2006-04-05 Christopher Faylor <cgf@timesys.com>
922 * dcrt0.cc (dll_crt0_0): Move user_data->{resourcelocks,threadinterface}
923 initialization here from dll_crt0_1.
924 (dll_crt0_1): See above.
926 2006-04-04 Corinna Vinschen <corinna@vinschen.de>
928 * net.cc (fdsock): Raise default SO_RCVBUF/SO_SNDBUF buffer sizes to
929 the same values as on Linux.
931 2006-04-03 Christopher Faylor <cgf@timesys.com>
933 * child_info.h (CURR_CHILD_INFO_MAGIC): Update.
934 (child_info_fork::alloc_stack): Move into this class.
935 (child_info_fork::alloc_stack_hard_way): Ditto.
936 * dcrt0.cc (child_info_fork::alloc_stack): Ditto.
937 (child_info_fork::alloc_stack_hard_way): Ditto.
938 (_dll_crt0): Reference alloc_stack via fork_info.
940 2006-04-03 Corinna Vinschen <corinna@vinschen.de>
942 * spawn.cc (linebuf::finish): Drop argument. Don't check command line
944 (spawn_guts): Remove wascygexec. Check real_path.iscygexec instead.
945 Accommodate change to linebuf::finish.
947 2006-04-03 Christopher Faylor <cgf@timesys.com>
949 * dcrt0.cc (sm): Delete.
950 (alloc_stack_hard_way): Figure out where the stack lives here rather
951 than relying on previously filled out information which has been
952 invalid since 1.5.19.
954 2006-03-31 Corinna Vinschen <corinna@vinschen.de>
956 * fhandler_disk_file.cc (FS_IS_SAMBA_WITH_QUOTA): New define.
957 (path_conv::hasgood_inode): Recognize Samba with quota support
959 (path_conv::is_samba): Ditto. Fix comment to include Samba version
960 numbers for later reference.
962 2006-03-30 Corinna Vinschen <corinna@vinschen.de>
964 * security.h (sec_user_nih): Make sid1 argument mandatory.
967 2006-03-29 Christopher Faylor <cgf@timesys.com>
969 * sigproc.cc (wait_for_sigthread): Use the current user sid when
970 setting up the signal pipe rather than relying on (eventually) the
973 2006-03-29 Christopher Faylor <cgf@timesys.com>
975 * dcrt0.cc (child_info_fork::handle_fork): Set uid/gid in myself so
976 that it can be used by subsequent startup functions.
977 (dll_crt0_0): Issue a warning if DuplicateTokenEx fails and DEBUGGING.
978 (dll_crt0_1): Move user_data->{resourcelocks,threadinterface}
979 initialization here from dll_crt0_0.
980 * fork.cc (frok::child): Tell wait_for_sigthread that this is fork.
981 (frok::parent): Only initialize start_time once. Tighten time when
982 we're "deimpersonated".
983 * sigproc.cc (signal_fixup_after_exec): Rework (futiley) sa_buf stuff.
984 Add debugging output.
985 (wait_for_sigthread): Accept an argument which illustrates whether we
987 (wait_sig): Avoid using myself pointer.
988 * winsup.h ((wait_for_sigthread): Reflect change to argument.
990 2006-03-26 Christopher Faylor <cgf@timesys.com>
992 * spawn.cc (spawn_guts): Close handles if we know that we will not be
993 seeing a sync event from the child.
995 2006-03-26 Christopher Faylor <cgf@timesys.com>
997 * sigproc.cc (wait_sig): Move myself manipulation...
998 (wait_for_sigthread): ...to here.
1000 2006-03-24 Corinna Vinschen <corinna@vinschen.de>
1002 * fhandler_floppy.cc: Include ntdef.h and ntdll.h.
1003 (fhandler_dev_floppy::get_drive_info): Rearrange so that now
1004 NtQueryVolumeInformationFile is called on drives which don't support
1005 IOCTL_DISK_GET_DRIVE_GEOMETRY.
1006 * ntdll.h (struct _FILE_FS_SIZE_INFORMATION): Add.
1007 (enum _FSINFOCLASS): Add missing values.
1009 2006-03-23 Christopher Faylor <cgf@timesys.com>
1011 * fhandler_console.cc (fhandler_console::fixup_after_fork_exec): Make
1012 error message more explicit.
1013 * pinfo.cc (_pinfo::commune_request): Don't lock process unless we're
1016 2006-03-23 Christopher Faylor <cgf@timesys.com>
1018 * dcrt0.cc (child_info_spawn::handle_spawn): Don't initialize the
1019 console handler here.
1020 * dtable.cc (dtable::stdio_init): Initialize console handler here.
1022 2006-03-23 Christopher Faylor <cgf@timesys.com>
1024 * sigproc.cc (sigalloc): Don't set SA_RESTART here.
1025 * signal.cc (_SA_NORESTART): New flag.
1026 (sigaction_worker): New function, derived from sigaction. Don't set
1027 internal flags unless called internally.
1028 (sigaction): Use sigaction_worker.
1029 (signal): Honor new _SA_NORESTART flag.
1030 (siginterrupt): Set _SA_NORESTART flag appropriately. Use
1031 sigaction_worker to set flags.
1032 * include/cygwin/signal.h: Define _SA_INTERNAL_MASK here.
1034 2006-03-22 Corinna Vinschen <corinna@vinschen.de>
1036 * thread.cc (pthread_mutex::is_good_initializer_or_bad_object): Delete.
1037 (pthread_cond::is_good_initializer_or_bad_object): Delete.
1038 (pthread_rwlock::is_good_initializer_or_bad_object): Delete.
1039 (pthread_cond::init): Remove disabled code. Guard assignment to
1040 object to initialize against access violation.
1041 (pthread_rwlock::init): Ditto.
1042 (pthread_mutex::init): Ditto.
1044 2006-03-22 Eric Blake <ebb9@byu.net>
1046 * fhandler.cc (fcntl): Print flags in hex.
1048 2006-03-22 Christopher Faylor <cgf@timesys.com>
1050 * dcrt0.cc (dll_crt0_0): Semi-revert 2006-03-14 change which moved
1051 pinfo_init and uinfo_init here.
1052 (dll_crt0_1): Ditto.
1053 (__dll_crt0): Ditto. Don't call update_envptrs here.
1054 (dll_crt0_1): Ditto. Move wait_for_sigthread call here from dll_crt0_0.
1055 * environ.cc (environ_init): Call it here instead.
1056 * sigproc.cc (my_readsig): New static variable.
1057 (wait_for_sigthread): Set up read pipe here since we are assured that
1058 we have the proper privileges when this is called.
1059 (talktome): Eliminate second argument since it is available as a global
1061 (wait_sig): Reflect use of my_readsig.
1063 2006-03-22 Corinna Vinschen <corinna@vinschen.de>
1065 * thread.cc (pthread_cond::init): Disable validity test of object
1066 to initialize since test of uninitialized content is unreliable.
1067 (pthread_rwlock::init): Ditto.
1068 (pthread_mutex::init): Ditto.
1070 2006-03-21 Christopher Faylor <cgf@timesys.com>
1072 * signal.cc (signal): Don't set SA_RESTART here.
1073 (siginterrupt): White space.
1074 * sigproc.cc (sigalloc): Set SA_RESTART here, on initialization.
1076 2006-03-21 Christopher Faylor <cgf@timesys.com>
1078 * child_info.h (child_status): Fix typo which made it impossible to set
1080 (child_info::isstraced): Booleanize.
1081 (child_info::iscygwin): Ditto.
1082 * sigproc.cc (child_info::child_info): Minor cleanup of flag setting.
1083 * spawn.cc (spawn_guts): Only close_all_files when we know the process
1084 has started successfully.
1086 * exceptions.cc (init_console_handler): Fix indentation.
1088 2006-03-20 Christopher Faylor <cgf@timesys.com>
1090 * dcrt0.cc (dll_crt0_0): Call SetErrorMode earlier.
1091 * pinfo.cc (_pinfo::dup_proc_pipe): Reset wr_proc_pipe on failure.
1092 Return previous pipe handle.
1093 * pinfo.h (_pinfo::dup_proc_pipe): Reflect change to return value.
1094 * spawn.cc (spawn_guts): Restore previous proc pipe on retry or if
1095 process exits before synchronization.
1097 2006-03-20 Christopher Faylor <cgf@timesys.com>
1099 * child_info.h (child_status): New enum.
1100 (child_info::flag): Rename from 'straced'.
1101 (child_info::isstraced): New function.
1102 (child_info::iscygwin): Ditto.
1103 (child_info_fork::handle_fork): Reparmize.
1104 (child_info_fork::handle_failure): Ditto.
1105 (child_info_spawn::handle_spawn): New function.
1106 * dcrt0.cc (get_cygwin_startup_info): Use isstraced method.
1107 (child_info_spawn::handle_spawn): Define new function from code
1108 previously in dll_crt0_0.
1109 (dll_crt0_0): Move spawn stuff into handle_spawn. Only call
1110 init_console_handler for fork case.
1111 * sigproc.cc (child_info::child_info): Set flag appropriately.
1112 (child_info::proc_retry): Treat exit code as "funny" if it's a cygwin
1114 * spawn.cc (spawn_guts): Remove commented out flag setting.
1116 2006-03-19 Christopher Faylor <cgf@timesys.com>
1118 * pinfo.cc (commune_process): Fix randomly invalid pointer which caused
1119 fifos to work incorrectly.
1121 2006-03-19 Christopher Faylor <cgf@timesys.com>
1123 * dcrt0.cc (dll_crt0_0): Oops. We need to bother with setting
1124 init_console_handler in the fork/exec case.
1126 2006-03-19 Christopher Faylor <cgf@timesys.com>
1128 * dcrt0.cc (dll_crt0_0): Don't bother with setting init_console_handler
1129 here since it will be set later when we discover if we have a ctty or
1131 * exceptions.cc (init_console_handler): Properly remove NULL handler.
1133 2006-03-18 Christopher Faylor <cgf@timesys.com>
1135 * pinfo.h (EXITCODE_OK): Define new constant.
1136 * sigproc.cc (child_info::sync): Return EXITCODE_OK if entering with
1138 (sig_send): Don't complain if sending signals while blocked if the
1139 sender isn't in the main thread.
1141 2006-03-18 Christopher Faylor <cgf@timesys.com>
1143 * child_info.h (CURR_CHILD_INFO_MAGIC): Regenerate.
1144 (child_info::retry): Move here from fork subclass.
1145 (child_info::exit_code): New field.
1146 (child_info::retry_count): Max retry count for process start.
1147 (child_info::proc_retry): Declare new function.
1148 (child_info_fork::retry): Move to parent.
1149 (child_info_fork::fork_retry): Ditto.
1150 * dcrt0.cc (child_info::fork_retry): Rename and move.
1151 (child_info_fork::handle_failure): Move.
1152 (dll_crt0_0): Initialize console handler based on whether we have a
1153 controlling tty or not. Avoid nonsensical check for fork where it can
1155 * environ.cc (set_proc_retry): Rename from set_fork_retry. Set
1156 retry_count in child_info.
1157 (parse_thing): Reflect above change.
1158 * exceptions.cc (dummy_ctrl_c_handler): Remove unused variable name.
1159 (ctrl_c_handler): Always return TRUE for the annoying
1161 * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Remove call to
1162 init_console_handler.
1163 * fhandler_tty.cc (fhandler_tty_slave::open): Just call
1164 mange_console_count here and let it decide what to do with initializing
1165 console control handling.
1166 * fork.cc (fork_retry): Remove definition.
1167 (frok::parent): Define static errbuf and use in error messages (not
1168 thread safe yet). Close pi.hThread as soon as possible. Protect
1169 pi.hProcess as soon as possible. Don't set retry_count. That happens
1170 automatically in the constructor now. Accommodate name change from
1171 fork_retry to proc_retry.
1172 * init.cc (dll_entry): Turn off ctrl-c handling early until we know how
1173 it is supposed to be handled.
1174 * pinfo.cc (_pinfo::dup_proc_pipe): Remember original proc pipe value
1175 for failure error message. Tweak debug message slightly.
1176 * sigproc.cc (child_info::retry_count): Define.
1177 (child_info::child_info): Initialize retry count.
1178 (child_info::sync): Set exit code if process dies before
1180 (child_info::proc_retry): Rename from child_info_fork::fork_retry. Use
1181 previously derived exit code. Be more defensive about what is
1182 classified as an error exit.
1183 (child_info_fork::handle_failure): Move here from dcrt0.cc.
1184 * spawn.cc (spawn_guts): Maintain error mode when starting new process
1185 to avoid annoying pop ups. Move deimpersonate call within new loop.
1186 Move envblock freeing to end. Loop if process dies prematurely with
1188 * syscalls.cc (setpgid): Remove hopefully unneeded call to
1189 init_console_handler.
1191 2006-03-15 Christopher Faylor <cgf@timesys.com>
1193 * cygheap.cc (init_cygheap::manage_console_count): Turn console control
1194 handler on/off depending on whether we have allocated a console or not.
1195 * dcrt0.cc (child_info_fork::fork_retry): Add more potential retry
1197 (dll_crt0_0): Turn on/off console control depending on whether we have
1198 a controlling tty or not.
1199 * exceptions.cc (init_console_handler): Change BOOL to bool.
1200 * fhandler_console.cc (fhandler_console::need_invisible): Cosmetic
1202 * winsup.h (init_console_handler): Reflect argument type change.
1204 * wincap.h (supports_setconsolectrlhandler_null): Remove duplicate
1205 capability throughout.
1208 2006-03-14 Christopher Faylor <cgf@timesys.com>
1210 * child_info.h (child_info_fork::fork_retry): Declare new function.
1211 * dcrt0.cc (child_info_fork::fork_retry): Define new function.
1212 * fork.cc (frok::parent): Move retry decision into
1213 child_info_fork::fork_retry and honor what it tells us to do.
1214 * sigproc.cc (sig_send): Unhold signals on __SIGEXIT.
1216 2006-03-14 Christopher Faylor <cgf@timesys.com>
1218 * fork.cc (frok::parent): Improve error message.
1220 2006-03-14 Christopher Faylor <cgf@timesys.com>
1222 * dcrt0.cc (main_environ): Initialize to &__cygwin_environment.
1223 (dll_crt0_1): Move resourcelocks, thread interface, pinfo_init, and
1225 (dll_crt0_0): ...to here.
1226 (_dll_crt0): Call update_envptrs here after setting main_environ.
1227 * environ.cc (environ_init): Eliminate initted variable. Don't call
1228 update_envptrs here.
1229 * sigproc.cc (wait_sig): Use my_sendsig when calling CreatePipe to
1230 avoid a dereference.
1232 2006-03-13 Christopher Faylor <cgf@timesys.com>
1234 * child_info.h (child_info_fork::handle_failure): Declare new function.
1235 (child_info_fork::retry): New field.
1236 * dcrt0.cc (__api_fatal_exit_val): Define.
1237 (child_info_fork::handle_failure): Define new function.
1238 (__api_fatal): Exit using __api_fatal_exit_val value.
1239 * environ.cc (set_fork_retry): Set fork_retry based on CYGWIN
1240 environment variable.
1241 (parse_thing): Add "fork_retry" setting.
1242 * fork.cc (fork_retry): Define.
1243 (frok::parent): Reorganize to allow retry of failed child creation if
1244 child signalled that it was ok to do so.
1245 * heap.cc (heap_init): Signal parent via handle_failure when
1247 * pinfo.h (EXITCODE_RETRY): Declare.
1248 * sigproc.cc (child_info::sync): Properly exit with failure condition
1249 if called for fork and didn't see subproc_ready.
1250 * spawn.cc (spawn_guts): Use windows pid as first argument.
1251 * winsup.h: Remove obsolete NEW_MACRO_VARARGS define.
1252 (__api_fatal_exit_val): Declare.
1253 (set_api_fatal_return): Define.
1254 (in_dllentry): Declare.
1255 * exceptions.cc (inside_kernel): Remove unneeded in_dllentry
1258 2006-03-13 Christopher Faylor <cgf@timesys.com>
1260 * dcrt0.cc (dll_crt0_0): Reorganize so that sigproc_init is called a
1261 little later. Add a comment.
1262 * fork.cc (resume_child): Make void.
1263 (frok::parent): Only zero pi when necessary. Explicitly zero si. Set
1264 this_errno when child_copy fails. Accommodate change to resume_child.
1265 * sigproc.cc (sigalloc): Move global_sigs initialization here.
1266 (sigproc_init): Move global_sigs.
1267 (sig_send): Just check for flush signals once.
1269 * wincap.h: Define supports_setconsolectrlhandler_null throughout.
1272 2006-03-13 Corinna Vinschen <corinna@vinschen.de>
1274 * autoload.cc (LoadDLLfuncNt): New define to wrap NT native functions.
1275 Use for NT native functions throughout.
1276 * dtable.cc (handle_to_fn): Treat return value of NtQueryObject as
1279 2006-03-12 Christopher Faylor <cgf@timesys.com>
1281 * cygtls.cc (_cygtls::remove): Reset initialized flag right away if we
1282 were previously initialized.
1283 * cygtls.h (_cygtls::initialized): Move nearer to the end to catch
1284 situation when Windows 98 mysteriously changes parts of _my_tls when
1285 thread is detaching.
1286 * gendef (__sigfe_maybe): Simplify slightly.
1287 * tlsoffsets.h: Regenerate.
1289 2006-03-12 Christopher Faylor <cgf@timesys.com>
1291 * cygtls.h (CYGTLS_INITIALIZED): Change to a little more unlikely value.
1292 (CYGTLSMAGIC): Delete.
1293 * dcrt0.cc (dll_crt0_0): Call sigproc_init during init startup.
1294 (_dll_crt0): Don't worry about sync_startup. Just wait for sigthread here.
1295 * dll_init.cc (cygwin_detach_dll): Only pick up tls version of retaddr
1296 if we have a valid tls.
1297 * fork.cc (frok::child): Remove sigproc_init initialization since it
1298 happens much earlier now.
1299 * gendef: Recognize SIGFE_MAYBE.
1300 (fefunc): Generate calls to _sigfe_maybe, if appropriate.
1301 (_sigfe_maybe): New function.
1302 * init.cc (search_for): Always initialize search_for, even on fork.
1303 (calibration_thread): Delete.
1304 (calibration_id): Delete.
1305 (prime_threads): Delete.
1306 (munge_threadfunc): Remove calibration_thread special case. Avoid
1307 calling thread function if we haven't yet hit the "search_for" thread.
1308 (dll_entry): Remove prime_threads call. Only call munge_threadfunc
1309 when hwait_sig is active. Ditto. for _my_tls.remove ();
1310 * sigproc.cc (hwait_sig): Make global.
1311 (sigproc_init): Don't bother with sync_startup.
1312 (sig_send): Treat flush as a no-op when signals are held.
1313 (wait_sig): Cause signals to be held after fork.
1315 2006-03-09 Corinna Vinschen <corinna@vinschen.de>
1317 * syscalls.cc (rename): Move existance check for oldpath further up
1318 to the start of the function. Avoid another case of a name collision
1319 if oldpath is a shortcut and a file or directory newpath already exists.
1321 2006-03-09 Corinna Vinschen <corinna@vinschen.de>
1323 * autoload.cc (NtClose): Define.
1324 (NtOpenDirectoryObject): Define.
1325 (NtQueryDirectoryObject): Define.
1326 * fhandler_proc.cc: Include ctype.h and wchar.h.
1327 (format_proc_partitions): Revamp loop over existing harddisks by
1328 scanning the NT native \Device object directory and looking for
1330 * ntdll.h: Rearrange system call declarations alphabetically.
1331 (DIRECTORY_QUERY): Define.
1332 (struct _DIRECTORY_BASIC_INFORMATION): Define.
1333 (NtOpenDirectoryObject): Declare.
1334 (NtQueryDirectoryObject): Declare.
1336 2006-03-08 Christopher Faylor <cgf@timesys.com>
1338 * cygtls.h (_cygtls::retaddr): New method.
1339 * dll_init.cc (cygwin_detach_dll): Use new tls method to find return
1340 address since this function is now signal guarded.
1341 (update_envptrs): Remove unneeded braces.
1342 * syscalls.cc (statvfs): Coerce full_path to avoid a gcc warning.
1344 2006-03-08 Corinna Vinschen <corinna@vinschen.de>
1346 * syscalls.cc (statvfs): Simplify path name expression.
1348 2006-03-08 Corinna Vinschen <corinna@vinschen.de>
1350 * syscalls.cc: Include winioctl.h.
1351 (statvfs): Request correct volume size using DeviceIoControl if
1352 quotas are enforced on the file system.
1354 2006-03-03 Corinna Vinschen <corinna@vinschen.de>
1356 * dir.cc (opendir): Fix indentation.
1357 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Move storing
1358 fhandler in file descriptor table to some point very late in function
1359 to avoid double free'ing. Add comment to explain what happens.
1360 Add label free_mounts and don't forget to delete __DIR_mounts structure
1361 if NtOpenFile fails.
1363 2006-03-02 Corinna Vinschen <corinna@vinschen.de>
1365 * syscalls.cc (chroot): Disallow chroot into special directories.
1366 Return EPERM instead.
1368 2006-03-02 Corinna Vinschen <corinna@vinschen.de>
1370 * fhandler_disk_file.cc (__DIR_mounts::check_missing_mount): Check
1371 cygdrive string length for those who have cygdrive mapped to "/".
1373 2006-03-01 Corinna Vinschen <corinna@vinschen.de>
1375 * sec_helper.cc (set_cygwin_privileges): Request SE_BACKUP_NAME
1378 2006-03-01 Corinna Vinschen <corinna@vinschen.de>
1380 * fhandler_proc.cc (fhandler_proc::fstat): Always return fixed link
1381 count of 1 for /proc directory instead of incorrect PROC_LINK_COUNT.
1383 2006-03-01 Corinna Vinschen <corinna@vinschen.de>
1385 * fhandler.h (enum dirent_states): Remove dirent_saw_cygdrive,
1386 dirent_saw_dev and dirent_saw_proc.
1387 (fhandler_cygdrive::open): Declare.
1388 (fhandler_cygdrive::close): Declare.
1389 * fhandler_disk_file.cc (class __DIR_mounts): Move to beginning of file.
1390 (__DIR_mounts::check_mount): New parameter to indicate if inode number
1391 is needed in calling function or not. Add /proc and /cygdrive handling.
1392 (__DIR_mounts::check_missing_mount): Ditto.
1393 (path_conv::ndisk_links): Use __DIR_mounts class to create correct
1394 hardlink count for directories with mount points in them.
1395 (fhandler_disk_file::readdir_helper): Remove /dev, /proc and /cygdrive
1397 (fhandler_cygdrive::open): New method.
1398 (fhandler_cygdrive::close): New method.
1399 (fhandler_cygdrive::fstat): Always return fixed inode number 2 and
1400 fixed link count of 1. Drop call to set_drives.
1401 (fhandler_cygdrive::opendir): Drop call to get_namehash.
1402 (fhandler_cygdrive::readdir): Handle "." entry to return fixed inode
1405 2006-03-01 Christopher Faylor <cgf@timesys.com>
1407 * cygwin.din: Fix some erroneous SIGFE/NOSIGFE settings.
1409 2006-03-01 Christopher Faylor <cgf@timesys.com>
1411 * cygthread.cc (cygthread::callfunc): Revert below change. Make ev a
1412 manual reset event again. so that it will be reset by WaitFor*Object
1414 (cygthread::stub): Ditto.
1415 (cygthread::terminate_thread): Reset ev if it was found to have been
1418 2006-03-01 Christopher Faylor <cgf@timesys.com>
1420 * analyze_sigfe: New script.
1421 * dllfixdbg: Add copyright.
1423 * gendevices: Ditto.
1424 * gentls_offsets: Ditto.
1426 2006-03-01 Christopher Faylor <cgf@timesys.com>
1428 * cygthread.cc (cygthread::callfunc): Create ev as an auto-reset event
1429 so that it will be reset by WaitFor*Object as appropriate.
1430 (cygthread::stub): Ditto.
1431 (cygthread::terminate_thread): Remove forced setting of thread
1434 2006-03-01 Corinna Vinschen <corinna@vinschen.de>
1436 * include/sys/dirent.h (struct __DIR): Rename __d_unused to
1438 * fhandler_disk_file.cc (struct __DIR_cache): Remove useless "typedef".
1439 (d_dirname): Remove useless "struct".
1440 (d_cachepos): Ditto.
1442 (class __DIR_mounts): New class, implementing mount point tracking
1444 (d_mounts): New macro for easy access to __DIR_mounts structure.
1445 (fhandler_disk_file::opendir): Allocate __DIR_mounts structure and
1446 let __d_internal element of dir point to it.
1447 (fhandler_disk_file::readdir_helper): Add mount points in the current
1448 directory, which don't have a real directory backing them.
1449 Don't generate an inode number for /dev. Add comment, why.
1450 (fhandler_disk_file::readdir): Move filling fname to an earlier point.
1451 Check if current entry is a mount point and evaluate correct inode
1453 (fhandler_disk_file::readdir_9x): Ditto.
1454 (fhandler_disk_file::rewinddir): Set all mount points in this directory
1455 to "not found" so that they are listed again after calling rewinddir().
1456 (fhandler_disk_file::closedir): Deallocate __DIR_mounts structure.
1457 * path.cc (mount_info::get_mounts_here): New method to evaluate a list
1458 of mount points in a given parent directory.
1459 * shared_info.h (class mount_info): Declare get_mounts_here.
1461 2006-02-28 Corinna Vinschen <corinna@vinschen.de>
1463 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Use iscygdrive
1464 instead of isspecial.
1465 * path.h (path_conv::iscygdrive): New method.
1467 2006-02-28 Christopher Faylor <cgf@timesys.com>
1469 * exceptions.cc (_cygtls::interrupt_now): Remove "inside cygwin" check
1470 since some cygwin functions are meant to be interrupted.
1472 2006-02-28 Corinna Vinschen <corinna@vinschen.de>
1474 * cygwin.din: Export __isinff, __isinfd, __isnanf, __isnand.
1475 * include/cygwin/version.h: Bump API minor number to 155.
1477 2006-02-28 Corinna Vinschen <corinna@vinschen.de>
1479 * dir.cc (readdir_worker): Use slash as path separator when evaluating
1480 namehash for paths below /proc.
1481 * fhandler_netdrive.cc (fhandler_netdrive::readdir): Use expensive
1482 inode number evaluation on share names.
1484 2006-02-27 Christopher Faylor <cgf@timesys.com>
1486 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Only set
1487 d_cachepos under NT or suffer memory corruption.
1488 (fhandler_disk_file::readdir_helper): Avoid else with a return. Just
1489 calculate extension location once when doing symlink checks.
1490 (fhandler_disk_file::readdir): Make debug output more useful.
1491 (fhandler_disk_file::readdir_9x): Ditto. Eliminate redundant variable.
1493 2006-02-27 Christopher Faylor <cgf@timesys.com>
1495 * include/sys/termios.h (cfsetispeed): Just define as a function rather
1496 than resorting to a macro.
1497 (cfsetospeed): Ditto.
1499 2006-02-27 Christopher Faylor <cgf@timesys.com>
1501 * sigproc.cc: Fix a comment.
1503 2006-02-27 Christopher Faylor <cgf@timesys.com>
1505 * cygthread.cc (cygthread::release): Add a comment.
1507 2006-02-27 Corinna Vinschen <corinna@vinschen.de>
1509 * fhandler_netdrive.cc (fhandler_netdrive::fstat): Create unambiguous
1511 (fhandler_netdrive::readdir): Ditto.
1513 2006-02-24 Christopher Faylor <cgf@timesys.com>
1515 * sigproc.cc (sigheld): Define new variable.
1516 (sig_dispatch_pending): Don't check sigq since that's racy.
1517 (sig_send): Set sigheld flag if __SIGHOLD is specified, reset it if
1518 __SIGNOHOLD is specified. Ignore flush signals if we're holding
1521 2006-02-23 Christopher Faylor <cgf@timesys.com>
1523 * cygwin.din (_exit): Use signal front end.
1526 2006-02-23 Christopher Faylor <cgf@timesys.com>
1528 * winsup.h (cygwin_hmodule): Declare.
1529 * exceptions.cc (inside_kernel): Reverse return values to reflect
1530 function name. Return true if we're in cygwin1.dll or if we're
1531 executing in dll_entry.
1532 (_cygtls::interrupt_now): Reflect reversal of inside_kernel return
1534 * hookapi.cc (cygwin_hmodule): Remove declaration.
1535 * init.cc (dll_entry): Use in_dllentry global to record that we are
1536 executing in dllentry.
1538 2006-02-22 Corinna Vinschen <corinna@vinschen.de>
1540 * exceptions.cc (_cygtls::interrupt_now): Reorder conditional
1541 to call inside_kernel only if this isn't locked.
1543 2006-02-22 Corinna Vinschen <corinna@vinschen.de>
1545 * fhandler.cc (fhandler_base::open): Add FILE_READ_ATTRIBUTES to
1546 access flags in case of query_read_control case, add FILE_READ_DATA
1547 in case of query_stat_control.
1549 2006-02-20 Christopher Faylor <cgf@timesys.com>
1551 * spawn.cc (av::fixup): Check for .bat and friends specifically now
1552 since these extensions are no longer automatically detected.
1554 2006-02-19 Christopher Faylor <cgf@timesys.com>
1556 * exceptions.cc (stackdump): Avoid dumping more than once.
1558 2006-02-19 Christopher Faylor <cgf@timesys.com>
1560 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Use NtOpenFile
1561 to open the directory.
1562 (fhandler_disk_file::readdir): Use NT_SUCCESS to determine if status
1565 2006-02-19 Corinna Vinschen <corinna@vinschen.de>
1567 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Drop generating
1570 2006-02-18 Corinna Vinschen <corinna@vinschen.de>
1572 * fhandler_disk_file.cc (FS_IS_SAMBA): Move out of
1573 path_conv::hasgood_inode.
1574 (path_conv::is_samba): New method.
1575 (fhandler_base::fstat_by_handle): Don't even try to use
1576 FileIdBothDirectoryInformation on Samba.
1577 * path.h (class path_conv): Declare is_samba method.
1579 2006-02-17 Christopher Faylor <cgf@timesys.com>
1581 * path.cc (conv_path_list): Eat empty paths when converting to POSIX.
1582 (cygwin_conv_to_win32_path): Deal with Cygwin's necessity of adding a
1583 '/' to the end of a path ending in '.'.
1585 2006-02-16 Corinna Vinschen <corinna@vinschen.de>
1587 * cygwin.din: Export sigignore and sigset.
1588 * exceptions.cc (sigset): New function.
1589 (sigignore): New function.
1590 * include/cygwin/signal.h (SIG_HOLD): Define.
1591 (sigignore): Declare.
1593 * include/cygwin/version.h: Bump API minor number to 154.
1595 2006-02-13 Igor Peshansky <pechtcha@cs.nyu.edu>
1597 * include/mntent.h: Add missing #include.
1599 2006-02-13 Igor Peshansky <pechtcha@cs.nyu.edu>
1601 * gentls_offsets: Fix typo in error message.
1603 2006-02-10 Christopher Faylor <cgf@timesys.com>
1605 * fhandler_process.cc (format_process_stat): Use cygwin-derived start
1606 time even on NT since it is the logical start time of the "process".
1607 * pinfo.cc (set_myself): Don't set start time when it should have
1608 already been set previously.
1610 2006-02-10 Brian Ford <Brian.Ford@FlightSafety.com>
1612 * times.cc (clock_getres): Use correct conversion from milliseconds to
1613 seconds/nanoseconds.
1614 (clock_setres): Use correct conversion to nanoseconds.
1616 2006-02-10 Christopher Faylor <cgf@timesys.com>
1618 * external.cc (sync_winenv): Rename from "setup_winenv". Use same
1619 mechanism as spawn to determine environment variables which should be
1620 converted back to windows form.
1621 (cygwin_internal): Reflect setup_winenv -> sync_winenv name change.
1622 * include/sys/cygwin.h: Ditto.
1624 2006-02-09 Corinna Vinschen <corinna@vinschen.de>
1626 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Only set
1627 the dirent_get_d_ino flag on filesystems having useful File IDs.
1628 Add comment explaining why.
1630 2006-02-07 Corinna Vinschen <corinna@vinschen.de>
1632 * dtable.cc (handle_to_fn): Accommodate new argument order in call to
1634 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Call sys_wcstombs
1635 instead of just wcstombs to accommodate OEM codepages.
1636 * miscfuncs.cc (sys_wcstombs): Split len argument in source and target
1637 length. Always 0-terminate result in target string.
1638 * security.cc (lsa2wchar): Remove unused function.
1640 (get_lsa_srv_inf): Ditto.
1641 (get_logon_server): Accommodate new argument order in call to
1643 (get_user_groups): Ditto.
1644 (get_user_local_groups): Ditto.
1645 (get_priv_list): Call sys_wcstombs directly instead of lsa2str.
1646 * uinfo.cc (cygheap_user::ontherange): Accommodate new argument order
1647 in call to sys_wcstombs.
1648 * winsup.h (sys_wcstombs): Change prototype to match new argument order.
1650 2006-02-07 Corinna Vinschen <corinna@vinschen.de>
1652 * init.cc (respawn_wow64_process): Exit with the exit code returned
1653 by the respawned process.
1655 2006-02-06 Christopher Faylor <cgf@timesys.com>
1657 Always zero all elements of siginfo_t throughout.
1658 * cygtls.h (_cygtls::thread_context): Declare new field.
1659 (_cygtls::thread_id): Ditto.
1660 (_cygtls::signal_exit): Move into this class.
1661 (_cygtls::copy_context): Declare new function.
1662 (_cygtls::signal_debugger): Ditto.
1663 * cygtls.cc (_cygtls::init_thread): Fill out thread id field.
1664 * exceptions.cc (exception): Change message when exception info is
1665 unknown. Copy context to thread local storage.
1666 (_cygtls::handle_exceptions): Avoid double test for fault_guarded.
1667 Reflect move of signal_exit to _cygtls class.
1668 (sigpacket::process): Copy context to thread local storage.
1669 (_cygtls::signal_exit): Move to _cygtls class. Call signal_debugger to
1670 notify debugger of exiting signal (WIP). Call stackdump here (WIP).
1671 (_cygtls::copy_context): Define new function.
1672 (_cygtls::signal_debugger): Ditto.
1673 * tlsoffsets.h: Regenerate.
1674 * include/cygwin.h (_fpstate): New internal structure.
1675 (ucontext): Declare new structure (WIP).
1676 (__COPY_CONTEXT_SIZE): New define.
1678 * exceptions.cc (_cygtls::interrupt_setup): Clear "threadkill" field
1679 when there is no sigwaiting thread.
1680 (setup_handler): Move event handling into interrupt_setup.
1682 2006-02-06 Corinna Vinschen <corinna@vinschen.de>
1684 * fhandler_socket.cc (fhandler_socket::connect): Fix formatting.
1685 (fhandler_socket::wait): Handle SA_RESTART when signal arrives.
1687 2006-02-06 Corinna Vinschen <corinna@vinschen.de>
1689 * include/cygwin/socket.h (CMSG_FIRSTHDR): Avoid compiler warning.
1691 2006-02-05 Corinna Vinschen <corinna@vinschen.de>
1693 * include/features.h: Add comment to explain what's going to happen
1695 * include/sys/stdio.h: Guard getline and getdelim prototypes with
1696 _GNU_SOURCE to avoid collision with old-style declarations.
1698 2006-02-05 Corinna Vinschen <corinna@vinschen.de>
1700 * environ.cc (struct parse_thing): Add transparent_exe option.
1701 * fhandler_disk_file.cc (fhandler_disk_file::link): Accommodate
1702 transparent_exe option. Add .exe suffix for links to executable files,
1703 if transparent_exe is set.
1704 * fhandler_process.cc (fhandler_process::fill_filebuf): Remove .exe
1705 suffix if transparent_exe option is set.
1706 * path.cc (symlink_worker): Accommodate transparent_exe option.
1707 (realpath): Don't tack on .exe suffix if transparent_exe is set.
1708 * syscalls.cc (transparent_exe): New global variable.
1709 (unlink): Accommodate transparent_exe option.
1712 (rename): Ditto. Maybe add .exe suffix when renaming executable files.
1713 (pathconf): Accommodate transparent_exe option.
1714 * winsup.h: Declare transparent_exe.
1716 2006-02-05 Christopher Faylor <cgf@timesys.com>
1717 Corinna Vinschen <corinna@vinschen.de>
1719 * fhandler_disk_file.cc (fhandler_disk_file::readdir_9x): Remove
1722 2006-02-05 Corinna Vinschen <corinna@vinschen.de>
1724 * fhandler_disk_file.cc (fhandler_disk_file::rewinddir): Remove label
1725 "out". Move test for NULL __handle ...
1726 (fhandler_disk_file::rewinddir_9x): ... here.
1728 2006-02-05 Corinna Vinschen <corinna@vinschen.de>
1730 * dir.cc (rewinddir): Keep dirent_get_d_ino and dirent_set_d_ino flags.
1732 2006-02-05 Christopher Faylor <cgf@timesys.com>
1734 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Don't close dir
1735 handle when we hit EOF since rewwindir may reactivate it.
1736 (fhandler_disk_file::readdir_9x): Eliminate superfluous temporary
1738 (fhandler_disk_file::closedir): Return EBADF when trying to close
1739 unopened DIR. Reorganize slightly. Return actual derived error value
1740 rather than always returning 0.
1742 2006-02-04 Christopher Faylor <cgf@timesys.com>
1744 * dir.cc (rmdir): Reorganize check for trailing dot to return correct
1745 error when directory does not exist.
1747 2006-02-03 Christopher Faylor <cgf@timesys.com>
1749 * dir.cc (mkdir): Reorganize check for trailing dot to return correct
1750 error when directory exists.
1751 * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Remove special
1752 test for path ending in '.'.
1754 2006-02-03 Corinna Vinschen <corinna@vinschen.de>
1756 * path.cc (suffix_scan::lnk_match): Return true beginning with
1758 (suffix_scan::next): Rearrange code to make .lnk append order slightly
1760 * spawn.cc (exe_suffixes): Try no suffix before .exe suffix to align
1761 evaluation with stat_suffixes.
1762 (dll_suffixes): Ditto.
1764 2006-02-02 Christopher Faylor <cgf@timesys.com>
1766 * cygwin/version.h: Mention CW_SETUP_WINENV in comment for API minor
1769 2006-02-02 Corinna Vinschen <corinna@vinschen.de>
1771 * cygwin.din (updwtmpx): Export.
1772 * syscalls.cc (updwtmpx): New function.
1773 * include/utmpx.h (updwtmpx): Declare.
1774 * include/cygwin/version.h: Bump API minor number to 153.
1776 2006-02-02 Christopher Faylor <cgf@timesys.com>
1778 * external.cc (setup_winenv): New function.
1779 (cygwin_internal): Implement CW_SETUP_WINENV.
1780 * sys/cygwin.h (cygwin_getinfo_types): Define CW_SETUP_WINENV.
1782 2006-02-02 Corinna Vinschen <corinna@vinschen.de>
1784 * security.cc (is_group_member): Fix comment.
1786 2006-02-02 Corinna Vinschen <corinna@vinschen.de>
1788 * security.cc (is_group_member): Use local group info type 1. Test
1789 group for being a global group or a well-known SID before adding it
1790 to the group list. Add comment.
1792 2006-02-01 Corinna Vinschen <corinna@vinschen.de>
1794 * autoload.cc (GetTcpTable): Define.
1795 * fhandler_socket.cc (address_in_use): New function to check if
1796 sockaddr_in address is already in use.
1797 (fhandler_socket::bind): Check if address is alreay in use in case of
1798 SO_REUSEADDR, to circumvent WinSock non-standard behaviour.
1800 2006-02-01 Corinna Vinschen <corinna@vinschen.de>
1802 * spawn.cc (dll_suffixes): Add .exe and "no suffix" to the list.
1804 2006-01-31 Corinna Vinschen <corinna@vinschen.de>
1806 * dlfcn.cc (check_path_access): Call find_exec with FE_DLL option.
1807 * path.h (enum fe_types): Add FE_DLL value.
1808 * spawn.cc (std_suffixes): Remove.
1809 (exe_suffixes): New suffix_info for executing files.
1810 (dll_suffixes): New suffix_info for searching shared libraries.
1811 (perhaps_suffix): Add opt argument. Use dll_suffixes if FE_DLL
1812 option is given, exe_suffixes otherwise.
1813 (find_exec): Propagate opt argument to perhaps_suffix. Drop suffix
1814 check when testing execute permission.
1815 (spawn_guts): Call perhaps_suffix with FE_NADA opt argument.
1817 2006-01-31 Christopher Faylor <cgf@timesys.com>
1819 * spawn.cc (av::fixup): Remove unused argument.
1820 (spawn_guts): Remove capitalization in debugging.
1822 2006-01-31 Corinna Vinschen <corinna@vinschen.de>
1824 * spawn.cc (find_exec): Only return files with execute permission set
1825 if ntsec is on. Don't check execute permission of Windows batch files.
1826 (av::fixup): Handle empty files gracefully. Drop execute permission
1828 * path.cc (suffix_scan::next): Don't skip any suffix on first run.
1830 2006-01-31 Corinna Vinschen <corinna@vinschen.de>
1832 * path.cc (cwdstuff::set): Don't set win32 error, only POSIX errno.
1834 2006-01-31 Corinna Vinschen <corinna@vinschen.de>
1836 * path.cc (cwdstuff::set): When SetCurrentDirectory returns
1837 ERROR_INVALID_FUNCTION, bend it over to ERROR_FILE_NOT_FOUND. Add
1838 comment to explain why.
1840 2006-01-31 Corinna Vinschen <corinna@vinschen.de>
1842 * dir.cc (readdir_worker): Add comment about writing old 32 bit d_ino.
1843 * include/cygwin/version.h: Bump API minor number to 152.
1844 (CYGWIN_VERSION_CHECK_FOR_NEEDS_D_INO): Remove.
1846 2006-01-30 Corinna Vinschen <corinna@vinschen.de>
1848 * fhandler_disk_file.cc (fhandler_disk_file::rewinddir): Simplify
1851 2006-01-30 Corinna Vinschen <corinna@vinschen.de>
1853 * fhandler_disk_file.cc (d_cachepos): Rename from d_pos to distinct
1854 clearly from __d_position. Change throughout.
1855 (fhandler_disk_file::rewinddir): Reset readdir cache on NT.
1857 2006-01-29 Corinna Vinschen <corinna@vinschen.de>
1859 * fhandler_disk_file.cc (readdir_get_ino): Don't follow symlinks.
1861 2006-01-29 Corinna Vinschen <corinna@vinschen.de>
1863 * fhandler.h (class fhandler_socket): Add saw_reuseaddr status flag.
1864 * fhandler_socket.cc (fhandler_socket::bind): Set socket to
1865 SO_EXCLUSIVEADDRUSE if application didn't explicitely set SO_REUSEADDR
1866 socket option, on systems supporting SO_EXCLUSIVEADDRUSE.
1867 * net.cc (cygwin_setsockopt): Set fhandler's saw_reuseaddr status flag
1868 if SO_REUSEADDR socket option has been successsfully set.
1869 * wincap.h (wincaps::has_exclusiveaddruse): New element.
1870 * wincap.cc: Implement above element throughout.
1872 2006-01-28 Corinna Vinschen <corinna@vinschen.de>
1874 * fhandler_disk_file.cc (fhandler_disk_file::mkdir): In case or error,
1875 check for existance explicitely and set errno to EEXIST.
1877 2006-01-28 Corinna Vinschen <corinna@vinschen.de>
1879 * fhandler_disk_file.cc (DIR_NUM_ENTRIES): New define determining
1880 minimum number of dir entries which fit into the readdir cache.
1881 (DIR_BUF_SIZE): Define globally as size of readdir cache.
1882 (struct __DIR_cache): New structure used for readdir caching on NT.
1883 (d_dirname): Accessor for struct __DIR_cache, use throughout.
1886 (fhandler_disk_file::opendir): Allocate __d_dirname to contain readdir
1888 (fhandler_disk_file::readdir): Use buf as pointer into readdir cache.
1889 Implement readdir caching.
1891 2006-01-28 Corinna Vinschen <corinna@vinschen.de>
1893 * include/sys/dirent.h (struct dirent): Revert misguided attempt to
1894 rename __d_unused1 to __d_fd.
1896 2006-01-27 Corinna Vinschen <corinna@vinschen.de>
1898 * autoload.cc (NtQueryDirectoryFile): Define.
1899 * dir.cc (__opendir_with_d_ino): Just call opendir.
1900 (opendir): Remove CYGWIN_VERSION_CHECK_FOR_NEEDS_D_INO handling.
1901 (readdir_worker): Only try generating d_ino if it's 0.
1902 Utilize namehash of directories fhandler. Call readdir_get_ino to
1903 generate d_ino for "..".
1904 (seekdir64): Keep dirent_set_d_ino flag.
1905 * fhandler.h (enum dirent_states): Add dirent_get_d_ino.
1906 (class fhandler_disk_file): Declare new private methods readdir_helper
1908 * fhandler_disk_file.cc (path_conv::hasgood_inode): New method to
1909 evaluate if a filesystem has reliable inode numbers.
1910 (fhandler_base::fstat_by_handle): Accommodate structure member name
1911 change from IndexNumber to FileId.
1912 (fhandler_base::fstat_helper): Call hasgood_inode here.
1913 (fhandler_disk_file::opendir): Call fhaccess only for real files.
1914 Don't append '*' to __d_dirname here, move to readdir_9x. On NT,
1915 open directory handle here. Set dirent_get_d_ino and dirent_set_d_ino
1916 flags according to wincap and filesystem.
1917 (fhandler_disk_file::readdir_helper): New method to implement readdir
1918 postprocessing only once.
1919 (readdir_get_ino_by_handle): New static function.
1920 (readdir_get_ino): New function to centralize inode number evaluation
1921 in case inode number hasn't been returned by NtQueryDirectoryFile.
1922 (fhandler_disk_file::readdir): Move old functionality to readdir_9x.
1923 Call readdir_9x when on 9x/Me. Implement NT specific readdir here.
1924 (fhandler_disk_file::readdir_9x): Move 9x specific readdir here.
1925 (fhandler_disk_file::seekdir): Accommodate new NT readdir method.
1926 (fhandler_disk_file::closedir): Ditto.
1927 (fhandler_cygdrive::fstat): Set d_ino to namehash. Add comment.
1928 (fhandler_cygdrive::opendir): Call get_namehash to prepare later
1929 correct evaluation of d_ino.
1930 (fhandler_cygdrive::readdir): Replace recursion with loop. Evaluate
1931 drive's d_ino by calling readdir_get_ino.
1932 * fhandler_proc.cc (fhandler_proc::readdir): Set dirent_saw_dot and
1933 dirent_saw_dot_dot to avoid seeing . and .. entries twice.
1934 * fhandler_process.cc (fhandler_process::readdir): Ditto.
1935 * fhandler_registry.cc (fhandler_registry::readdir): Ditto.
1936 * ntdll.h (STATUS_INVALID_PARAMETER): New define.
1937 (STATUS_INVALID_LEVEL): New define.
1938 (struct _FILE_INTERNAL_INFORMATION): Rename member IndexNumber to
1939 FileId (as in Nebbitt).
1940 * path.h (path_conv::hasgood_inode): Now implemented in
1941 fhandler_disk_file.cc.
1942 * wincap.h (wincaps::has_fileid_dirinfo): New element.
1943 * wincap.cc: Implement above element throughout.
1944 * winsup.h (readdir_get_ino): Add declaration.
1945 * include/sys/dirent.h (struct dirent): Slightly rename structure
1946 members to accommodate changes.
1947 Remove __USE_EXPENSIVE_CYGWIN_D_INO handling and declaration of
1948 __opendir_with_d_ino.
1950 2006-01-27 Christopher Faylor <cgf@timesys.com>
1952 * spawn.cc (spawn_guts): Fix potential handle leak when failing exec.
1954 2006-01-27 Christopher Faylor <cgf@timesys.com>
1956 * exceptions.cc (inside_kernel): Fix to return true if we can't get the
1957 name of the DLL for the given memory block since we are not in kernel
1960 2006-01-26 Corinna Vinschen <corinna@vinschen.de>
1962 * fhandler.cc (fhandler_base::open): Fix bug in argument order to
1963 InitializeObjectAttributes call.
1965 2006-01-25 Corinna Vinschen <corinna@vinschen.de>
1967 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix test for
1968 dirent_isroot to use the correct boolean operator.
1970 2006-01-25 Christopher Faylor <cgf@timesys.com>
1972 * ntdll.h: (temporarily?) Add more functions for querying directory.
1974 2006-01-24 Christopher Faylor <cgf@timesys.com>
1976 * dir.cc (readdir_worker): Turn off expensive inode calculation.
1978 2006-01-24 Corinna Vinschen <corinna@vinschen.de>
1980 * fhandler_process.cc (fhandler_process::fill_filebuf): Disable
1981 stripping the .exe suffix from the link target in PROCESS_EXE and
1982 PROCESS_EXENAME case.
1983 * path.cc (realpath): Tack on .exe suffix if necessary.
1985 2006-01-24 Corinna Vinschen <corinna@vinschen.de>
1987 * fhandler_disk_file.cc (fhandler_base::fstat_helper): Try harder
1988 to determine remote file systems with reliable inode numbers. Add
1991 2006-01-23 Corinna Vinschen <corinna@vinschen.de>
1993 * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Reset
1994 inheritance for duplicated socket.
1996 2006-01-20 Christopher Faylor <cgf@timesys.com>
1998 * include/cygwin/version.h: Bump API minor number to 151.
1999 * dir.cc (__opendir_with_d_ino): New function.
2000 (opendir): Set flag if we should be calculating inodes.
2001 (readdir_worker): Calculate d_ino by calling stat if the user has asked
2003 (seekdir64): Maintain all persistent flag settings.
2004 * fhandler.h (dirent_states): Add dirent_set_d_ino.
2005 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Reflect changes
2006 to dirent structure.
2007 * fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
2008 * include/sys/dirent.h (struct dirent): Coalesce two similar
2009 structures. Remove all shreds of the apparently highly confusing
2010 references to inodes. Add support for calculating a real inode if
2011 __USE_EXPENSIVE_CYGWIN_D_INO is defined.
2013 2006-01-20 Christopher Faylor <cgf@timesys.com>
2015 * include/sys/dirent.h: Add comments for people who are REALLY confused
2016 about whether they should be using something called __invalid_d_ino or
2019 2006-01-20 Corinna Vinschen <corinna@vinschen.de>
2021 * fhandler_socket.cc (fhandler_socket::prepare): Fix debug output.
2022 (fhandler_socket::release): Add debug output for WSAEventSelect failure.
2023 (fhandler_socket::ioctl): Always cancel WSAEventSelect before switching
2024 to blocking mode. Only set nonblocking flag if ioctlsocket call
2025 succeeded. Only print new socket state if ioctlsocket call succeeded.
2027 2006-01-19 Christopher Faylor <cgf@timesys.com>
2029 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Check posix path
2030 for root rather than windows path.
2032 2006-01-19 Christopher Faylor <cgf@timesys.com>
2034 * dir.cc (readdir_worker): Fill in invalid fields with -1. Accommodate
2035 name change from __ino32 to __invalid_ino32.
2036 * include/sys/dirent.h (__invalid_ino32): Rename from __ino32. Don't
2037 define unused d_type macros.
2039 2006-01-18 Christopher Faylor <cgf@timesys.com>
2041 * heap.cc (heap_init): Remove Sleep.
2043 2006-01-18 Corinna Vinschen <corinna@vinschen.de>
2045 * net.cc (rresvport): Remove extern declaration.
2047 2006-01-18 Corinna Vinschen <corinna@vinschen.de>
2049 * autoload.cc (rresvport): Remove.
2050 * net.cc (last_used_rrecvport): New global shared variable.
2051 (cygwin_rresvport): Implement rresvport without using rresvport from
2054 2006-01-18 Corinna Vinschen <corinna@vinschen.de>
2056 * include/cygwin/socket.h (struct sockaddr_storage): Fix typo in
2057 ss_family member name.
2059 2006-01-16 Christopher Faylor <cgf@timesys.com>
2061 * include/cygwin/version.h: Bump DLL minor version number to 20.
2063 2006-01-13 Corinna Vinschen <corinna@vinschen.de>
2065 * uname.cc (uname): Concatenate a "-WOW64" to utsname's sysname
2066 member to see when running under WOW64.
2068 2006-01-13 Corinna Vinschen <corinna@vinschen.de>
2070 * net.cc (cygwin_setsockopt): Ignore errors when setting IP_TOS on
2071 Windows 2000 and above. Clarify the comment about IP_TOS and move
2072 to the place where the magic happens.
2073 (get_ifconf): Remove unused code.
2074 * wincap.h (wincaps::has_disabled_user_tos_setting): New element.
2075 * wincap.cc: Implement above element throughout.
2077 2006-01-12 Christopher Faylor <cgf@timesys.com>
2079 * fhandler_console.cc (set_console_state_for_spawn): Fix to recognize
2082 2006-01-12 Christopher Faylor <cgf@timesys.com>
2084 * fhandler.h (set_console_state_for_spawn): Whackamole the argument
2086 * spawn.cc (spawn_guts): Ditto, i.e., once again call
2087 set_console_state_for_spawn with an indication of whether we're about
2088 to start a cygwin process.
2089 * fhandler_console.cc (set_console_state_for_spawn): Don't set the
2090 console state if we know we're starting a cygwin process or if we're
2093 2006-01-10 Corinna Vinschen <corinna@vinschen.de>
2095 * dcrt0.cc (dll_crt0_0): Remove call to wincap.init.
2096 * init.cc (dll_entry): Rename is_wow64_proc to wow64_test_stack_marker.
2097 Call wincap.init here before doing anything else. Use wincap.is_wow64
2098 to determine if we're running in a WOW64 emulator.
2099 * mmap.cc (MapViewNT): Don't use AT_ROUND_TO_PAGE in WOW64, it's
2100 apparently not supported.
2101 (mmap64): Don't create mappings beyond EOF, which would need to use
2102 AT_ROUND_TO_PAGE, on WOW64.
2103 * wincap.cc (wincap): Throw into the .cygwin_dll_common section.
2104 (wincapc::init): Determine if running in WOW64 and set wow_64 flag.
2105 * wincap.h (class wincapc): Add wow64 member.
2106 (wincapc::is_wow64): New method.
2108 2006-01-10 Christopher Faylor <cgf@timesys.com>
2110 * fhandler_proc.cc (format_proc_cpuinfo): Avoid leading whitespace in
2113 2006-01-09 Christopher Faylor <cgf@timesys.com>
2115 * spawn.cc (spawn_guts): Reorganize slightly so that 16 bit check is
2116 done prior to check for command.com/cmd.com. Don't bother setting
2117 CREATE_SUSPENDED flag for a MS-DOS process since it doesn't work
2118 anyway. Avoid calling remember() when the child process has already
2120 (av::fixup): Explicitly set cygexec flag to false on a 16 bit process.
2122 2006-01-09 Corinna Vinschen <corinna@vinschen.de>
2124 * include/getopt.h (getopt_long_only): Declare.
2126 2006-01-09 Eric Blake <ebb9@byu.net>
2128 * cygwin.din: Export getsubopt.
2129 * include/cygwin/version.h: Bump API minor version.
2131 2006-01-08 Christopher Faylor <cgf@timesys.com>
2133 * fhandler_tty.cc (fhandler_tty_slave::dup): Don't assign a controlling
2134 terminal to a process when duped. Linux doesn't do this, so we won't
2137 2006-01-08 Christopher Faylor <cgf@timesys.com>
2139 * environ.cc (spenvs[]): windir -> WINDIR.
2141 2006-01-07 Christopher Faylor <cgf@timesys.com>
2143 * fhandler_console.cc (fhandler_console::need_invisible): Remove
2146 2006-01-07 Christopher Faylor <cgf@timesys.com>
2148 * fhandler.h (set_console_state_for_spawn): Eliminate argument from
2150 * fhandler.cc (set_console_state_for_spawn): Eliminate argument from
2151 definition. Always check for invisible console.
2152 (fhandler_console::need_invisible): Don't do anything if the windows
2153 station is already not visible.
2154 * spawn.cc (spawn_guts): Accommodate change of argument to
2155 set_console_state_for_spawn.
2157 2006-01-05 Christopher Faylor <cgf@timesys.com>
2159 * sigproc.cc (no_signals_available): Use existence of signal thread
2160 handle to figure out if we can actually send signals rather than
2161 relying on my_sendsig.
2162 (hwait_sig): Make static.
2163 (sigproc_init): Don't set my_sendsig to anything special. Use new
2164 global static hwait_sig.
2165 (wait_sig): Set hwait_sig to NULL when we are exiting.
2167 2006-01-05 Christopher Faylor <cgf@timesys.com>
2169 * include/getopt.h: Accommodate recent unfortunate newlib changes.
2171 2006-01-05 Christopher Faylor <cgf@timesys.com>
2173 * cygtls.cc (_cygtls::remove): Don't output debugging info if this
2174 isn't a cygwin thread.
2175 * sigproc.cc (sigproc_init): Move clearing of sync_startup here to
2176 lessen the likelihood of trying to deal with non-cygwin threads in
2179 * fhandler_console: Fix set_console_state_for_spawn comment.
2181 2006-01-05 Igor Peshansky <pechtcha@cs.nyu.edu>
2183 * spawn.cc (spawn_guts): Invert the argument to
2184 set_console_state_for_spawn.
2186 2006-01-04 Christopher Faylor <cgf@timesys.com>
2188 * fhandler_console.cc (fhandler_console::need_invisible): Only try to
2189 open "CygwinInvisible" windows station if opening of default station
2190 fails. Use CloseWindowStation to close window station handle.
2192 2006-01-04 Christopher Faylor <cgf@timesys.com>
2194 * fhandler_console.cc (fhandler_console::need_invisible): Open up the
2195 security of the newly created windows station.
2197 2006-01-04 Eric Blake <ebb9@byu.net>
2199 * path.cc (dot_special_chars): Add ", <, >, and |.
2201 2006-01-03 Christopher Faylor <cgf@timesys.com>
2203 * fhandler_console.cc (beep): Use MB_OK which is documented as using
2204 the default bell rather than -1 which seems to behave differently on
2205 different versions of Windows.
2207 2006-01-03 Christopher Faylor <cgf@timesys.com>
2209 * fhandler_process.cc (fhandler_process::readdir): Add missing argument
2212 * fhandler_console.cc (fhandler_console::need_invisible): Use made-up
2213 name for windows station rather than asking Windows to create one for
2216 * spawn.cc (spawn_guts): Don't mess with console if we're detaching.
2218 2006-01-03 Christopher Faylor <cgf@timesys.com>
2220 * dir.cc (readdir_worker): Minor code cleanup.
2222 * fhandler_console.cc (beep): Use a more Windows-generic wav file if
2223 the beep is missing. Use a more foolproof way to find out whether we
2224 should be recreating the missing key.
2226 * registry.h (reg_key::_disposition): New field.
2227 (reg_key::created): New function.
2228 * registry.cc (reg_key::reg_key): Set _disposition to zero by default.
2229 (reg_key::build_key): Fill in _disposition field.
2231 2006-01-03 Eric Blake <ebb9@byu.net>
2233 * dir.cc (readdir_worker): Ensure that saw_dot* flags are updated when
2234 not handling inodes.
2236 2006-01-02 Christopher Faylor <cgf@timesys.com>
2238 * fhandler_console.cc (beep): New function. Restores missing "Default
2239 Beep", if necessary.
2240 (fhandler_console::write_normal): Use beep().
2242 2006-01-02 Christopher Faylor <cgf@timesys.com>
2244 * dcrt0.cc (_dll_crt0): Remove more leftover debugging stuff.
2245 (cygwin_dll_init): Remove unneeded initializations. Call _dll_crt0
2246 rather than dll_crt0_1.
2248 2006-01-02 Corinna Vinschen <corinna@vinschen.de>
2250 * syslog.cc: Include sys/un.h instead of sys/socket.h.
2251 (syslogd_inited): Convert to enum type noting the exact result of
2252 trying to connect to syslog daemon. Use this way throughout.
2253 (connect_syslogd): New static function taking over the task to
2254 connect to syslog socket. Use correct struct sockaddr_un instead of
2256 (try_connect_syslogd): Call connect_syslogd. If write fails on
2257 connection oriented socket, try to reconnect to syslog socket and
2260 2006-01-01 Christopher Faylor <cgf@timesys.com>
2262 * pinfo.cc (pinfo::exit): Swap signal and normal exit value when not
2263 started from a cygwin process - just like the good-old-days of B20.
2265 2006-01-01 Christopher Faylor <cgf@timesys.com>
2267 * strace.cc (strace::write_childpid): Remove debugging output.
2269 2006-01-01 Christopher Faylor <cgf@timesys.com>
2271 * cygtls.cc (_cygtls::remove): Remove left over debugging cruft which
2272 caused this function to always return prematurely.
2274 2006-01-01 Christopher Faylor <cgf@timesys.com>
2276 * exceptions.cc (sigpacket::process): Pass actual reference to signal's
2277 sigaction structure to setup_handler.
2279 2006-01-01 Christopher Faylor <cgf@timesys.com>
2281 * exceptions.cc (_cygtls::interrupt_setup): Implement SA_RESETHAND.
2282 * include/cygwin/signal.h: Define SA_ONESHOT and SA_NOMASK.
2284 * dcrt0.cc (get_cygwin_startup_info): Remove commented out code.
2286 2006-01-01 Corinna Vinschen <corinna@vinschen.de>
2288 * syslog.cc (vklog): Never log kernel messages using the vsyslog