1 2006-07-14 Christopher Faylor <cgf@timesys.com>
3 * fork.cc (fork): Lock the process before forking to prevent things
4 like new fds from being opened, etc.
5 * sync.h (lock_process::dont_bother): New function.
7 2006-07-14 Christopher Faylor <cgf@timesys.com>
9 * include/cygwin/types.h: Update copyright.
11 2006-07-14 Christopher Faylor <cgf@timesys.com>
13 * cygwin.sc: Make sure there's something in the cygheap.
14 * dllfixdbg: Accommodate newer binutils which put the gnu_debuglink at
15 the end rather than at the beginning.
17 2006-07-13 Christopher Faylor <cgf@timesys.com>
19 * sigproc.cc (waitq_head): Don't initialize to zero.
20 * sigproc.h: Update copyright, fix whitespace.
22 2006-07-13 Christopher Faylor <cgf@timesys.com>
24 * fhandler.cc (fhandler_base::raw_read): Only return EISDIR when we're
25 really trying to read a directory.
27 * sigproc.cc: Use "Static" where appropriate.
29 2006-07-13 Corinna Vinschen <corinna@vinschen.de>
31 * fhandler_socket.cc: Update copyright.
32 * include/pthread.h: Ditto.
34 2006-07-13 Corinna Vinschen <corinna@vinschen.de>
36 * mmap.cc (mmap64): Drop MAP_NORESERVE flag for non-anonymous,
38 (mmap_record::unmap_pages): Only check noreserve flag which now implies
39 anonymous and private.
41 (fixup_mmaps_after_fork): Ditto.
43 2006-07-13 Corinna Vinschen <corinna@vinschen.de>
45 * mmap.cc (mmap64): Drop MAP_RESERVED flag for all non-anonymous,
48 2006-07-13 Corinna Vinschen <corinna@vinschen.de>
50 * exceptions.cc (_cygtls::handle_exceptions): Call new
51 mmap_is_attached_or_noreserve_page function in case of access violation
52 and allow application to retry access on noreserve pages.
53 * mmap.cc (mmap_is_attached_or_noreserve_page): Changed from
54 mmap_is_attached_page. Handle also noreserve pages now. Change
56 * winsup.h (mmap_is_attached_or_noreserve_page): Declare instead of
57 mmap_is_attached_page.
59 2006-07-12 Corinna Vinschen <corinna@vinschen.de>
61 * mmap.cc (mmap_record::alloc_page_map): Don't call VirtualProtect
62 on maps created with MAP_NORESERVE.
64 2006-07-12 Corinna Vinschen <corinna@vinschen.de>
66 * include/pthread.h: Define PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT and
67 PTHREAD_PRIO_PROTECT only if _POSIX_THREAD_PRIO_INHERIT is defined.
69 2006-07-10 Corinna Vinschen <corinna@vinschen.de>
71 * libc/inet_addr.c: Define __INSIDE_CYGWIN_NET__.
72 * libc/inet_network.c: Ditto.
74 2006-07-07 Corinna Vinschen <corinna@vinschen.de>
76 * fhandler_socket.cc (fhandler_socket::wait): Disable SA_RESTART
79 2006-07-07 Corinna Vinschen <corinna@vinschen.de>
81 * Makefile.in (DLL_OFILES): Add inet_addr.o and inet_network.o.
82 * autoload.cc (inet_addr): Drop definition.
84 * net.cc: Forward declare cygwin_inet_aton and cygwin_inet_ntop.
85 (cygwin_inet_ntoa): Call cygwin_inet_ntop instead of Winsock inet_ntoa.
86 (cygwin_inet_addr): Remove here.
87 (cygwin_inet_aton): Ditto.
88 (cygwin_inet_network): Ditto.
89 * libc/inet_addr.c: New file implementing cygwin_inet_aton and
91 * libc/inet_network.c: New file implementing cygwin_inet_network.
93 2006-07-06 Christopher Faylor <cgf@timesys.com>
95 * hookapi.cc: Add comment header
96 (putmem): Make static.
98 (rvadelta): Ditto. Don't assume that a section which ends where the
99 import_rva begins is the import list.
101 * child_info.h: Update copyright.
104 2006-07-05 Christopher Faylor <cgf@timesys.com>
106 * sortdin: Ignore all leading underscores when deriving a sort key.
107 * cygwin.din: Resort.
109 2006-07-05 Christopher Faylor <cgf@timesys.com>
111 * sortdin: New program.
114 2006-07-05 Corinna Vinschen <corinna@vinschen.de>
116 * fhandler.h (fhandler_socket::wait): Reset default timeout to 10ms.
118 2006-07-05 Corinna Vinschen <corinna@vinschen.de>
120 * path.cc (path_conv::check): Ignore has_ea setting, it's always unset
121 at this point anyway.
122 (get_symlink_ea): Remove.
123 (set_symlink_ea): Remove.
124 (symlink_worker): Drop writing symlink into NTFS extended attributes.
125 (symlink_info::check): Drop reading symlinks from NTFS extended
128 2006-07-04 Christopher Faylor <cgf@timesys.com>
130 * libc/rexec.cc (cygwin_rexec): Obvious (?) fix to correct a gcc
131 warning - set port to zero first thing in the function.
133 2006-07-04 Corinna Vinschen <corinna@vinschen.de>
135 * signal.cc (signal): Set sa_mask to sig.
137 2006-07-04 Corinna Vinschen <corinna@vinschen.de>
139 * Makefile.in (DLL_OFILES): Add rexec.o.
140 * autoload.cc (inet_network): Drop definition.
142 * net.cc (rexec): Drop extern declaration.
143 (inet_network): Ditto.
144 (cygwin_inet_network): Implement using inet_addr.
145 (cygwin_rexec): Remove.
146 * libc/rexec.cc: New file.
148 2006-07-04 Corinna Vinschen <corinna@vinschen.de>
150 * fhandler_socket.cc (fhandler_socket::listen): Allow listening on
153 2006-07-04 Corinna Vinschen <corinna@vinschen.de>
155 * fhandler.h (fhandler_socket::wait): Set default timeout to INFINITE.
157 2006-07-03 Corinna Vinschen <corinna@vinschen.de>
159 * autoload.cc (NtQueryEaFile): Define.
160 (NtSetEaFile): Define.
161 * fhandler.cc (fhandler_base::open): Use appropriate open flags
162 in query case when allow_ntea is set.
163 * ntdll.h (struct _FILE_GET_EA_INFORMATION): Define.
164 (struct _FILE_FULL_EA_INFORMATION): Define.
165 (NtQueryEaFile): Declare.
166 (NtSetEaFile): Declare.
167 * ntea.cc (read_ea): Rename from NTReadEA and rewrite using
169 (write_ea): Rename from NTWriteEA and rewrite using NtSetEaFile.
170 * path.cc (get_symlink_ea): Make static. Add handle parameter to
171 accomodate new read_ea call.
172 (set_symlink_ea): Make static. Add handle parameter to accomodate new
174 (symlink_worker): Call set_symlink_ea while file is still open.
175 (symlink_info::check): Call get_symlink_ea after file has been opened.
176 * security.cc (get_file_attribute): Accomodate new read_ea call.
177 (set_file_attribute): Accomodate new write_ea call.
178 * security.h (read_ea): Change declaration accordingly.
181 2006-07-03 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
183 * fhandler.h (class dev_console): Add `metabit' indicating the
184 current meta key mode.
185 * fhandler_console.cc (fhandler_console::read): Set the top bit of
186 the character if metabit is true.
187 * fhandler_console.cc (fhandler_console::ioctl): Implement
188 KDGKBMETA and KDSKBMETA commands.
189 * fhandler_tty.cc (process_ioctl): Support KDSKBMETA.
190 (fhandler_tty_slave::ioctl): Send KDGKBMETA and KDSKBMETA to the
192 * include/cygwin/kd.h: New file for the meta key mode.
193 * include/sys/kd.h: New file.
195 2006-07-03 Eric Blake <ebb9@byu.net>
197 * include/stdint.h (UINT8_C, UINT16_C): Unsigned types smaller
198 than int promote to signed int.
200 2006-07-03 Corinna Vinschen <corinna@vinschen.de>
202 * net.cc (cygwin_sendto): Define appropriate parameters using
203 socklen_t type according to SUSv3.
204 (cygwin_recvfrom): Ditto.
205 (cygwin_setsockopt): Ditto.
206 (cygwin_getsockopt): Ditto.
207 (cygwin_connect): Ditto.
208 (cygwin_accept): Ditto.
209 (cygwin_bind): Ditto.
210 (cygwin_getsockname): Ditto.
211 (cygwin_getpeername): Ditto.
212 (cygwin_recv): Ditto.
213 (cygwin_send): Ditto.
214 * include/cygwin/socket.h (socklen_t): Typedef and define.
215 * include/sys/socket.h: Declare socket functions using socklen_t type.
217 2006-07-02 Christopher Faylor <cgf@timesys.com>
219 * include/cygwin/version.h: Bump DLL minor version number to 21.
221 2006-06-30 Corinna Vinschen <corinna@vinschen.de>
223 * net.cc (cygwin_sendto): Allow zero-sized packets.
224 (cygwin_sendmsg): Ditto.
226 2006-06-26 Corinna Vinschen <corinna@vinschen.de>
228 Revert patches from 2005-10-22 and 2006-06-14 to use event driven
229 accept and connect back to using select:
230 * fhandler.h (class fhandler_socket): Remove accept_mtx.
231 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Drop
232 initializing accept_mtx.
233 (fhandler_socket::accept): Drop event handling.
234 (fhandler_socket.cc (fhandler_socket::connect): Ditto.
235 (fhandler_socket::dup): Drop accept_mtx handling.
236 (fhandler_socket::listen): Ditto.
237 (fhandler_socket::prepare): Ditto.
238 (fhandler_socket::release): Ditto.
239 (fhandler_socket::close): Ditto.
240 * net.cc (cygwin_accept): Revert to calling cygwin_select to
241 implement interuptible accept.
242 (cygwin_connect): Ditto for connect.
244 2006-06-22 Christopher Faylor <cgf@timesys.com>
246 * fhandler_fifo.cc (fhandler_fifo::open): Release process lock and grab
247 a system-wide mutex to prevent a deadlock and a race.
248 * sync.h (lock_process): Make fhandler_fifo a friend.
250 * smallprint.c (__small_vsprintf): Cosmetic change.
252 2006-06-15 Corinna Vinschen <corinna@vinschen.de>
254 * cygwin.din: Export __srget_r, __swbuf_r.
255 * include/cygwin/version.h: Bump API minor number to 156.
257 2006-06-14 Corinna Vinschen <corinna@vinschen.de>
259 * fhandler.h (class fhandler_socket): Add private mutex handle
261 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Initialize
263 (fhandler_socket::dup): Duplicate accept_mtx, if available.
264 (fhandler_socket::listen): Create accept_mtx before trying to listen.
265 (fhandler_socket::prepare): Wait for accept_mtx if available to
266 serialize accepts on the same socket.
267 (fhandler_socket::release): Release accept_mtx.
268 (fhandler_socket::close): Close accept_mtx on successful closesocket.
270 2006-06-12 Christopher Faylor <cgf@timesys.com>
272 * fhandler_tty.cc (fhandler_pty_master::close): Always close
273 from_master/to_master since we always have copies of these handles.
275 2006-06-12 Corinna Vinschen <corinna@vinschen.de>
277 * include/sys/wait.h: Move definition of wait constants from here...
278 * include/cygwin/wait.h: ...to here. New file.
279 * include/cygwin/stdlib.h: Include cygwin/wait.h to conform with SUSv3.
281 2006-06-12 Pierre Humblet Pierre.Humblet@ieee.org
283 * heap.cc (heap_init): Only commit if allocsize is not zero.
285 2006-06-12 Corinna Vinschen <corinna@vinschen.de>
287 * net.cc (fdsock): Disable raising buffer sizes. Add comment to
290 2006-06-04 Christopher Faylor <cgf@timesys.com>
292 * ioctl.cc (ioctl): Accommodate change in reported pty master device
294 * select.cc (peek_pipe): Ditto.
296 2006-06-04 Christopher Faylor <cgf@timesys.com>
298 * cygtls.h (CYGTLS_PADSIZE): Reset to a size that XP SP1 seems to like.
299 * tlsoffsets.h: Regenerate.
301 2006-06-03 Christopher Faylor <cgf@timesys.com>
303 * cygthread.cc (cygthread::terminate_thread): In debugging output, use
304 name of thread being terminated rather than thread doing the
307 * fhandler.h (fhandler_pty_master::slave): Delete.
308 (fhandler_pty_master::get_unit): Ditto.
309 (fhandler_pty_master::setup): Change argument declaration to
310 accommodate new usage.
311 * fhandler_tty.cc (fhandler_tty_master::init): Remove obsolete slave
312 assignment. Pass argument to setup indicating that this is a tty.
313 (fhandler_tty_slave::open): Use dev() method rather than referencing
315 (fhandler_pty_master::open): Don't create archetype based on ptym
316 device number. Set device number to use DEV_TTYM_MAJOR and tty number.
317 Pass argument to setup indicating that this is a pty.
318 (fhandler_pty_master::setup): Change single argument to a flag
319 indicating whether we're creating a pty and use appropriately.
320 Calculate 't' variable here rather than in caller.
322 * fhandler_dsp.cc (fhandler_dev_dsp::open): Use dev() method rather
323 than referencing pc.dev directly.
325 2006-06-03 Christopher Faylor <cgf@timesys.com>
327 * dcrt0.cc (dll_crt0_0): Call tty_list::init_session here.
328 (dll_crt0_1): Reflect renaming from tty_init to tty::init_session.
329 (do_exit): Reflect moving of tty_terminate into tty_list.
330 * exceptions.cc (events_init): Move tty_mutex stuff elsewhere.
331 * fhandler_console.cc (set_console_title): Use lock_ttys class.
332 * fhandler_termios.cc (fhandler_termios::bg_check): Make debug output
334 * fhandler_tty.cc (fhandler_tty_slave::open): Reflect move of
335 attach_tty into tty_list class. Don't attempt to grab master end of
336 pty if master doesn't exist.
337 (fhandler_pty_master::open): Reflect move of allocate_tty into tty_list
338 class. Use lock_ttys::release to release mutex. Improve debugging
340 (fhandler_pty_master::setup): Remove if 0'ed block. Fix argument to
341 SetNamedPipeHandleState.
342 * pinfo.cc (_pinfo::set_ctty): Lock ttys before setting sid/pgid.
343 Improve debugging. Add temporary debugging.
344 * tty.cc (tty_list::init_session): New function.
345 (tty::init_session): Rename from tty_init. Reflect move of attach_tty
347 (tty::create_master): Rename from create_tty_master.
348 (tty_list::attach): Rename from attach_tty. Reflect renaming of
349 connect_tty to connect. Ditto for allocate_tty.
350 (tty_terminate): Delete.
351 (tty_list::terminate): Subsume tty_terminate. Use lock_ttys rather
352 than manipulating mutex directly.
353 (tty_list::allocate): Rename from allocate_tty. Use lock_ttys rather
354 than manipulating mutex directly. Don't set sid here since linux
355 apparently doesn't do this. Reflect move of create_tty_master into
357 (lock_ttys::lock_ttys): Define new constructor.
358 (lock_ttys::release): New function.
359 * tty.h (tty::exists): Return false immediately if !master_pid.
360 (tty::set_master_closed): Define new function.
361 (tty::create_master): Ditto.
362 (tty::init_session): Ditto.
363 (tty_list::mutex): New field.
364 (tty_list::allocate): Define new function.
365 (tty_list::connect): Ditto.
366 (tty_list::attach): Ditto.
367 (tty_list::init_session): Ditto.
368 (lock_ttys): New class.
369 (tty_init): Delete declaration.
370 (tty_terminate): Ditto.
372 (create_tty_master): Ditto.
374 2006-06-03 Christopher Faylor <cgf@timesys.com>
376 * Makefile.in (libdl.a): New library.
378 2006-06-03 Christopher Faylor <cgf@timesys.com>
380 * fhandler_tty.cc (fhandler_pty_master::close): Don't close handles if
382 (fhandler_pty_master::setup): Make sure that original handle is closed
383 when changing inheritance.
384 (fhandler_pty_master::fixup_after_fork): Set from_master/to_master to
386 (fhandler_pty_master::fixup_after_exec): Clear from_master/to_master
389 2006-06-03 Christopher Faylor <cgf@timesys.com>
391 * cygheap.cc (init_cygheap::close_ctty): Remove obsolete code.
392 * dcrt0.cc (child_info_spawn::handle_spawn): Signal ready after we've
393 run fixup_after_exec.
394 * dtable.cc (dtable::fixup_after_exec): Add debugging output.
395 * fhandler_tty.cc (fhandler_pty_master::doecho): Use class version of
397 (fhandler_tty_common::close): Remove obsolete code.
398 (fhandler_tty_slave::fixup_after_exec): Don't close, since this is done
399 in dtable's fixup_after_exec. (revisit later?)
400 (fhandler_pty_master::fixup_after_exec): Ditto.
402 2006-06-02 Christopher Faylor <cgf@timesys.com>
404 * cygtls.h (CYGTLS_PADSIZE): Bump up or suffer a regrettable collision
406 * tlsoffsets.h: Regenerate.
408 * dcrt0.cc (break_here): Define unconditionally for use elsewhere.
409 Call DebugBreak, if appropriate.
410 (initial_env): Rely on break_here() to call DebugBreak.
411 * exceptions.cc (try_to_debug): Ditto.
413 2006-06-02 Christopher Faylor <cgf@timesys.com>
415 * fhandler.cc (fhandler_base::fixup_after_exec): Declare here.
416 * fhandler.h (fhandler_base::fixup_after_exec): Make non-inline.
417 (fhandler_termios::fixup_after_fork): Delete declaration.
418 (fhandler_termios::fixup_after_exec): Ditto.
419 (fhandler_tty_common::inuse): Remove.
420 (fhandler_tty_common::dup): Delete declaration.
421 (fhandler_tty_common::fixup_after_fork): Ditto.
422 (fhandler_tty_slave::fixup_after_exec): Declare new function.
423 (fhandler_pty_master::dwProcessId): New variable.
424 (fhandler_pty_master::from_master): Ditto.
425 (fhandler_pty_master::to_master): Ditto.
426 (fhandler_pty_master::setup): New function.
427 (fhandler_pty_master::fixup_after_fork): Ditto.
428 (fhandler_pty_master::fixup_after_exec): Ditto.
429 * fhandler_termios.cc (fhandler_termios::fixup_after_exec): Delete
431 (fhandler_termios::fixup_after_fork): Ditto.
432 * fhandler_tty.cc (fhandler_tty_master::init): Use fhandler_pty_master
433 setup function rather than obsolete tty::common_init. Delete obsolete
435 (fhandler_tty_slave::fhandler_tty_slave): Set inuse to NULL here.
436 (fhandler_tty_slave::open): Change debugging output for clarity. Check
437 for different things when doing a sanity check on the tty. Reflect the
438 fact that master_pid now is the cygwin pid rather than the windows pid.
439 Use "arch" rather than "archetype" for consistency.
440 (fhandler_tty_slave::close): Close inuse here.
441 (fhandler_tty_slave::dup): Remove old if 0'ed code.
442 (fhandler_pty_master::dup): New function. Handles pty master
444 (fhandler_pty_master::fhandler_pty_master): Zero pty_master specific
446 (fhandler_pty_master::open): Implement using archetypes, similar to
447 slave. Use fhandler_pty_master setup function rather than obsolete
448 tty::common_init. Don't set inuse.
449 (fhandler_tty_common::close): Don't deal with inuse. Delete old if
451 (fhandler_pty_master::close): Implement using archetypes. Close
452 from_master and to_master.
453 (fhandler_tty_common::set_close_on_exec): Just set close_on_exec flag
454 here since everything uses archetypes now.
455 (fhandler_tty_common::fixup_after_fork): Delete definition.
456 (fhandler_tty_slave::fixup_after_exec): Define new function.
457 (fhandler_pty_master::setup): New function, derived from
459 (fhandler_pty_master::fixup_after_fork): New function.
460 (shared_info.h): Reset SHARED_INFO_CB to reflect new tty size.
461 * tty.cc (tty_list::terminate): Close individual handles from
463 (tty::master_alive): Delete.
464 (tty::make_pipes): Ditto.
465 (tty::common_init): Ditto.
466 * tty.h (tty::from_slave): Delete.
467 (tty::to_slave): Ditto.
468 (tty::common_init): Delete declaration.
469 (tty::make_pipes): Ditto.
470 (tty::master_pid): Define as pid_t since it is now a cygwin pid.
472 2006-06-01 Christopher Faylor <cgf@timesys.com>
474 * cygheap.cc (cygheap_fixup_in_child): Don't close parent handle here.
475 Let the caller do that.
476 * dcrt0.cc (child_info_spawn::handle_spawn): Close parent handle here
477 to allow fixup_after_exec functions to use it.
479 * cygtls.cc (_cygtls::call2): Avoid calling exit thread if called with
481 * cygtls.h (_cygtls::isinitialized): Check that we actually have a tls
482 before seeing if it is initialized.
483 * gendef (_sigfe_maybe): Ditto.
484 * dcrt0.cc (dll_crt0_1): Remove static, use just one argument.
485 * dll_init.cc (dllcrt0_info): New structure.
486 (dll_dllcrt0): Change into a front-end to renamed dll_dllcrt0_1 so that
487 we'll always be assured of having something like a tls.
488 (dll_dllcrt0_1): New function, basically renamed from from dll_dllcrt0.
489 Unconditionally call _my_tls.init_exception_handler now that we are
490 assured of having a tls. Change variable name from "linking" to "linked".
491 * winsup.h (dll_crt0_1): Declare.
492 (dll_dllcrt0_1): Ditto.
494 2006-05-30 Christopher Faylor <cgf@timesys.com>
496 * cygtls.cc (_cygtls::call2): Don't call ExitThread on the main thread.
498 2006-05-29 Christopher Faylor <cgf@timesys.com>
500 * winf.h (MAXCYGWINCMDLEN): Set down size to 30000 or suffer fork
503 2006-05-28 Christopher Faylor <cgf@timesys.com>
505 * sigproc.cc (child_info::proc_retry): Mask all of the bits we're
506 interested in, which includes bits above and below 0xc0000000.
508 2006-05-27 Christopher Faylor <cgf@timesys.com>
510 * dll_init.cc (dll_dllcrt0): Previous change didn't work very well with
511 fork. Semi-revert it but change name of variable to something that
514 2006-05-27 Christopher Faylor <cgf@timesys.com>
516 * thread.cc (verifyable_object_isvalid): Check for NULL specifically.
518 2006-05-27 Christopher Faylor <cgf@timesys.com>
520 * dll_init.cc (dll_dllcrt0): Call _my_tls.init_exception_handler if
521 we've finished initializing (Thanks to Gary Zablackis for noticing this
522 problem). Just use cygwin_finished_initializing rather than defining a
525 2006-05-25 Christopher Faylor <cgf@timesys.com>
527 * debug.h (ModifyHandle): Define new macro.
528 (modify_handle): Declare new function.
529 * debug.cc (modify_handle): Define new function.
530 * fhandler.h (fhandler_base::fork_fixup): Change return value from void
532 * fhandler.cc (fhandler_base::fork_fixup): Return true if fork fixup has
534 * pipe.cc (fhandler_pipe::set_close_on_exec): Set inheritance of
535 protected handle via ModifyHandle if DEBUGGING.
536 (fhandler_pipe::fixup_after_fork): Protect guard handle if fork fixup
539 2006-05-24 Christopher Faylor <cgf@timesys.com>
541 * cygtls.cc (_cygtls::call): Call call2 using _my_tls.
542 (_cygtls::init_exception_handler): Always replace existing exception
543 handler with cygwin exception handler.
544 * cygtls.h (_cygtls::call2): Remove static designation.
545 * dcrto.cc (dll_crt0_1): Define in a way that allows calling via
547 (_initialize_main_tls): Delete.
548 (_dll_crt0): Call dll_crt0_1 via cygtls::call. Set _main_tls here.
549 * external.cc (cygwin_internal): Implement CW_CYGTLS_PADSIZE.
550 * include/sys/cygwin.h (CW_CYGTLS_PADSIZE): Define.
551 * tlsoffsets.h: Regenerate.
553 2006-05-24 Christopher Faylor <cgf@timesys.com>
555 * configure.in: Update to newer autoconf.
556 (thanks to Steve Ellcey)
557 * configure: Regenerate.
558 * aclocal.m4: New file.
560 2006-05-23 Lev Bishop <lev.bishop+cygwin@gmail.com>
562 * fhandler.cc (readv): Remove nonsensical assert.
564 2006-05-23 Christopher Faylor <cgf@timesys.com>
566 * select.cc (start_thread_socket): Delay setting thread local exitsock
567 until we know it's correct. Return correct value on error.
569 2006-05-23 Lev Bishop <lev.bishop+cygwin@gmail.com>
570 Christopher Faylor <cgf@timesys.com>
572 * select.cc (start_thread_socket): Clean up exitsock in case of error.
573 Use si->exitcode consistently.
575 2006-05-21 Christopher Faylor <cgf@timesys.com>
577 * child_info.h (_CI_SAW_CTRL_C): New enum.
578 (CURR_CHILD_INFO_MAGIC): Reset.
579 (saw_ctrl_c): New function.
580 (set_saw_ctrl_c): Ditto.
581 * sigproc.cc (child_info::proc_retry): Return EXITCODE_OK if we get
582 STATUS_CONTROL_C_EXIT and we actually saw a CTRL-C.
583 * spawn.cc (dwExeced): Delete.
584 (chExeced): New variable.
585 (spawn_guts): Set chExeced;
586 * exceptions.cc (dwExeced): Delete declaration.
588 (ctrl_c_handler): Detect if we're an exec stub process and set a flag,
591 * fhandler_tty.cc (fhandler_tty_common::__release_output_mutex): Add
592 extra DEBUGGING test.
594 * pinfo.cc: Fix comment.
596 2006-05-21 Christopher Faylor <cgf@timesys.com>
598 * fhandle.h (fhandler_pipe::create_guard): Revert change which
599 eliminated SECURITY_ATTRIBUTES argument.
600 * pipe.cc (fhandler_pipe::open): Duplicate guard from other process and
601 protect it appropriately. Eliminate unneeded writepipe_exists
602 temporary variable. Set inheritance appropriately.
603 (fhandler_pipe::set_close_on_exec): Revert change which eliminated
604 handling guard inheritance.
605 (fhandler_pipe::fixup_after_fork): Ditto. Use correct name of entity
606 being checked by fork_fixup.
607 (fhandler_pipe::fixup_after_exec): Don't bother with guard here.
608 (fhandler_pipe::dup): Cosmetic changes and revert creation of
609 writepipe_exists as noninheritable.
610 (fhandler_pipe::create): Revert change which eliminated
611 SECURITY_ATTRIBUTES argument. Revert change which always made
612 writepipe_exists noninheritable.
614 2006-05-21 Christopher Faylor <cgf@timesys.com>
616 * debug.cc (add_handle): Print handle value when collision detected.
617 * dtable.cc (dtable::stdio_init): Cosmetic change.
618 * fhandler.h (fhandler_base::create_read_state): Protect handle.
619 (fhandler_pipe::create_guard): Ditto. Always mark the handle as
621 (fhandler_pipe::is_slow): Return boolean value rather than numeric 1.
622 * pipe.cc (fhandler_pipe::fhandler_pipe): Always flag that we need fork
624 (fhandler_pipe::open): Don't pass security attributes to create_guard.
625 (fhandler_pipe::set_close_on_exec): Don't handle guard here.
626 (fhandler_pipe::close): Accommodate now-protected guard handle.
627 (fhandler_pipe::fixup_in_child): Don't protect read_state here.
628 (fhandler_pipe::fixup_after_exec): Close guard handle if close_on_exec.
629 (fhandler_pipe::fixup_after_fork): Don't bother with guard here.
630 (fhandler_pipe::dup): Don't set res to non-error prematurely. Use
631 boolean values where appropriate. Protect guard and read_state.
632 (fhandler_pipe::create): Don't call need_fork_fixup since it is now the
633 default. Don't protect read_state or guard.
635 * pipe.cc (fhandler_base::ready_for_read): Use bool values for "avail".
637 * spawn.cc (spawn_guts): Set cygheap->pid_handle as inheritable when
640 2006-05-15 Lev Bishop <lev.bishop+cygwin@gmail.com>
641 Christopher Faylor <cgf@timesys.com>
643 * select.cc (fhandler_pipe::ready_for_read): Actually get the guard
644 mutex for blocking reads.
646 2006-05-20 Christopher Faylor <cgf@timesys.com>
648 * fhandler_tty.cc (fhandler_tty::close): Remove problematic hExeced guard.
650 2006-05-20 Christopher Faylor <cgf@timesys.com>
652 * fhandler_tty.cc (fhandler_tty_slave::open): Reinstate call to
653 need_invisible on first pty open.
655 2006-05-18 Christopher Faylor <cgf@timesys.com>
657 * fhandler_console.cc (fhandler_console::need_invisible): Allocate an
658 invisible window station when ctty != TTY_CONSOLE.
660 2006-05-16 Christopher Faylor <cgf@timesys.com>
662 * cygtls.cc (_cygtls::remove): Don't test for initialization since
663 this function will always be called when _my_tls is initialized.
664 * init.cc (dll_entry): Don't attempt to remove tls info if _my_tls is
665 obviously not even available.
667 2006-05-15 Christopher Faylor <cgf@timesys.com>
669 * sigproc.cc (no_signals_available): Detect hwait_sig ==
670 INVALID_HANDLE_VALUE.
671 (wait_sig): Set hwait_sig to INVALID_HANDLE_VALUE on __SIGEXIT.
673 2006-05-15 Christopher Faylor <cgf@timesys.com>
675 * cygtls.cc (_cygtls::init_thread): Zero entire _my_tls structure and
677 * cygtls.h (_my_tls::padding): Delete.
678 (CYGTLS_PADSIZE): Redefine concept of padding to mean padding at the
680 * dcrt0.cc (initialize_main_tls): Change return to void.
681 * gentls_offsets: Treat const specially, too. Keep going after a '}'
682 is found. Change negative offset calculation to use CYGTLS_PADSIZE.
683 * init.cc (_my_oldfunc): New variable.
684 (threadfunc_fe): Use stored tls value for oldfunc rather than blindly
685 writing to the stack.
686 (munge_threadfunc): Set oldfunc in tls.
687 (dll_entry): Initialize tls allocation.
688 * tlsoffsets.h: Regenerate.
690 2006-05-13 Christopher Faylor <cgf@timesys.com>
692 * ntdll.h (STATUS_INVALID_INFO_CLASS): Conditionalize.
694 2006-05-10 Brian Dessent <brian@dessent.net>
696 * Makefile.in (clean): Also delete *.dbg.
698 2006-05-08 Christian Franke <Christian.Franke@t-online.de>
700 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix typo which
701 caused test for ".." to be skipped.
703 2006-05-02 Christopher Faylor <cgf@timesys.com>
705 * external.cc (cygwin_internal): Set errno on failure.
707 2006-04-27 Corinna Vinschen <corinna@vinschen.de>
709 * pipe.cc (DEFAULT_PIPEBUFSIZE): Raise to 64K.
711 2006-04-26 Corinna Vinschen <corinna@vinschen.de>
713 * fhandler.h (fhandler_base): Change fstat_helper prototype
714 to take file size and inode number as 64 bit values.
715 * fhandler_disk_file.cc (FS_IS_SAMBA): Move to path.cc
716 (FS_IS_SAMBA_WITH_QUOTA): Ditto.
717 (path_conv::hasgood_inode): Delete.
718 (path_conv::is_samba): Delete.
719 (path_conv::isgood_inode): Centralized function to recognize
721 (fhandler_base::fstat_by_handle): Constify fvi_size and fai_size.
722 Accomodate argument change in fstat_helper.
723 (fhandler_base::fstat_by_name): Ditto.
724 (fhandler_base::fstat_helper): Accomodate argument change. Call
725 path_conv::isgood_inode to recognize good inodes.
726 (fhandler_disk_file::opendir): Explain Samba weirdness here.
727 Call path_conv::fs_is_samba instead of path_conv::is_samba.
728 (fhandler_disk_file::readdir): Add STATUS_INVALID_INFO_CLASS
729 as valid return code from NtQueryDirectoryFile to indicate that
730 FileIdBothDirectoryInformation is not supported.
731 Call path_conv::isgood_inode to recognize good inodes.
732 * ntdll.h (STATUS_INVALID_INFO_CLASS): Define.
733 * path.cc (fs_info::update): Rework file system recognition
734 and set appropriate flags.
735 * path.h (struct fs_info): Add is_ntfs, is_samba and is_nfs flags.
736 Constify pure read accessors.
738 2006-04-24 Christopher Faylor <cgf@timesys.com>
740 * environ.cc (getearly): Force correct dereference order when
741 inspecting environ table.
743 2006-04-24 Corinna Vinschen <corinna@vinschen.de>
745 * select.cc (thread_pipe): Raise sleep time only every 8th iteration.
746 (thread_mailslot): Ditto.
748 2006-04-23 Corinna Vinschen <corinna@vinschen.de>
749 Christopher Faylor <cgf@timesys.com>
751 * select.cc (thread_pipe): Raise sleep time dynamically to speed up
752 select on pipes when copying lots of data.
753 (thread_mailslot): Ditto for mailslots.
755 2006-04-22 Christopher Faylor <cgf@timesys.com>
757 * signal.cc (abort): On second thought, just set incyg once.
759 2006-04-22 Christopher Faylor <cgf@timesys.com>
761 * signal.cc (abort): Set incyg manually to help get a reliable gdb
763 * cygwin.din (abort): Make NOSIGFE.
765 2006-04-21 Pierre Humblet Pierre.Humblet@ieee.org
766 Christopher Faylor <cgf@timesys.com>
768 * environ.cc (getearly): Use GetEnvironmentVariable and cmalloc instead
769 of GetEnvironmentStrings.
770 (environ_init): Revert rawenv stuff.
772 2006-04-21 Christopher Faylor <cgf@timesys.com>
774 * environ.cc (rawenv): Make this variable a file-scope static.
775 (getearly): Rename 's' variable to 'len' since 's' is used fairly
776 consistently throughout cygwin as a string variable. Remove rawenv
777 declaration. Perform other minor cleanups.
778 (environ_init): Remove rawenv declaration. Only set rawenv to
779 GetEnvironmentStrings() if it has not already been set. Properly free
782 2006-04-21 Christopher Faylor <cgf@timesys.com>
784 * tty.h (tty::hwnd): Move to tty_min.
785 (tty::gethwnd): Ditto.
786 (tty::sethwnd): Ditto.
787 (tty_min::hwnd): Receive variable from tty class.
788 (tty_min::gethwnd): Receive function from tty classs.
789 (tty_min::sethwnd): Ditto.
790 * dtable.cc (dtable::stdio_init): Only call init_console_handler when
791 we actually own the console.
792 * fhandler_console.cc (fhandler_console::get_tty_stuff): Set tty's hwnd
794 * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Semi-reinstate
795 handling of console when pgrp is set.
797 2006-04-21 Pierre Humblet <Pierre.Humblet@ieee.org>
798 Corinna Vinschen <corinna@vinschen.de>
800 * environ.cc (getearly): New function.
801 (findenv_func): New function pointer, predefined to getearly.
802 (getenv): Call findenv function over the findenv_func pointer.
803 (environ_init): Change findenv_func pointer to my_findenv after Cygwin
804 environment is initialized.
806 2006-04-21 Lars Munch <lars@segv.dk>
808 * include/asm/byteorder.h (__ntohl): Fix the missing uint32_t.
810 2006-04-21 Corinna Vinschen <corinna@vinschen.de>
812 * fhandler_socket.cc (fhandler_socket::wait): Reorder setting
813 WSAError to avoid spurious errors with WSAError set to 0.
815 2006-04-21 Corinna Vinschen <corinna@vinschen.de>
817 * include/asm/byteorder.h: Include stdint.h. Per standard, change
818 datatypes in ntohX and htonX functions to uintXX_t types.
820 2006-04-18 Christopher Faylor <cgf@timesys.com>
822 * exceptions.cc (ctrl_c_handler): Only exit TRUE on CTRL_LOGOFF_EVENT
823 when we have actually handled the event.
825 2006-04-17 Eric Blake <ebb9@byu.net>
827 * mktemp.cc (_gettemp): Open temp files in binary mode.
829 2006-04-14 Corinna Vinschen <corinna@vinschen.de>
831 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Use UINT32_MAX
834 2006-04-14 Corinna Vinschen <corinna@vinschen.de>
836 * fhandler_disk_file.cc (path_conv::hasgood_inode): Make inline.
837 Drop remote fs handling entirely since unreliable inode numbers
838 are now recognized differently.
839 (path_conv::is_samba): Make inline.
840 (fhandler_disk_file::opendir): Reformat comment.
841 (fhandler_base::fstat_helper): Special case remote file systems
842 returning (unreliable) 32 bit inode numbers.
843 (fhandler_disk_file::readdir): Ditto.
844 * fhandler_netdrive.cc (fhandler_netdrive::readdir): Ditto.
846 2006-04-13 Christopher Faylor <cgf@timesys.com>
848 * spawn.cc (spawn_guts): Move ch.set() call back to where it was
851 2006-04-13 Corinna Vinschen <corinna@vinschen.de>
853 * sysconf.cc (sysconf): Add _SC_THREADS, _SC_THREAD_ATTR_STACKSIZE,
854 _SC_THREAD_PRIORITY_SCHEDULING, _SC_THREAD_PROCESS_SHARED,
855 _SC_THREAD_SAFE_FUNCTIONS, _SC_TIMERS handling.
857 2006-04-12 Corinna Vinschen <corinna@vinschen.de>
858 Christopher Faylor <cgf@timesys.com>
860 * spawn.cc (spawn_guts): Revert patch which treated derived cygwin
861 programs differently from those which are mounted with -X. Pass extra
862 argument to linebuf::fromargv.
863 * winf.h (MAXCYGWINCMDLEN): New define.
864 (linebuf::finish): Add a new argument denoting when command line
866 (linebuf::fromargv): Ditto.
867 * winf.cc (linebuf::finish): Implement above change.
868 (linebuf::fromargv): Ditto.
870 2006-04-11 Christopher Faylor <cgf@timesys.com>
872 * Makefile.in (DLL_OFILES): Add winf.o.
873 * spawn.cc: Move command line handling stuff into winf.cc.
877 2006-04-05 Christopher Faylor <cgf@timesys.com>
879 * fhandler_socket.cc: Move iptypes.h include after winsock2 since it
883 2006-04-05 Christopher Faylor <cgf@timesys.com>
885 * dcrt0.cc (dll_crt0_0): Move user_data->{resourcelocks,threadinterface}
886 initialization here from dll_crt0_1.
887 (dll_crt0_1): See above.
889 2006-04-04 Corinna Vinschen <corinna@vinschen.de>
891 * net.cc (fdsock): Raise default SO_RCVBUF/SO_SNDBUF buffer sizes to
892 the same values as on Linux.
894 2006-04-03 Christopher Faylor <cgf@timesys.com>
896 * child_info.h (CURR_CHILD_INFO_MAGIC): Update.
897 (child_info_fork::alloc_stack): Move into this class.
898 (child_info_fork::alloc_stack_hard_way): Ditto.
899 * dcrt0.cc (child_info_fork::alloc_stack): Ditto.
900 (child_info_fork::alloc_stack_hard_way): Ditto.
901 (_dll_crt0): Reference alloc_stack via fork_info.
903 2006-04-03 Corinna Vinschen <corinna@vinschen.de>
905 * spawn.cc (linebuf::finish): Drop argument. Don't check command line
907 (spawn_guts): Remove wascygexec. Check real_path.iscygexec instead.
908 Accommodate change to linebuf::finish.
910 2006-04-03 Christopher Faylor <cgf@timesys.com>
912 * dcrt0.cc (sm): Delete.
913 (alloc_stack_hard_way): Figure out where the stack lives here rather
914 than relying on previously filled out information which has been
915 invalid since 1.5.19.
917 2006-03-31 Corinna Vinschen <corinna@vinschen.de>
919 * fhandler_disk_file.cc (FS_IS_SAMBA_WITH_QUOTA): New define.
920 (path_conv::hasgood_inode): Recognize Samba with quota support
922 (path_conv::is_samba): Ditto. Fix comment to include Samba version
923 numbers for later reference.
925 2006-03-30 Corinna Vinschen <corinna@vinschen.de>
927 * security.h (sec_user_nih): Make sid1 argument mandatory.
930 2006-03-29 Christopher Faylor <cgf@timesys.com>
932 * sigproc.cc (wait_for_sigthread): Use the current user sid when
933 setting up the signal pipe rather than relying on (eventually) the
936 2006-03-29 Christopher Faylor <cgf@timesys.com>
938 * dcrt0.cc (child_info_fork::handle_fork): Set uid/gid in myself so
939 that it can be used by subsequent startup functions.
940 (dll_crt0_0): Issue a warning if DuplicateTokenEx fails and DEBUGGING.
941 (dll_crt0_1): Move user_data->{resourcelocks,threadinterface}
942 initialization here from dll_crt0_0.
943 * fork.cc (frok::child): Tell wait_for_sigthread that this is fork.
944 (frok::parent): Only initialize start_time once. Tighten time when
945 we're "deimpersonated".
946 * sigproc.cc (signal_fixup_after_exec): Rework (futiley) sa_buf stuff.
947 Add debugging output.
948 (wait_for_sigthread): Accept an argument which illustrates whether we
950 (wait_sig): Avoid using myself pointer.
951 * winsup.h ((wait_for_sigthread): Reflect change to argument.
953 2006-03-26 Christopher Faylor <cgf@timesys.com>
955 * spawn.cc (spawn_guts): Close handles if we know that we will not be
956 seeing a sync event from the child.
958 2006-03-26 Christopher Faylor <cgf@timesys.com>
960 * sigproc.cc (wait_sig): Move myself manipulation...
961 (wait_for_sigthread): ...to here.
963 2006-03-24 Corinna Vinschen <corinna@vinschen.de>
965 * fhandler_floppy.cc: Include ntdef.h and ntdll.h.
966 (fhandler_dev_floppy::get_drive_info): Rearrange so that now
967 NtQueryVolumeInformationFile is called on drives which don't support
968 IOCTL_DISK_GET_DRIVE_GEOMETRY.
969 * ntdll.h (struct _FILE_FS_SIZE_INFORMATION): Add.
970 (enum _FSINFOCLASS): Add missing values.
972 2006-03-23 Christopher Faylor <cgf@timesys.com>
974 * fhandler_console.cc (fhandler_console::fixup_after_fork_exec): Make
975 error message more explicit.
976 * pinfo.cc (_pinfo::commune_request): Don't lock process unless we're
979 2006-03-23 Christopher Faylor <cgf@timesys.com>
981 * dcrt0.cc (child_info_spawn::handle_spawn): Don't initialize the
982 console handler here.
983 * dtable.cc (dtable::stdio_init): Initialize console handler here.
985 2006-03-23 Christopher Faylor <cgf@timesys.com>
987 * sigproc.cc (sigalloc): Don't set SA_RESTART here.
988 * signal.cc (_SA_NORESTART): New flag.
989 (sigaction_worker): New function, derived from sigaction. Don't set
990 internal flags unless called internally.
991 (sigaction): Use sigaction_worker.
992 (signal): Honor new _SA_NORESTART flag.
993 (siginterrupt): Set _SA_NORESTART flag appropriately. Use
994 sigaction_worker to set flags.
995 * include/cygwin/signal.h: Define _SA_INTERNAL_MASK here.
997 2006-03-22 Corinna Vinschen <corinna@vinschen.de>
999 * thread.cc (pthread_mutex::is_good_initializer_or_bad_object): Delete.
1000 (pthread_cond::is_good_initializer_or_bad_object): Delete.
1001 (pthread_rwlock::is_good_initializer_or_bad_object): Delete.
1002 (pthread_cond::init): Remove disabled code. Guard assignment to
1003 object to initialize against access violation.
1004 (pthread_rwlock::init): Ditto.
1005 (pthread_mutex::init): Ditto.
1007 2006-03-22 Eric Blake <ebb9@byu.net>
1009 * fhandler.cc (fcntl): Print flags in hex.
1011 2006-03-22 Christopher Faylor <cgf@timesys.com>
1013 * dcrt0.cc (dll_crt0_0): Semi-revert 2006-03-14 change which moved
1014 pinfo_init and uinfo_init here.
1015 (dll_crt0_1): Ditto.
1016 (__dll_crt0): Ditto. Don't call update_envptrs here.
1017 (dll_crt0_1): Ditto. Move wait_for_sigthread call here from dll_crt0_0.
1018 * environ.cc (environ_init): Call it here instead.
1019 * sigproc.cc (my_readsig): New static variable.
1020 (wait_for_sigthread): Set up read pipe here since we are assured that
1021 we have the proper privileges when this is called.
1022 (talktome): Eliminate second argument since it is available as a global
1024 (wait_sig): Reflect use of my_readsig.
1026 2006-03-22 Corinna Vinschen <corinna@vinschen.de>
1028 * thread.cc (pthread_cond::init): Disable validity test of object
1029 to initialize since test of uninitialized content is unreliable.
1030 (pthread_rwlock::init): Ditto.
1031 (pthread_mutex::init): Ditto.
1033 2006-03-21 Christopher Faylor <cgf@timesys.com>
1035 * signal.cc (signal): Don't set SA_RESTART here.
1036 (siginterrupt): White space.
1037 * sigproc.cc (sigalloc): Set SA_RESTART here, on initialization.
1039 2006-03-21 Christopher Faylor <cgf@timesys.com>
1041 * child_info.h (child_status): Fix typo which made it impossible to set
1043 (child_info::isstraced): Booleanize.
1044 (child_info::iscygwin): Ditto.
1045 * sigproc.cc (child_info::child_info): Minor cleanup of flag setting.
1046 * spawn.cc (spawn_guts): Only close_all_files when we know the process
1047 has started successfully.
1049 * exceptions.cc (init_console_handler): Fix indentation.
1051 2006-03-20 Christopher Faylor <cgf@timesys.com>
1053 * dcrt0.cc (dll_crt0_0): Call SetErrorMode earlier.
1054 * pinfo.cc (_pinfo::dup_proc_pipe): Reset wr_proc_pipe on failure.
1055 Return previous pipe handle.
1056 * pinfo.h (_pinfo::dup_proc_pipe): Reflect change to return value.
1057 * spawn.cc (spawn_guts): Restore previous proc pipe on retry or if
1058 process exits before synchronization.
1060 2006-03-20 Christopher Faylor <cgf@timesys.com>
1062 * child_info.h (child_status): New enum.
1063 (child_info::flag): Rename from 'straced'.
1064 (child_info::isstraced): New function.
1065 (child_info::iscygwin): Ditto.
1066 (child_info_fork::handle_fork): Reparmize.
1067 (child_info_fork::handle_failure): Ditto.
1068 (child_info_spawn::handle_spawn): New function.
1069 * dcrt0.cc (get_cygwin_startup_info): Use isstraced method.
1070 (child_info_spawn::handle_spawn): Define new function from code
1071 previously in dll_crt0_0.
1072 (dll_crt0_0): Move spawn stuff into handle_spawn. Only call
1073 init_console_handler for fork case.
1074 * sigproc.cc (child_info::child_info): Set flag appropriately.
1075 (child_info::proc_retry): Treat exit code as "funny" if it's a cygwin
1077 * spawn.cc (spawn_guts): Remove commented out flag setting.
1079 2006-03-19 Christopher Faylor <cgf@timesys.com>
1081 * pinfo.cc (commune_process): Fix randomly invalid pointer which caused
1082 fifos to work incorrectly.
1084 2006-03-19 Christopher Faylor <cgf@timesys.com>
1086 * dcrt0.cc (dll_crt0_0): Oops. We need to bother with setting
1087 init_console_handler in the fork/exec case.
1089 2006-03-19 Christopher Faylor <cgf@timesys.com>
1091 * dcrt0.cc (dll_crt0_0): Don't bother with setting init_console_handler
1092 here since it will be set later when we discover if we have a ctty or
1094 * exceptions.cc (init_console_handler): Properly remove NULL handler.
1096 2006-03-18 Christopher Faylor <cgf@timesys.com>
1098 * pinfo.h (EXITCODE_OK): Define new constant.
1099 * sigproc.cc (child_info::sync): Return EXITCODE_OK if entering with
1101 (sig_send): Don't complain if sending signals while blocked if the
1102 sender isn't in the main thread.
1104 2006-03-18 Christopher Faylor <cgf@timesys.com>
1106 * child_info.h (CURR_CHILD_INFO_MAGIC): Regenerate.
1107 (child_info::retry): Move here from fork subclass.
1108 (child_info::exit_code): New field.
1109 (child_info::retry_count): Max retry count for process start.
1110 (child_info::proc_retry): Declare new function.
1111 (child_info_fork::retry): Move to parent.
1112 (child_info_fork::fork_retry): Ditto.
1113 * dcrt0.cc (child_info::fork_retry): Rename and move.
1114 (child_info_fork::handle_failure): Move.
1115 (dll_crt0_0): Initialize console handler based on whether we have a
1116 controlling tty or not. Avoid nonsensical check for fork where it can
1118 * environ.cc (set_proc_retry): Rename from set_fork_retry. Set
1119 retry_count in child_info.
1120 (parse_thing): Reflect above change.
1121 * exceptions.cc (dummy_ctrl_c_handler): Remove unused variable name.
1122 (ctrl_c_handler): Always return TRUE for the annoying
1124 * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Remove call to
1125 init_console_handler.
1126 * fhandler_tty.cc (fhandler_tty_slave::open): Just call
1127 mange_console_count here and let it decide what to do with initializing
1128 console control handling.
1129 * fork.cc (fork_retry): Remove definition.
1130 (frok::parent): Define static errbuf and use in error messages (not
1131 thread safe yet). Close pi.hThread as soon as possible. Protect
1132 pi.hProcess as soon as possible. Don't set retry_count. That happens
1133 automatically in the constructor now. Accommodate name change from
1134 fork_retry to proc_retry.
1135 * init.cc (dll_entry): Turn off ctrl-c handling early until we know how
1136 it is supposed to be handled.
1137 * pinfo.cc (_pinfo::dup_proc_pipe): Remember original proc pipe value
1138 for failure error message. Tweak debug message slightly.
1139 * sigproc.cc (child_info::retry_count): Define.
1140 (child_info::child_info): Initialize retry count.
1141 (child_info::sync): Set exit code if process dies before
1143 (child_info::proc_retry): Rename from child_info_fork::fork_retry. Use
1144 previously derived exit code. Be more defensive about what is
1145 classified as an error exit.
1146 (child_info_fork::handle_failure): Move here from dcrt0.cc.
1147 * spawn.cc (spawn_guts): Maintain error mode when starting new process
1148 to avoid annoying pop ups. Move deimpersonate call within new loop.
1149 Move envblock freeing to end. Loop if process dies prematurely with
1151 * syscalls.cc (setpgid): Remove hopefully unneeded call to
1152 init_console_handler.
1154 2006-03-15 Christopher Faylor <cgf@timesys.com>
1156 * cygheap.cc (init_cygheap::manage_console_count): Turn console control
1157 handler on/off depending on whether we have allocated a console or not.
1158 * dcrt0.cc (child_info_fork::fork_retry): Add more potential retry
1160 (dll_crt0_0): Turn on/off console control depending on whether we have
1161 a controlling tty or not.
1162 * exceptions.cc (init_console_handler): Change BOOL to bool.
1163 * fhandler_console.cc (fhandler_console::need_invisible): Cosmetic
1165 * winsup.h (init_console_handler): Reflect argument type change.
1167 * wincap.h (supports_setconsolectrlhandler_null): Remove duplicate
1168 capability throughout.
1171 2006-03-14 Christopher Faylor <cgf@timesys.com>
1173 * child_info.h (child_info_fork::fork_retry): Declare new function.
1174 * dcrt0.cc (child_info_fork::fork_retry): Define new function.
1175 * fork.cc (frok::parent): Move retry decision into
1176 child_info_fork::fork_retry and honor what it tells us to do.
1177 * sigproc.cc (sig_send): Unhold signals on __SIGEXIT.
1179 2006-03-14 Christopher Faylor <cgf@timesys.com>
1181 * fork.cc (frok::parent): Improve error message.
1183 2006-03-14 Christopher Faylor <cgf@timesys.com>
1185 * dcrt0.cc (main_environ): Initialize to &__cygwin_environment.
1186 (dll_crt0_1): Move resourcelocks, thread interface, pinfo_init, and
1188 (dll_crt0_0): ...to here.
1189 (_dll_crt0): Call update_envptrs here after setting main_environ.
1190 * environ.cc (environ_init): Eliminate initted variable. Don't call
1191 update_envptrs here.
1192 * sigproc.cc (wait_sig): Use my_sendsig when calling CreatePipe to
1193 avoid a dereference.
1195 2006-03-13 Christopher Faylor <cgf@timesys.com>
1197 * child_info.h (child_info_fork::handle_failure): Declare new function.
1198 (child_info_fork::retry): New field.
1199 * dcrt0.cc (__api_fatal_exit_val): Define.
1200 (child_info_fork::handle_failure): Define new function.
1201 (__api_fatal): Exit using __api_fatal_exit_val value.
1202 * environ.cc (set_fork_retry): Set fork_retry based on CYGWIN
1203 environment variable.
1204 (parse_thing): Add "fork_retry" setting.
1205 * fork.cc (fork_retry): Define.
1206 (frok::parent): Reorganize to allow retry of failed child creation if
1207 child signalled that it was ok to do so.
1208 * heap.cc (heap_init): Signal parent via handle_failure when
1210 * pinfo.h (EXITCODE_RETRY): Declare.
1211 * sigproc.cc (child_info::sync): Properly exit with failure condition
1212 if called for fork and didn't see subproc_ready.
1213 * spawn.cc (spawn_guts): Use windows pid as first argument.
1214 * winsup.h: Remove obsolete NEW_MACRO_VARARGS define.
1215 (__api_fatal_exit_val): Declare.
1216 (set_api_fatal_return): Define.
1217 (in_dllentry): Declare.
1218 * exceptions.cc (inside_kernel): Remove unneeded in_dllentry
1221 2006-03-13 Christopher Faylor <cgf@timesys.com>
1223 * dcrt0.cc (dll_crt0_0): Reorganize so that sigproc_init is called a
1224 little later. Add a comment.
1225 * fork.cc (resume_child): Make void.
1226 (frok::parent): Only zero pi when necessary. Explicitly zero si. Set
1227 this_errno when child_copy fails. Accommodate change to resume_child.
1228 * sigproc.cc (sigalloc): Move global_sigs initialization here.
1229 (sigproc_init): Move global_sigs.
1230 (sig_send): Just check for flush signals once.
1232 * wincap.h: Define supports_setconsolectrlhandler_null throughout.
1235 2006-03-13 Corinna Vinschen <corinna@vinschen.de>
1237 * autoload.cc (LoadDLLfuncNt): New define to wrap NT native functions.
1238 Use for NT native functions throughout.
1239 * dtable.cc (handle_to_fn): Treat return value of NtQueryObject as
1242 2006-03-12 Christopher Faylor <cgf@timesys.com>
1244 * cygtls.cc (_cygtls::remove): Reset initialized flag right away if we
1245 were previously initialized.
1246 * cygtls.h (_cygtls::initialized): Move nearer to the end to catch
1247 situation when Windows 98 mysteriously changes parts of _my_tls when
1248 thread is detaching.
1249 * gendef (__sigfe_maybe): Simplify slightly.
1250 * tlsoffsets.h: Regenerate.
1252 2006-03-12 Christopher Faylor <cgf@timesys.com>
1254 * cygtls.h (CYGTLS_INITIALIZED): Change to a little more unlikely value.
1255 (CYGTLSMAGIC): Delete.
1256 * dcrt0.cc (dll_crt0_0): Call sigproc_init during init startup.
1257 (_dll_crt0): Don't worry about sync_startup. Just wait for sigthread here.
1258 * dll_init.cc (cygwin_detach_dll): Only pick up tls version of retaddr
1259 if we have a valid tls.
1260 * fork.cc (frok::child): Remove sigproc_init initialization since it
1261 happens much earlier now.
1262 * gendef: Recognize SIGFE_MAYBE.
1263 (fefunc): Generate calls to _sigfe_maybe, if appropriate.
1264 (_sigfe_maybe): New function.
1265 * init.cc (search_for): Always initialize search_for, even on fork.
1266 (calibration_thread): Delete.
1267 (calibration_id): Delete.
1268 (prime_threads): Delete.
1269 (munge_threadfunc): Remove calibration_thread special case. Avoid
1270 calling thread function if we haven't yet hit the "search_for" thread.
1271 (dll_entry): Remove prime_threads call. Only call munge_threadfunc
1272 when hwait_sig is active. Ditto. for _my_tls.remove ();
1273 * sigproc.cc (hwait_sig): Make global.
1274 (sigproc_init): Don't bother with sync_startup.
1275 (sig_send): Treat flush as a no-op when signals are held.
1276 (wait_sig): Cause signals to be held after fork.
1278 2006-03-09 Corinna Vinschen <corinna@vinschen.de>
1280 * syscalls.cc (rename): Move existance check for oldpath further up
1281 to the start of the function. Avoid another case of a name collision
1282 if oldpath is a shortcut and a file or directory newpath already exists.
1284 2006-03-09 Corinna Vinschen <corinna@vinschen.de>
1286 * autoload.cc (NtClose): Define.
1287 (NtOpenDirectoryObject): Define.
1288 (NtQueryDirectoryObject): Define.
1289 * fhandler_proc.cc: Include ctype.h and wchar.h.
1290 (format_proc_partitions): Revamp loop over existing harddisks by
1291 scanning the NT native \Device object directory and looking for
1293 * ntdll.h: Rearrange system call declarations alphabetically.
1294 (DIRECTORY_QUERY): Define.
1295 (struct _DIRECTORY_BASIC_INFORMATION): Define.
1296 (NtOpenDirectoryObject): Declare.
1297 (NtQueryDirectoryObject): Declare.
1299 2006-03-08 Christopher Faylor <cgf@timesys.com>
1301 * cygtls.h (_cygtls::retaddr): New method.
1302 * dll_init.cc (cygwin_detach_dll): Use new tls method to find return
1303 address since this function is now signal guarded.
1304 (update_envptrs): Remove unneeded braces.
1305 * syscalls.cc (statvfs): Coerce full_path to avoid a gcc warning.
1307 2006-03-08 Corinna Vinschen <corinna@vinschen.de>
1309 * syscalls.cc (statvfs): Simplify path name expression.
1311 2006-03-08 Corinna Vinschen <corinna@vinschen.de>
1313 * syscalls.cc: Include winioctl.h.
1314 (statvfs): Request correct volume size using DeviceIoControl if
1315 quotas are enforced on the file system.
1317 2006-03-03 Corinna Vinschen <corinna@vinschen.de>
1319 * dir.cc (opendir): Fix indentation.
1320 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Move storing
1321 fhandler in file descriptor table to some point very late in function
1322 to avoid double free'ing. Add comment to explain what happens.
1323 Add label free_mounts and don't forget to delete __DIR_mounts structure
1324 if NtOpenFile fails.
1326 2006-03-02 Corinna Vinschen <corinna@vinschen.de>
1328 * syscalls.cc (chroot): Disallow chroot into special directories.
1329 Return EPERM instead.
1331 2006-03-02 Corinna Vinschen <corinna@vinschen.de>
1333 * fhandler_disk_file.cc (__DIR_mounts::check_missing_mount): Check
1334 cygdrive string length for those who have cygdrive mapped to "/".
1336 2006-03-01 Corinna Vinschen <corinna@vinschen.de>
1338 * sec_helper.cc (set_cygwin_privileges): Request SE_BACKUP_NAME
1341 2006-03-01 Corinna Vinschen <corinna@vinschen.de>
1343 * fhandler_proc.cc (fhandler_proc::fstat): Always return fixed link
1344 count of 1 for /proc directory instead of incorrect PROC_LINK_COUNT.
1346 2006-03-01 Corinna Vinschen <corinna@vinschen.de>
1348 * fhandler.h (enum dirent_states): Remove dirent_saw_cygdrive,
1349 dirent_saw_dev and dirent_saw_proc.
1350 (fhandler_cygdrive::open): Declare.
1351 (fhandler_cygdrive::close): Declare.
1352 * fhandler_disk_file.cc (class __DIR_mounts): Move to beginning of file.
1353 (__DIR_mounts::check_mount): New parameter to indicate if inode number
1354 is needed in calling function or not. Add /proc and /cygdrive handling.
1355 (__DIR_mounts::check_missing_mount): Ditto.
1356 (path_conv::ndisk_links): Use __DIR_mounts class to create correct
1357 hardlink count for directories with mount points in them.
1358 (fhandler_disk_file::readdir_helper): Remove /dev, /proc and /cygdrive
1360 (fhandler_cygdrive::open): New method.
1361 (fhandler_cygdrive::close): New method.
1362 (fhandler_cygdrive::fstat): Always return fixed inode number 2 and
1363 fixed link count of 1. Drop call to set_drives.
1364 (fhandler_cygdrive::opendir): Drop call to get_namehash.
1365 (fhandler_cygdrive::readdir): Handle "." entry to return fixed inode
1368 2006-03-01 Christopher Faylor <cgf@timesys.com>
1370 * cygwin.din: Fix some erroneous SIGFE/NOSIGFE settings.
1372 2006-03-01 Christopher Faylor <cgf@timesys.com>
1374 * cygthread.cc (cygthread::callfunc): Revert below change. Make ev a
1375 manual reset event again. so that it will be reset by WaitFor*Object
1377 (cygthread::stub): Ditto.
1378 (cygthread::terminate_thread): Reset ev if it was found to have been
1381 2006-03-01 Christopher Faylor <cgf@timesys.com>
1383 * analyze_sigfe: New script.
1384 * dllfixdbg: Add copyright.
1386 * gendevices: Ditto.
1387 * gentls_offsets: Ditto.
1389 2006-03-01 Christopher Faylor <cgf@timesys.com>
1391 * cygthread.cc (cygthread::callfunc): Create ev as an auto-reset event
1392 so that it will be reset by WaitFor*Object as appropriate.
1393 (cygthread::stub): Ditto.
1394 (cygthread::terminate_thread): Remove forced setting of thread
1397 2006-03-01 Corinna Vinschen <corinna@vinschen.de>
1399 * include/sys/dirent.h (struct __DIR): Rename __d_unused to
1401 * fhandler_disk_file.cc (struct __DIR_cache): Remove useless "typedef".
1402 (d_dirname): Remove useless "struct".
1403 (d_cachepos): Ditto.
1405 (class __DIR_mounts): New class, implementing mount point tracking
1407 (d_mounts): New macro for easy access to __DIR_mounts structure.
1408 (fhandler_disk_file::opendir): Allocate __DIR_mounts structure and
1409 let __d_internal element of dir point to it.
1410 (fhandler_disk_file::readdir_helper): Add mount points in the current
1411 directory, which don't have a real directory backing them.
1412 Don't generate an inode number for /dev. Add comment, why.
1413 (fhandler_disk_file::readdir): Move filling fname to an earlier point.
1414 Check if current entry is a mount point and evaluate correct inode
1416 (fhandler_disk_file::readdir_9x): Ditto.
1417 (fhandler_disk_file::rewinddir): Set all mount points in this directory
1418 to "not found" so that they are listed again after calling rewinddir().
1419 (fhandler_disk_file::closedir): Deallocate __DIR_mounts structure.
1420 * path.cc (mount_info::get_mounts_here): New method to evaluate a list
1421 of mount points in a given parent directory.
1422 * shared_info.h (class mount_info): Declare get_mounts_here.
1424 2006-02-28 Corinna Vinschen <corinna@vinschen.de>
1426 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Use iscygdrive
1427 instead of isspecial.
1428 * path.h (path_conv::iscygdrive): New method.
1430 2006-02-28 Christopher Faylor <cgf@timesys.com>
1432 * exceptions.cc (_cygtls::interrupt_now): Remove "inside cygwin" check
1433 since some cygwin functions are meant to be interrupted.
1435 2006-02-28 Corinna Vinschen <corinna@vinschen.de>
1437 * cygwin.din: Export __isinff, __isinfd, __isnanf, __isnand.
1438 * include/cygwin/version.h: Bump API minor number to 155.
1440 2006-02-28 Corinna Vinschen <corinna@vinschen.de>
1442 * dir.cc (readdir_worker): Use slash as path separator when evaluating
1443 namehash for paths below /proc.
1444 * fhandler_netdrive.cc (fhandler_netdrive::readdir): Use expensive
1445 inode number evaluation on share names.
1447 2006-02-27 Christopher Faylor <cgf@timesys.com>
1449 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Only set
1450 d_cachepos under NT or suffer memory corruption.
1451 (fhandler_disk_file::readdir_helper): Avoid else with a return. Just
1452 calculate extension location once when doing symlink checks.
1453 (fhandler_disk_file::readdir): Make debug output more useful.
1454 (fhandler_disk_file::readdir_9x): Ditto. Eliminate redundant variable.
1456 2006-02-27 Christopher Faylor <cgf@timesys.com>
1458 * include/sys/termios.h (cfsetispeed): Just define as a function rather
1459 than resorting to a macro.
1460 (cfsetospeed): Ditto.
1462 2006-02-27 Christopher Faylor <cgf@timesys.com>
1464 * sigproc.cc: Fix a comment.
1466 2006-02-27 Christopher Faylor <cgf@timesys.com>
1468 * cygthread.cc (cygthread::release): Add a comment.
1470 2006-02-27 Corinna Vinschen <corinna@vinschen.de>
1472 * fhandler_netdrive.cc (fhandler_netdrive::fstat): Create unambiguous
1474 (fhandler_netdrive::readdir): Ditto.
1476 2006-02-24 Christopher Faylor <cgf@timesys.com>
1478 * sigproc.cc (sigheld): Define new variable.
1479 (sig_dispatch_pending): Don't check sigq since that's racy.
1480 (sig_send): Set sigheld flag if __SIGHOLD is specified, reset it if
1481 __SIGNOHOLD is specified. Ignore flush signals if we're holding
1484 2006-02-23 Christopher Faylor <cgf@timesys.com>
1486 * cygwin.din (_exit): Use signal front end.
1489 2006-02-23 Christopher Faylor <cgf@timesys.com>
1491 * winsup.h (cygwin_hmodule): Declare.
1492 * exceptions.cc (inside_kernel): Reverse return values to reflect
1493 function name. Return true if we're in cygwin1.dll or if we're
1494 executing in dll_entry.
1495 (_cygtls::interrupt_now): Reflect reversal of inside_kernel return
1497 * hookapi.cc (cygwin_hmodule): Remove declaration.
1498 * init.cc (dll_entry): Use in_dllentry global to record that we are
1499 executing in dllentry.
1501 2006-02-22 Corinna Vinschen <corinna@vinschen.de>
1503 * exceptions.cc (_cygtls::interrupt_now): Reorder conditional
1504 to call inside_kernel only if this isn't locked.
1506 2006-02-22 Corinna Vinschen <corinna@vinschen.de>
1508 * fhandler.cc (fhandler_base::open): Add FILE_READ_ATTRIBUTES to
1509 access flags in case of query_read_control case, add FILE_READ_DATA
1510 in case of query_stat_control.
1512 2006-02-20 Christopher Faylor <cgf@timesys.com>
1514 * spawn.cc (av::fixup): Check for .bat and friends specifically now
1515 since these extensions are no longer automatically detected.
1517 2006-02-19 Christopher Faylor <cgf@timesys.com>
1519 * exceptions.cc (stackdump): Avoid dumping more than once.
1521 2006-02-19 Christopher Faylor <cgf@timesys.com>
1523 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Use NtOpenFile
1524 to open the directory.
1525 (fhandler_disk_file::readdir): Use NT_SUCCESS to determine if status
1528 2006-02-19 Corinna Vinschen <corinna@vinschen.de>
1530 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Drop generating
1533 2006-02-18 Corinna Vinschen <corinna@vinschen.de>
1535 * fhandler_disk_file.cc (FS_IS_SAMBA): Move out of
1536 path_conv::hasgood_inode.
1537 (path_conv::is_samba): New method.
1538 (fhandler_base::fstat_by_handle): Don't even try to use
1539 FileIdBothDirectoryInformation on Samba.
1540 * path.h (class path_conv): Declare is_samba method.
1542 2006-02-17 Christopher Faylor <cgf@timesys.com>
1544 * path.cc (conv_path_list): Eat empty paths when converting to POSIX.
1545 (cygwin_conv_to_win32_path): Deal with Cygwin's necessity of adding a
1546 '/' to the end of a path ending in '.'.
1548 2006-02-16 Corinna Vinschen <corinna@vinschen.de>
1550 * cygwin.din: Export sigignore and sigset.
1551 * exceptions.cc (sigset): New function.
1552 (sigignore): New function.
1553 * include/cygwin/signal.h (SIG_HOLD): Define.
1554 (sigignore): Declare.
1556 * include/cygwin/version.h: Bump API minor number to 154.
1558 2006-02-13 Igor Peshansky <pechtcha@cs.nyu.edu>
1560 * include/mntent.h: Add missing #include.
1562 2006-02-13 Igor Peshansky <pechtcha@cs.nyu.edu>
1564 * gentls_offsets: Fix typo in error message.
1566 2006-02-10 Christopher Faylor <cgf@timesys.com>
1568 * fhandler_process.cc (format_process_stat): Use cygwin-derived start
1569 time even on NT since it is the logical start time of the "process".
1570 * pinfo.cc (set_myself): Don't set start time when it should have
1571 already been set previously.
1573 2006-02-10 Brian Ford <Brian.Ford@FlightSafety.com>
1575 * times.cc (clock_getres): Use correct conversion from milliseconds to
1576 seconds/nanoseconds.
1577 (clock_setres): Use correct conversion to nanoseconds.
1579 2006-02-10 Christopher Faylor <cgf@timesys.com>
1581 * external.cc (sync_winenv): Rename from "setup_winenv". Use same
1582 mechanism as spawn to determine environment variables which should be
1583 converted back to windows form.
1584 (cygwin_internal): Reflect setup_winenv -> sync_winenv name change.
1585 * include/sys/cygwin.h: Ditto.
1587 2006-02-09 Corinna Vinschen <corinna@vinschen.de>
1589 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Only set
1590 the dirent_get_d_ino flag on filesystems having useful File IDs.
1591 Add comment explaining why.
1593 2006-02-07 Corinna Vinschen <corinna@vinschen.de>
1595 * dtable.cc (handle_to_fn): Accommodate new argument order in call to
1597 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Call sys_wcstombs
1598 instead of just wcstombs to accommodate OEM codepages.
1599 * miscfuncs.cc (sys_wcstombs): Split len argument in source and target
1600 length. Always 0-terminate result in target string.
1601 * security.cc (lsa2wchar): Remove unused function.
1603 (get_lsa_srv_inf): Ditto.
1604 (get_logon_server): Accommodate new argument order in call to
1606 (get_user_groups): Ditto.
1607 (get_user_local_groups): Ditto.
1608 (get_priv_list): Call sys_wcstombs directly instead of lsa2str.
1609 * uinfo.cc (cygheap_user::ontherange): Accommodate new argument order
1610 in call to sys_wcstombs.
1611 * winsup.h (sys_wcstombs): Change prototype to match new argument order.
1613 2006-02-07 Corinna Vinschen <corinna@vinschen.de>
1615 * init.cc (respawn_wow64_process): Exit with the exit code returned
1616 by the respawned process.
1618 2006-02-06 Christopher Faylor <cgf@timesys.com>
1620 Always zero all elements of siginfo_t throughout.
1621 * cygtls.h (_cygtls::thread_context): Declare new field.
1622 (_cygtls::thread_id): Ditto.
1623 (_cygtls::signal_exit): Move into this class.
1624 (_cygtls::copy_context): Declare new function.
1625 (_cygtls::signal_debugger): Ditto.
1626 * cygtls.cc (_cygtls::init_thread): Fill out thread id field.
1627 * exceptions.cc (exception): Change message when exception info is
1628 unknown. Copy context to thread local storage.
1629 (_cygtls::handle_exceptions): Avoid double test for fault_guarded.
1630 Reflect move of signal_exit to _cygtls class.
1631 (sigpacket::process): Copy context to thread local storage.
1632 (_cygtls::signal_exit): Move to _cygtls class. Call signal_debugger to
1633 notify debugger of exiting signal (WIP). Call stackdump here (WIP).
1634 (_cygtls::copy_context): Define new function.
1635 (_cygtls::signal_debugger): Ditto.
1636 * tlsoffsets.h: Regenerate.
1637 * include/cygwin.h (_fpstate): New internal structure.
1638 (ucontext): Declare new structure (WIP).
1639 (__COPY_CONTEXT_SIZE): New define.
1641 * exceptions.cc (_cygtls::interrupt_setup): Clear "threadkill" field
1642 when there is no sigwaiting thread.
1643 (setup_handler): Move event handling into interrupt_setup.
1645 2006-02-06 Corinna Vinschen <corinna@vinschen.de>
1647 * fhandler_socket.cc (fhandler_socket::connect): Fix formatting.
1648 (fhandler_socket::wait): Handle SA_RESTART when signal arrives.
1650 2006-02-06 Corinna Vinschen <corinna@vinschen.de>
1652 * include/cygwin/socket.h (CMSG_FIRSTHDR): Avoid compiler warning.
1654 2006-02-05 Corinna Vinschen <corinna@vinschen.de>
1656 * include/features.h: Add comment to explain what's going to happen
1658 * include/sys/stdio.h: Guard getline and getdelim prototypes with
1659 _GNU_SOURCE to avoid collision with old-style declarations.
1661 2006-02-05 Corinna Vinschen <corinna@vinschen.de>
1663 * environ.cc (struct parse_thing): Add transparent_exe option.
1664 * fhandler_disk_file.cc (fhandler_disk_file::link): Accommodate
1665 transparent_exe option. Add .exe suffix for links to executable files,
1666 if transparent_exe is set.
1667 * fhandler_process.cc (fhandler_process::fill_filebuf): Remove .exe
1668 suffix if transparent_exe option is set.
1669 * path.cc (symlink_worker): Accommodate transparent_exe option.
1670 (realpath): Don't tack on .exe suffix if transparent_exe is set.
1671 * syscalls.cc (transparent_exe): New global variable.
1672 (unlink): Accommodate transparent_exe option.
1675 (rename): Ditto. Maybe add .exe suffix when renaming executable files.
1676 (pathconf): Accommodate transparent_exe option.
1677 * winsup.h: Declare transparent_exe.
1679 2006-02-05 Christopher Faylor <cgf@timesys.com>
1680 Corinna Vinschen <corinna@vinschen.de>
1682 * fhandler_disk_file.cc (fhandler_disk_file::readdir_9x): Remove
1685 2006-02-05 Corinna Vinschen <corinna@vinschen.de>
1687 * fhandler_disk_file.cc (fhandler_disk_file::rewinddir): Remove label
1688 "out". Move test for NULL __handle ...
1689 (fhandler_disk_file::rewinddir_9x): ... here.
1691 2006-02-05 Corinna Vinschen <corinna@vinschen.de>
1693 * dir.cc (rewinddir): Keep dirent_get_d_ino and dirent_set_d_ino flags.
1695 2006-02-05 Christopher Faylor <cgf@timesys.com>
1697 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Don't close dir
1698 handle when we hit EOF since rewwindir may reactivate it.
1699 (fhandler_disk_file::readdir_9x): Eliminate superfluous temporary
1701 (fhandler_disk_file::closedir): Return EBADF when trying to close
1702 unopened DIR. Reorganize slightly. Return actual derived error value
1703 rather than always returning 0.
1705 2006-02-04 Christopher Faylor <cgf@timesys.com>
1707 * dir.cc (rmdir): Reorganize check for trailing dot to return correct
1708 error when directory does not exist.
1710 2006-02-03 Christopher Faylor <cgf@timesys.com>
1712 * dir.cc (mkdir): Reorganize check for trailing dot to return correct
1713 error when directory exists.
1714 * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Remove special
1715 test for path ending in '.'.
1717 2006-02-03 Corinna Vinschen <corinna@vinschen.de>
1719 * path.cc (suffix_scan::lnk_match): Return true beginning with
1721 (suffix_scan::next): Rearrange code to make .lnk append order slightly
1723 * spawn.cc (exe_suffixes): Try no suffix before .exe suffix to align
1724 evaluation with stat_suffixes.
1725 (dll_suffixes): Ditto.
1727 2006-02-02 Christopher Faylor <cgf@timesys.com>
1729 * cygwin/version.h: Mention CW_SETUP_WINENV in comment for API minor
1732 2006-02-02 Corinna Vinschen <corinna@vinschen.de>
1734 * cygwin.din (updwtmpx): Export.
1735 * syscalls.cc (updwtmpx): New function.
1736 * include/utmpx.h (updwtmpx): Declare.
1737 * include/cygwin/version.h: Bump API minor number to 153.
1739 2006-02-02 Christopher Faylor <cgf@timesys.com>
1741 * external.cc (setup_winenv): New function.
1742 (cygwin_internal): Implement CW_SETUP_WINENV.
1743 * sys/cygwin.h (cygwin_getinfo_types): Define CW_SETUP_WINENV.
1745 2006-02-02 Corinna Vinschen <corinna@vinschen.de>
1747 * security.cc (is_group_member): Fix comment.
1749 2006-02-02 Corinna Vinschen <corinna@vinschen.de>
1751 * security.cc (is_group_member): Use local group info type 1. Test
1752 group for being a global group or a well-known SID before adding it
1753 to the group list. Add comment.
1755 2006-02-01 Corinna Vinschen <corinna@vinschen.de>
1757 * autoload.cc (GetTcpTable): Define.
1758 * fhandler_socket.cc (address_in_use): New function to check if
1759 sockaddr_in address is already in use.
1760 (fhandler_socket::bind): Check if address is alreay in use in case of
1761 SO_REUSEADDR, to circumvent WinSock non-standard behaviour.
1763 2006-02-01 Corinna Vinschen <corinna@vinschen.de>
1765 * spawn.cc (dll_suffixes): Add .exe and "no suffix" to the list.
1767 2006-01-31 Corinna Vinschen <corinna@vinschen.de>
1769 * dlfcn.cc (check_path_access): Call find_exec with FE_DLL option.
1770 * path.h (enum fe_types): Add FE_DLL value.
1771 * spawn.cc (std_suffixes): Remove.
1772 (exe_suffixes): New suffix_info for executing files.
1773 (dll_suffixes): New suffix_info for searching shared libraries.
1774 (perhaps_suffix): Add opt argument. Use dll_suffixes if FE_DLL
1775 option is given, exe_suffixes otherwise.
1776 (find_exec): Propagate opt argument to perhaps_suffix. Drop suffix
1777 check when testing execute permission.
1778 (spawn_guts): Call perhaps_suffix with FE_NADA opt argument.
1780 2006-01-31 Christopher Faylor <cgf@timesys.com>
1782 * spawn.cc (av::fixup): Remove unused argument.
1783 (spawn_guts): Remove capitalization in debugging.
1785 2006-01-31 Corinna Vinschen <corinna@vinschen.de>
1787 * spawn.cc (find_exec): Only return files with execute permission set
1788 if ntsec is on. Don't check execute permission of Windows batch files.
1789 (av::fixup): Handle empty files gracefully. Drop execute permission
1791 * path.cc (suffix_scan::next): Don't skip any suffix on first run.
1793 2006-01-31 Corinna Vinschen <corinna@vinschen.de>
1795 * path.cc (cwdstuff::set): Don't set win32 error, only POSIX errno.
1797 2006-01-31 Corinna Vinschen <corinna@vinschen.de>
1799 * path.cc (cwdstuff::set): When SetCurrentDirectory returns
1800 ERROR_INVALID_FUNCTION, bend it over to ERROR_FILE_NOT_FOUND. Add
1801 comment to explain why.
1803 2006-01-31 Corinna Vinschen <corinna@vinschen.de>
1805 * dir.cc (readdir_worker): Add comment about writing old 32 bit d_ino.
1806 * include/cygwin/version.h: Bump API minor number to 152.
1807 (CYGWIN_VERSION_CHECK_FOR_NEEDS_D_INO): Remove.
1809 2006-01-30 Corinna Vinschen <corinna@vinschen.de>
1811 * fhandler_disk_file.cc (fhandler_disk_file::rewinddir): Simplify
1814 2006-01-30 Corinna Vinschen <corinna@vinschen.de>
1816 * fhandler_disk_file.cc (d_cachepos): Rename from d_pos to distinct
1817 clearly from __d_position. Change throughout.
1818 (fhandler_disk_file::rewinddir): Reset readdir cache on NT.
1820 2006-01-29 Corinna Vinschen <corinna@vinschen.de>
1822 * fhandler_disk_file.cc (readdir_get_ino): Don't follow symlinks.
1824 2006-01-29 Corinna Vinschen <corinna@vinschen.de>
1826 * fhandler.h (class fhandler_socket): Add saw_reuseaddr status flag.
1827 * fhandler_socket.cc (fhandler_socket::bind): Set socket to
1828 SO_EXCLUSIVEADDRUSE if application didn't explicitely set SO_REUSEADDR
1829 socket option, on systems supporting SO_EXCLUSIVEADDRUSE.
1830 * net.cc (cygwin_setsockopt): Set fhandler's saw_reuseaddr status flag
1831 if SO_REUSEADDR socket option has been successsfully set.
1832 * wincap.h (wincaps::has_exclusiveaddruse): New element.
1833 * wincap.cc: Implement above element throughout.
1835 2006-01-28 Corinna Vinschen <corinna@vinschen.de>
1837 * fhandler_disk_file.cc (fhandler_disk_file::mkdir): In case or error,
1838 check for existance explicitely and set errno to EEXIST.
1840 2006-01-28 Corinna Vinschen <corinna@vinschen.de>
1842 * fhandler_disk_file.cc (DIR_NUM_ENTRIES): New define determining
1843 minimum number of dir entries which fit into the readdir cache.
1844 (DIR_BUF_SIZE): Define globally as size of readdir cache.
1845 (struct __DIR_cache): New structure used for readdir caching on NT.
1846 (d_dirname): Accessor for struct __DIR_cache, use throughout.
1849 (fhandler_disk_file::opendir): Allocate __d_dirname to contain readdir
1851 (fhandler_disk_file::readdir): Use buf as pointer into readdir cache.
1852 Implement readdir caching.
1854 2006-01-28 Corinna Vinschen <corinna@vinschen.de>
1856 * include/sys/dirent.h (struct dirent): Revert misguided attempt to
1857 rename __d_unused1 to __d_fd.
1859 2006-01-27 Corinna Vinschen <corinna@vinschen.de>
1861 * autoload.cc (NtQueryDirectoryFile): Define.
1862 * dir.cc (__opendir_with_d_ino): Just call opendir.
1863 (opendir): Remove CYGWIN_VERSION_CHECK_FOR_NEEDS_D_INO handling.
1864 (readdir_worker): Only try generating d_ino if it's 0.
1865 Utilize namehash of directories fhandler. Call readdir_get_ino to
1866 generate d_ino for "..".
1867 (seekdir64): Keep dirent_set_d_ino flag.
1868 * fhandler.h (enum dirent_states): Add dirent_get_d_ino.
1869 (class fhandler_disk_file): Declare new private methods readdir_helper
1871 * fhandler_disk_file.cc (path_conv::hasgood_inode): New method to
1872 evaluate if a filesystem has reliable inode numbers.
1873 (fhandler_base::fstat_by_handle): Accommodate structure member name
1874 change from IndexNumber to FileId.
1875 (fhandler_base::fstat_helper): Call hasgood_inode here.
1876 (fhandler_disk_file::opendir): Call fhaccess only for real files.
1877 Don't append '*' to __d_dirname here, move to readdir_9x. On NT,
1878 open directory handle here. Set dirent_get_d_ino and dirent_set_d_ino
1879 flags according to wincap and filesystem.
1880 (fhandler_disk_file::readdir_helper): New method to implement readdir
1881 postprocessing only once.
1882 (readdir_get_ino_by_handle): New static function.
1883 (readdir_get_ino): New function to centralize inode number evaluation
1884 in case inode number hasn't been returned by NtQueryDirectoryFile.
1885 (fhandler_disk_file::readdir): Move old functionality to readdir_9x.
1886 Call readdir_9x when on 9x/Me. Implement NT specific readdir here.
1887 (fhandler_disk_file::readdir_9x): Move 9x specific readdir here.
1888 (fhandler_disk_file::seekdir): Accommodate new NT readdir method.
1889 (fhandler_disk_file::closedir): Ditto.
1890 (fhandler_cygdrive::fstat): Set d_ino to namehash. Add comment.
1891 (fhandler_cygdrive::opendir): Call get_namehash to prepare later
1892 correct evaluation of d_ino.
1893 (fhandler_cygdrive::readdir): Replace recursion with loop. Evaluate
1894 drive's d_ino by calling readdir_get_ino.
1895 * fhandler_proc.cc (fhandler_proc::readdir): Set dirent_saw_dot and
1896 dirent_saw_dot_dot to avoid seeing . and .. entries twice.
1897 * fhandler_process.cc (fhandler_process::readdir): Ditto.
1898 * fhandler_registry.cc (fhandler_registry::readdir): Ditto.
1899 * ntdll.h (STATUS_INVALID_PARAMETER): New define.
1900 (STATUS_INVALID_LEVEL): New define.
1901 (struct _FILE_INTERNAL_INFORMATION): Rename member IndexNumber to
1902 FileId (as in Nebbitt).
1903 * path.h (path_conv::hasgood_inode): Now implemented in
1904 fhandler_disk_file.cc.
1905 * wincap.h (wincaps::has_fileid_dirinfo): New element.
1906 * wincap.cc: Implement above element throughout.
1907 * winsup.h (readdir_get_ino): Add declaration.
1908 * include/sys/dirent.h (struct dirent): Slightly rename structure
1909 members to accommodate changes.
1910 Remove __USE_EXPENSIVE_CYGWIN_D_INO handling and declaration of
1911 __opendir_with_d_ino.
1913 2006-01-27 Christopher Faylor <cgf@timesys.com>
1915 * spawn.cc (spawn_guts): Fix potential handle leak when failing exec.
1917 2006-01-27 Christopher Faylor <cgf@timesys.com>
1919 * exceptions.cc (inside_kernel): Fix to return true if we can't get the
1920 name of the DLL for the given memory block since we are not in kernel
1923 2006-01-26 Corinna Vinschen <corinna@vinschen.de>
1925 * fhandler.cc (fhandler_base::open): Fix bug in argument order to
1926 InitializeObjectAttributes call.
1928 2006-01-25 Corinna Vinschen <corinna@vinschen.de>
1930 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix test for
1931 dirent_isroot to use the correct boolean operator.
1933 2006-01-25 Christopher Faylor <cgf@timesys.com>
1935 * ntdll.h: (temporarily?) Add more functions for querying directory.
1937 2006-01-24 Christopher Faylor <cgf@timesys.com>
1939 * dir.cc (readdir_worker): Turn off expensive inode calculation.
1941 2006-01-24 Corinna Vinschen <corinna@vinschen.de>
1943 * fhandler_process.cc (fhandler_process::fill_filebuf): Disable
1944 stripping the .exe suffix from the link target in PROCESS_EXE and
1945 PROCESS_EXENAME case.
1946 * path.cc (realpath): Tack on .exe suffix if necessary.
1948 2006-01-24 Corinna Vinschen <corinna@vinschen.de>
1950 * fhandler_disk_file.cc (fhandler_base::fstat_helper): Try harder
1951 to determine remote file systems with reliable inode numbers. Add
1954 2006-01-23 Corinna Vinschen <corinna@vinschen.de>
1956 * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Reset
1957 inheritance for duplicated socket.
1959 2006-01-20 Christopher Faylor <cgf@timesys.com>
1961 * include/cygwin/version.h: Bump API minor number to 151.
1962 * dir.cc (__opendir_with_d_ino): New function.
1963 (opendir): Set flag if we should be calculating inodes.
1964 (readdir_worker): Calculate d_ino by calling stat if the user has asked
1966 (seekdir64): Maintain all persistent flag settings.
1967 * fhandler.h (dirent_states): Add dirent_set_d_ino.
1968 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Reflect changes
1969 to dirent structure.
1970 * fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
1971 * include/sys/dirent.h (struct dirent): Coalesce two similar
1972 structures. Remove all shreds of the apparently highly confusing
1973 references to inodes. Add support for calculating a real inode if
1974 __USE_EXPENSIVE_CYGWIN_D_INO is defined.
1976 2006-01-20 Christopher Faylor <cgf@timesys.com>
1978 * include/sys/dirent.h: Add comments for people who are REALLY confused
1979 about whether they should be using something called __invalid_d_ino or
1982 2006-01-20 Corinna Vinschen <corinna@vinschen.de>
1984 * fhandler_socket.cc (fhandler_socket::prepare): Fix debug output.
1985 (fhandler_socket::release): Add debug output for WSAEventSelect failure.
1986 (fhandler_socket::ioctl): Always cancel WSAEventSelect before switching
1987 to blocking mode. Only set nonblocking flag if ioctlsocket call
1988 succeeded. Only print new socket state if ioctlsocket call succeeded.
1990 2006-01-19 Christopher Faylor <cgf@timesys.com>
1992 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Check posix path
1993 for root rather than windows path.
1995 2006-01-19 Christopher Faylor <cgf@timesys.com>
1997 * dir.cc (readdir_worker): Fill in invalid fields with -1. Accommodate
1998 name change from __ino32 to __invalid_ino32.
1999 * include/sys/dirent.h (__invalid_ino32): Rename from __ino32. Don't
2000 define unused d_type macros.
2002 2006-01-18 Christopher Faylor <cgf@timesys.com>
2004 * heap.cc (heap_init): Remove Sleep.
2006 2006-01-18 Corinna Vinschen <corinna@vinschen.de>
2008 * net.cc (rresvport): Remove extern declaration.
2010 2006-01-18 Corinna Vinschen <corinna@vinschen.de>
2012 * autoload.cc (rresvport): Remove.
2013 * net.cc (last_used_rrecvport): New global shared variable.
2014 (cygwin_rresvport): Implement rresvport without using rresvport from
2017 2006-01-18 Corinna Vinschen <corinna@vinschen.de>
2019 * include/cygwin/socket.h (struct sockaddr_storage): Fix typo in
2020 ss_family member name.
2022 2006-01-16 Christopher Faylor <cgf@timesys.com>
2024 * include/cygwin/version.h: Bump DLL minor version number to 20.
2026 2006-01-13 Corinna Vinschen <corinna@vinschen.de>
2028 * uname.cc (uname): Concatenate a "-WOW64" to utsname's sysname
2029 member to see when running under WOW64.
2031 2006-01-13 Corinna Vinschen <corinna@vinschen.de>
2033 * net.cc (cygwin_setsockopt): Ignore errors when setting IP_TOS on
2034 Windows 2000 and above. Clarify the comment about IP_TOS and move
2035 to the place where the magic happens.
2036 (get_ifconf): Remove unused code.
2037 * wincap.h (wincaps::has_disabled_user_tos_setting): New element.
2038 * wincap.cc: Implement above element throughout.
2040 2006-01-12 Christopher Faylor <cgf@timesys.com>
2042 * fhandler_console.cc (set_console_state_for_spawn): Fix to recognize
2045 2006-01-12 Christopher Faylor <cgf@timesys.com>
2047 * fhandler.h (set_console_state_for_spawn): Whackamole the argument
2049 * spawn.cc (spawn_guts): Ditto, i.e., once again call
2050 set_console_state_for_spawn with an indication of whether we're about
2051 to start a cygwin process.
2052 * fhandler_console.cc (set_console_state_for_spawn): Don't set the
2053 console state if we know we're starting a cygwin process or if we're
2056 2006-01-10 Corinna Vinschen <corinna@vinschen.de>
2058 * dcrt0.cc (dll_crt0_0): Remove call to wincap.init.
2059 * init.cc (dll_entry): Rename is_wow64_proc to wow64_test_stack_marker.
2060 Call wincap.init here before doing anything else. Use wincap.is_wow64
2061 to determine if we're running in a WOW64 emulator.
2062 * mmap.cc (MapViewNT): Don't use AT_ROUND_TO_PAGE in WOW64, it's
2063 apparently not supported.
2064 (mmap64): Don't create mappings beyond EOF, which would need to use
2065 AT_ROUND_TO_PAGE, on WOW64.
2066 * wincap.cc (wincap): Throw into the .cygwin_dll_common section.
2067 (wincapc::init): Determine if running in WOW64 and set wow_64 flag.
2068 * wincap.h (class wincapc): Add wow64 member.
2069 (wincapc::is_wow64): New method.
2071 2006-01-10 Christopher Faylor <cgf@timesys.com>
2073 * fhandler_proc.cc (format_proc_cpuinfo): Avoid leading whitespace in
2076 2006-01-09 Christopher Faylor <cgf@timesys.com>
2078 * spawn.cc (spawn_guts): Reorganize slightly so that 16 bit check is
2079 done prior to check for command.com/cmd.com. Don't bother setting
2080 CREATE_SUSPENDED flag for a MS-DOS process since it doesn't work
2081 anyway. Avoid calling remember() when the child process has already
2083 (av::fixup): Explicitly set cygexec flag to false on a 16 bit process.
2085 2006-01-09 Corinna Vinschen <corinna@vinschen.de>
2087 * include/getopt.h (getopt_long_only): Declare.
2089 2006-01-09 Eric Blake <ebb9@byu.net>
2091 * cygwin.din: Export getsubopt.
2092 * include/cygwin/version.h: Bump API minor version.
2094 2006-01-08 Christopher Faylor <cgf@timesys.com>
2096 * fhandler_tty.cc (fhandler_tty_slave::dup): Don't assign a controlling
2097 terminal to a process when duped. Linux doesn't do this, so we won't
2100 2006-01-08 Christopher Faylor <cgf@timesys.com>
2102 * environ.cc (spenvs[]): windir -> WINDIR.
2104 2006-01-07 Christopher Faylor <cgf@timesys.com>
2106 * fhandler_console.cc (fhandler_console::need_invisible): Remove
2109 2006-01-07 Christopher Faylor <cgf@timesys.com>
2111 * fhandler.h (set_console_state_for_spawn): Eliminate argument from
2113 * fhandler.cc (set_console_state_for_spawn): Eliminate argument from
2114 definition. Always check for invisible console.
2115 (fhandler_console::need_invisible): Don't do anything if the windows
2116 station is already not visible.
2117 * spawn.cc (spawn_guts): Accommodate change of argument to
2118 set_console_state_for_spawn.
2120 2006-01-05 Christopher Faylor <cgf@timesys.com>
2122 * sigproc.cc (no_signals_available): Use existence of signal thread
2123 handle to figure out if we can actually send signals rather than
2124 relying on my_sendsig.
2125 (hwait_sig): Make static.
2126 (sigproc_init): Don't set my_sendsig to anything special. Use new
2127 global static hwait_sig.
2128 (wait_sig): Set hwait_sig to NULL when we are exiting.
2130 2006-01-05 Christopher Faylor <cgf@timesys.com>
2132 * include/getopt.h: Accommodate recent unfortunate newlib changes.
2134 2006-01-05 Christopher Faylor <cgf@timesys.com>
2136 * cygtls.cc (_cygtls::remove): Don't output debugging info if this
2137 isn't a cygwin thread.
2138 * sigproc.cc (sigproc_init): Move clearing of sync_startup here to
2139 lessen the likelihood of trying to deal with non-cygwin threads in
2142 * fhandler_console: Fix set_console_state_for_spawn comment.
2144 2006-01-05 Igor Peshansky <pechtcha@cs.nyu.edu>
2146 * spawn.cc (spawn_guts): Invert the argument to
2147 set_console_state_for_spawn.
2149 2006-01-04 Christopher Faylor <cgf@timesys.com>
2151 * fhandler_console.cc (fhandler_console::need_invisible): Only try to
2152 open "CygwinInvisible" windows station if opening of default station
2153 fails. Use CloseWindowStation to close window station handle.
2155 2006-01-04 Christopher Faylor <cgf@timesys.com>
2157 * fhandler_console.cc (fhandler_console::need_invisible): Open up the
2158 security of the newly created windows station.
2160 2006-01-04 Eric Blake <ebb9@byu.net>
2162 * path.cc (dot_special_chars): Add ", <, >, and |.
2164 2006-01-03 Christopher Faylor <cgf@timesys.com>
2166 * fhandler_console.cc (beep): Use MB_OK which is documented as using
2167 the default bell rather than -1 which seems to behave differently on
2168 different versions of Windows.
2170 2006-01-03 Christopher Faylor <cgf@timesys.com>
2172 * fhandler_process.cc (fhandler_process::readdir): Add missing argument
2175 * fhandler_console.cc (fhandler_console::need_invisible): Use made-up
2176 name for windows station rather than asking Windows to create one for
2179 * spawn.cc (spawn_guts): Don't mess with console if we're detaching.
2181 2006-01-03 Christopher Faylor <cgf@timesys.com>
2183 * dir.cc (readdir_worker): Minor code cleanup.
2185 * fhandler_console.cc (beep): Use a more Windows-generic wav file if
2186 the beep is missing. Use a more foolproof way to find out whether we
2187 should be recreating the missing key.
2189 * registry.h (reg_key::_disposition): New field.
2190 (reg_key::created): New function.
2191 * registry.cc (reg_key::reg_key): Set _disposition to zero by default.
2192 (reg_key::build_key): Fill in _disposition field.
2194 2006-01-03 Eric Blake <ebb9@byu.net>
2196 * dir.cc (readdir_worker): Ensure that saw_dot* flags are updated when
2197 not handling inodes.
2199 2006-01-02 Christopher Faylor <cgf@timesys.com>
2201 * fhandler_console.cc (beep): New function. Restores missing "Default
2202 Beep", if necessary.
2203 (fhandler_console::write_normal): Use beep().
2205 2006-01-02 Christopher Faylor <cgf@timesys.com>
2207 * dcrt0.cc (_dll_crt0): Remove more leftover debugging stuff.
2208 (cygwin_dll_init): Remove unneeded initializations. Call _dll_crt0
2209 rather than dll_crt0_1.
2211 2006-01-02 Corinna Vinschen <corinna@vinschen.de>
2213 * syslog.cc: Include sys/un.h instead of sys/socket.h.
2214 (syslogd_inited): Convert to enum type noting the exact result of
2215 trying to connect to syslog daemon. Use this way throughout.
2216 (connect_syslogd): New static function taking over the task to
2217 connect to syslog socket. Use correct struct sockaddr_un instead of
2219 (try_connect_syslogd): Call connect_syslogd. If write fails on
2220 connection oriented socket, try to reconnect to syslog socket and
2223 2006-01-01 Christopher Faylor <cgf@timesys.com>
2225 * pinfo.cc (pinfo::exit): Swap signal and normal exit value when not
2226 started from a cygwin process - just like the good-old-days of B20.
2228 2006-01-01 Christopher Faylor <cgf@timesys.com>
2230 * strace.cc (strace::write_childpid): Remove debugging output.
2232 2006-01-01 Christopher Faylor <cgf@timesys.com>
2234 * cygtls.cc (_cygtls::remove): Remove left over debugging cruft which
2235 caused this function to always return prematurely.
2237 2006-01-01 Christopher Faylor <cgf@timesys.com>
2239 * exceptions.cc (sigpacket::process): Pass actual reference to signal's
2240 sigaction structure to setup_handler.
2242 2006-01-01 Christopher Faylor <cgf@timesys.com>
2244 * exceptions.cc (_cygtls::interrupt_setup): Implement SA_RESETHAND.
2245 * include/cygwin/signal.h: Define SA_ONESHOT and SA_NOMASK.
2247 * dcrt0.cc (get_cygwin_startup_info): Remove commented out code.
2249 2006-01-01 Corinna Vinschen <corinna@vinschen.de>
2251 * syslog.cc (vklog): Never log kernel messages using the vsyslog