1 2006-07-19 Corinna Vinschen <corinna@vinschen.de>
3 * pinfo.cc (commune_process): Don't add extra \0 to cmdline.
4 (_pinfo::cmdline): Ditto process internal.
6 2006-07-19 Corinna Vinschen <corinna@vinschen.de>
8 * mmap.cc (msync): Disable rounding up len. Fix bug in access check
11 2006-07-19 Corinna Vinschen <corinna@vinschen.de>
13 * path.cc (symlink_worker): Return EEXIST if newpath exists.
15 2006-07-18 Christopher Faylor <cgf@timesys.com>
17 * tty.cc (tty_list::terminate): Don't enter the busy loop if we don't
20 2006-07-18 Silvio Laguzzi <slaguzzi@data-al.de>
22 * sec_acl.cc (acltotext32): Add missing handling of default ACL entry
25 2006-07-18 Corinna Vinschen <corinna@vinschen.de>
27 * fhandler_floppy.cc (fhandler_dev_floppy::ioctl): Fix typo in lint
30 2006-07-17 Christopher Faylor <cgf@timesys.com>
33 * cygheap.h (cygheap_user): Remove unneeded class names from function
35 * fhandler.h (fhandler_base): Ditto.
36 (fhandler_dev_floppy): Ditto.
37 (fhandler_console): Ditto.
38 * wininfo.h (wininfo): Ditto.
39 * exceptions.cc (sigpacket::process): Avoid compiler errors about gotos
41 * fhandler_fifo.cc (fhandler_fifo::open): Ditto.
42 * fhandler_floppy.cc (fhandler_dev_floppy::ioctl): Ditto.
43 * fhandler_tty.cc (fhandler_tty_slave::ioctl): Ditto.
44 * mmap.cc (mmap64): Ditto.
45 * pipe.cc (fhandler_pipe::open): Ditto.
46 * spawn.cc (spawn_guts): Ditto.
48 * sec_helper.cc: Fix some comments.
49 (get_null_sd): Move file-scope static to only function where it is
52 2006-07-14 Christopher Faylor <cgf@timesys.com>
54 * fork.cc (fork): Lock the process before forking to prevent things
55 like new fds from being opened, etc.
56 * sync.h (lock_process::dont_bother): New function.
58 2006-07-14 Christopher Faylor <cgf@timesys.com>
60 * include/cygwin/types.h: Update copyright.
62 2006-07-14 Christopher Faylor <cgf@timesys.com>
64 * cygwin.sc: Make sure there's something in the cygheap.
65 * dllfixdbg: Accommodate newer binutils which put the gnu_debuglink at
66 the end rather than at the beginning.
68 2006-07-13 Christopher Faylor <cgf@timesys.com>
70 * sigproc.cc (waitq_head): Don't initialize to zero.
71 * sigproc.h: Update copyright, fix whitespace.
73 2006-07-13 Christopher Faylor <cgf@timesys.com>
75 * fhandler.cc (fhandler_base::raw_read): Only return EISDIR when we're
76 really trying to read a directory.
78 * sigproc.cc: Use "Static" where appropriate.
80 2006-07-13 Corinna Vinschen <corinna@vinschen.de>
82 * fhandler_socket.cc: Update copyright.
83 * include/pthread.h: Ditto.
85 2006-07-13 Corinna Vinschen <corinna@vinschen.de>
87 * mmap.cc (mmap64): Drop MAP_NORESERVE flag for non-anonymous,
89 (mmap_record::unmap_pages): Only check noreserve flag which now implies
90 anonymous and private.
92 (fixup_mmaps_after_fork): Ditto.
94 2006-07-13 Corinna Vinschen <corinna@vinschen.de>
96 * mmap.cc (mmap64): Drop MAP_RESERVED flag for all non-anonymous,
99 2006-07-13 Corinna Vinschen <corinna@vinschen.de>
101 * exceptions.cc (_cygtls::handle_exceptions): Call new
102 mmap_is_attached_or_noreserve_page function in case of access violation
103 and allow application to retry access on noreserve pages.
104 * mmap.cc (mmap_is_attached_or_noreserve_page): Changed from
105 mmap_is_attached_page. Handle also noreserve pages now. Change
107 * winsup.h (mmap_is_attached_or_noreserve_page): Declare instead of
108 mmap_is_attached_page.
110 2006-07-12 Corinna Vinschen <corinna@vinschen.de>
112 * mmap.cc (mmap_record::alloc_page_map): Don't call VirtualProtect
113 on maps created with MAP_NORESERVE.
115 2006-07-12 Corinna Vinschen <corinna@vinschen.de>
117 * include/pthread.h: Define PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT and
118 PTHREAD_PRIO_PROTECT only if _POSIX_THREAD_PRIO_INHERIT is defined.
120 2006-07-10 Corinna Vinschen <corinna@vinschen.de>
122 * libc/inet_addr.c: Define __INSIDE_CYGWIN_NET__.
123 * libc/inet_network.c: Ditto.
125 2006-07-07 Corinna Vinschen <corinna@vinschen.de>
127 * fhandler_socket.cc (fhandler_socket::wait): Disable SA_RESTART
130 2006-07-07 Corinna Vinschen <corinna@vinschen.de>
132 * Makefile.in (DLL_OFILES): Add inet_addr.o and inet_network.o.
133 * autoload.cc (inet_addr): Drop definition.
135 * net.cc: Forward declare cygwin_inet_aton and cygwin_inet_ntop.
136 (cygwin_inet_ntoa): Call cygwin_inet_ntop instead of Winsock inet_ntoa.
137 (cygwin_inet_addr): Remove here.
138 (cygwin_inet_aton): Ditto.
139 (cygwin_inet_network): Ditto.
140 * libc/inet_addr.c: New file implementing cygwin_inet_aton and
142 * libc/inet_network.c: New file implementing cygwin_inet_network.
144 2006-07-06 Christopher Faylor <cgf@timesys.com>
146 * hookapi.cc: Add comment header
147 (putmem): Make static.
149 (rvadelta): Ditto. Don't assume that a section which ends where the
150 import_rva begins is the import list.
152 * child_info.h: Update copyright.
155 2006-07-05 Christopher Faylor <cgf@timesys.com>
157 * sortdin: Ignore all leading underscores when deriving a sort key.
158 * cygwin.din: Resort.
160 2006-07-05 Christopher Faylor <cgf@timesys.com>
162 * sortdin: New program.
165 2006-07-05 Corinna Vinschen <corinna@vinschen.de>
167 * fhandler.h (fhandler_socket::wait): Reset default timeout to 10ms.
169 2006-07-05 Corinna Vinschen <corinna@vinschen.de>
171 * path.cc (path_conv::check): Ignore has_ea setting, it's always unset
172 at this point anyway.
173 (get_symlink_ea): Remove.
174 (set_symlink_ea): Remove.
175 (symlink_worker): Drop writing symlink into NTFS extended attributes.
176 (symlink_info::check): Drop reading symlinks from NTFS extended
179 2006-07-04 Christopher Faylor <cgf@timesys.com>
181 * libc/rexec.cc (cygwin_rexec): Obvious (?) fix to correct a gcc
182 warning - set port to zero first thing in the function.
184 2006-07-04 Corinna Vinschen <corinna@vinschen.de>
186 * signal.cc (signal): Set sa_mask to sig.
188 2006-07-04 Corinna Vinschen <corinna@vinschen.de>
190 * Makefile.in (DLL_OFILES): Add rexec.o.
191 * autoload.cc (inet_network): Drop definition.
193 * net.cc (rexec): Drop extern declaration.
194 (inet_network): Ditto.
195 (cygwin_inet_network): Implement using inet_addr.
196 (cygwin_rexec): Remove.
197 * libc/rexec.cc: New file.
199 2006-07-04 Corinna Vinschen <corinna@vinschen.de>
201 * fhandler_socket.cc (fhandler_socket::listen): Allow listening on
204 2006-07-04 Corinna Vinschen <corinna@vinschen.de>
206 * fhandler.h (fhandler_socket::wait): Set default timeout to INFINITE.
208 2006-07-03 Corinna Vinschen <corinna@vinschen.de>
210 * autoload.cc (NtQueryEaFile): Define.
211 (NtSetEaFile): Define.
212 * fhandler.cc (fhandler_base::open): Use appropriate open flags
213 in query case when allow_ntea is set.
214 * ntdll.h (struct _FILE_GET_EA_INFORMATION): Define.
215 (struct _FILE_FULL_EA_INFORMATION): Define.
216 (NtQueryEaFile): Declare.
217 (NtSetEaFile): Declare.
218 * ntea.cc (read_ea): Rename from NTReadEA and rewrite using
220 (write_ea): Rename from NTWriteEA and rewrite using NtSetEaFile.
221 * path.cc (get_symlink_ea): Make static. Add handle parameter to
222 accomodate new read_ea call.
223 (set_symlink_ea): Make static. Add handle parameter to accomodate new
225 (symlink_worker): Call set_symlink_ea while file is still open.
226 (symlink_info::check): Call get_symlink_ea after file has been opened.
227 * security.cc (get_file_attribute): Accomodate new read_ea call.
228 (set_file_attribute): Accomodate new write_ea call.
229 * security.h (read_ea): Change declaration accordingly.
232 2006-07-03 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
234 * fhandler.h (class dev_console): Add `metabit' indicating the
235 current meta key mode.
236 * fhandler_console.cc (fhandler_console::read): Set the top bit of
237 the character if metabit is true.
238 * fhandler_console.cc (fhandler_console::ioctl): Implement
239 KDGKBMETA and KDSKBMETA commands.
240 * fhandler_tty.cc (process_ioctl): Support KDSKBMETA.
241 (fhandler_tty_slave::ioctl): Send KDGKBMETA and KDSKBMETA to the
243 * include/cygwin/kd.h: New file for the meta key mode.
244 * include/sys/kd.h: New file.
246 2006-07-03 Eric Blake <ebb9@byu.net>
248 * include/stdint.h (UINT8_C, UINT16_C): Unsigned types smaller
249 than int promote to signed int.
251 2006-07-03 Corinna Vinschen <corinna@vinschen.de>
253 * net.cc (cygwin_sendto): Define appropriate parameters using
254 socklen_t type according to SUSv3.
255 (cygwin_recvfrom): Ditto.
256 (cygwin_setsockopt): Ditto.
257 (cygwin_getsockopt): Ditto.
258 (cygwin_connect): Ditto.
259 (cygwin_accept): Ditto.
260 (cygwin_bind): Ditto.
261 (cygwin_getsockname): Ditto.
262 (cygwin_getpeername): Ditto.
263 (cygwin_recv): Ditto.
264 (cygwin_send): Ditto.
265 * include/cygwin/socket.h (socklen_t): Typedef and define.
266 * include/sys/socket.h: Declare socket functions using socklen_t type.
268 2006-07-02 Christopher Faylor <cgf@timesys.com>
270 * include/cygwin/version.h: Bump DLL minor version number to 21.
272 2006-06-30 Corinna Vinschen <corinna@vinschen.de>
274 * net.cc (cygwin_sendto): Allow zero-sized packets.
275 (cygwin_sendmsg): Ditto.
277 2006-06-26 Corinna Vinschen <corinna@vinschen.de>
279 Revert patches from 2005-10-22 and 2006-06-14 to use event driven
280 accept and connect back to using select:
281 * fhandler.h (class fhandler_socket): Remove accept_mtx.
282 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Drop
283 initializing accept_mtx.
284 (fhandler_socket::accept): Drop event handling.
285 (fhandler_socket.cc (fhandler_socket::connect): Ditto.
286 (fhandler_socket::dup): Drop accept_mtx handling.
287 (fhandler_socket::listen): Ditto.
288 (fhandler_socket::prepare): Ditto.
289 (fhandler_socket::release): Ditto.
290 (fhandler_socket::close): Ditto.
291 * net.cc (cygwin_accept): Revert to calling cygwin_select to
292 implement interuptible accept.
293 (cygwin_connect): Ditto for connect.
295 2006-06-22 Christopher Faylor <cgf@timesys.com>
297 * fhandler_fifo.cc (fhandler_fifo::open): Release process lock and grab
298 a system-wide mutex to prevent a deadlock and a race.
299 * sync.h (lock_process): Make fhandler_fifo a friend.
301 * smallprint.c (__small_vsprintf): Cosmetic change.
303 2006-06-15 Corinna Vinschen <corinna@vinschen.de>
305 * cygwin.din: Export __srget_r, __swbuf_r.
306 * include/cygwin/version.h: Bump API minor number to 156.
308 2006-06-14 Corinna Vinschen <corinna@vinschen.de>
310 * fhandler.h (class fhandler_socket): Add private mutex handle
312 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Initialize
314 (fhandler_socket::dup): Duplicate accept_mtx, if available.
315 (fhandler_socket::listen): Create accept_mtx before trying to listen.
316 (fhandler_socket::prepare): Wait for accept_mtx if available to
317 serialize accepts on the same socket.
318 (fhandler_socket::release): Release accept_mtx.
319 (fhandler_socket::close): Close accept_mtx on successful closesocket.
321 2006-06-12 Christopher Faylor <cgf@timesys.com>
323 * fhandler_tty.cc (fhandler_pty_master::close): Always close
324 from_master/to_master since we always have copies of these handles.
326 2006-06-12 Corinna Vinschen <corinna@vinschen.de>
328 * include/sys/wait.h: Move definition of wait constants from here...
329 * include/cygwin/wait.h: ...to here. New file.
330 * include/cygwin/stdlib.h: Include cygwin/wait.h to conform with SUSv3.
332 2006-06-12 Pierre Humblet Pierre.Humblet@ieee.org
334 * heap.cc (heap_init): Only commit if allocsize is not zero.
336 2006-06-12 Corinna Vinschen <corinna@vinschen.de>
338 * net.cc (fdsock): Disable raising buffer sizes. Add comment to
341 2006-06-04 Christopher Faylor <cgf@timesys.com>
343 * ioctl.cc (ioctl): Accommodate change in reported pty master device
345 * select.cc (peek_pipe): Ditto.
347 2006-06-04 Christopher Faylor <cgf@timesys.com>
349 * cygtls.h (CYGTLS_PADSIZE): Reset to a size that XP SP1 seems to like.
350 * tlsoffsets.h: Regenerate.
352 2006-06-03 Christopher Faylor <cgf@timesys.com>
354 * cygthread.cc (cygthread::terminate_thread): In debugging output, use
355 name of thread being terminated rather than thread doing the
358 * fhandler.h (fhandler_pty_master::slave): Delete.
359 (fhandler_pty_master::get_unit): Ditto.
360 (fhandler_pty_master::setup): Change argument declaration to
361 accommodate new usage.
362 * fhandler_tty.cc (fhandler_tty_master::init): Remove obsolete slave
363 assignment. Pass argument to setup indicating that this is a tty.
364 (fhandler_tty_slave::open): Use dev() method rather than referencing
366 (fhandler_pty_master::open): Don't create archetype based on ptym
367 device number. Set device number to use DEV_TTYM_MAJOR and tty number.
368 Pass argument to setup indicating that this is a pty.
369 (fhandler_pty_master::setup): Change single argument to a flag
370 indicating whether we're creating a pty and use appropriately.
371 Calculate 't' variable here rather than in caller.
373 * fhandler_dsp.cc (fhandler_dev_dsp::open): Use dev() method rather
374 than referencing pc.dev directly.
376 2006-06-03 Christopher Faylor <cgf@timesys.com>
378 * dcrt0.cc (dll_crt0_0): Call tty_list::init_session here.
379 (dll_crt0_1): Reflect renaming from tty_init to tty::init_session.
380 (do_exit): Reflect moving of tty_terminate into tty_list.
381 * exceptions.cc (events_init): Move tty_mutex stuff elsewhere.
382 * fhandler_console.cc (set_console_title): Use lock_ttys class.
383 * fhandler_termios.cc (fhandler_termios::bg_check): Make debug output
385 * fhandler_tty.cc (fhandler_tty_slave::open): Reflect move of
386 attach_tty into tty_list class. Don't attempt to grab master end of
387 pty if master doesn't exist.
388 (fhandler_pty_master::open): Reflect move of allocate_tty into tty_list
389 class. Use lock_ttys::release to release mutex. Improve debugging
391 (fhandler_pty_master::setup): Remove if 0'ed block. Fix argument to
392 SetNamedPipeHandleState.
393 * pinfo.cc (_pinfo::set_ctty): Lock ttys before setting sid/pgid.
394 Improve debugging. Add temporary debugging.
395 * tty.cc (tty_list::init_session): New function.
396 (tty::init_session): Rename from tty_init. Reflect move of attach_tty
398 (tty::create_master): Rename from create_tty_master.
399 (tty_list::attach): Rename from attach_tty. Reflect renaming of
400 connect_tty to connect. Ditto for allocate_tty.
401 (tty_terminate): Delete.
402 (tty_list::terminate): Subsume tty_terminate. Use lock_ttys rather
403 than manipulating mutex directly.
404 (tty_list::allocate): Rename from allocate_tty. Use lock_ttys rather
405 than manipulating mutex directly. Don't set sid here since linux
406 apparently doesn't do this. Reflect move of create_tty_master into
408 (lock_ttys::lock_ttys): Define new constructor.
409 (lock_ttys::release): New function.
410 * tty.h (tty::exists): Return false immediately if !master_pid.
411 (tty::set_master_closed): Define new function.
412 (tty::create_master): Ditto.
413 (tty::init_session): Ditto.
414 (tty_list::mutex): New field.
415 (tty_list::allocate): Define new function.
416 (tty_list::connect): Ditto.
417 (tty_list::attach): Ditto.
418 (tty_list::init_session): Ditto.
419 (lock_ttys): New class.
420 (tty_init): Delete declaration.
421 (tty_terminate): Ditto.
423 (create_tty_master): Ditto.
425 2006-06-03 Christopher Faylor <cgf@timesys.com>
427 * Makefile.in (libdl.a): New library.
429 2006-06-03 Christopher Faylor <cgf@timesys.com>
431 * fhandler_tty.cc (fhandler_pty_master::close): Don't close handles if
433 (fhandler_pty_master::setup): Make sure that original handle is closed
434 when changing inheritance.
435 (fhandler_pty_master::fixup_after_fork): Set from_master/to_master to
437 (fhandler_pty_master::fixup_after_exec): Clear from_master/to_master
440 2006-06-03 Christopher Faylor <cgf@timesys.com>
442 * cygheap.cc (init_cygheap::close_ctty): Remove obsolete code.
443 * dcrt0.cc (child_info_spawn::handle_spawn): Signal ready after we've
444 run fixup_after_exec.
445 * dtable.cc (dtable::fixup_after_exec): Add debugging output.
446 * fhandler_tty.cc (fhandler_pty_master::doecho): Use class version of
448 (fhandler_tty_common::close): Remove obsolete code.
449 (fhandler_tty_slave::fixup_after_exec): Don't close, since this is done
450 in dtable's fixup_after_exec. (revisit later?)
451 (fhandler_pty_master::fixup_after_exec): Ditto.
453 2006-06-02 Christopher Faylor <cgf@timesys.com>
455 * cygtls.h (CYGTLS_PADSIZE): Bump up or suffer a regrettable collision
457 * tlsoffsets.h: Regenerate.
459 * dcrt0.cc (break_here): Define unconditionally for use elsewhere.
460 Call DebugBreak, if appropriate.
461 (initial_env): Rely on break_here() to call DebugBreak.
462 * exceptions.cc (try_to_debug): Ditto.
464 2006-06-02 Christopher Faylor <cgf@timesys.com>
466 * fhandler.cc (fhandler_base::fixup_after_exec): Declare here.
467 * fhandler.h (fhandler_base::fixup_after_exec): Make non-inline.
468 (fhandler_termios::fixup_after_fork): Delete declaration.
469 (fhandler_termios::fixup_after_exec): Ditto.
470 (fhandler_tty_common::inuse): Remove.
471 (fhandler_tty_common::dup): Delete declaration.
472 (fhandler_tty_common::fixup_after_fork): Ditto.
473 (fhandler_tty_slave::fixup_after_exec): Declare new function.
474 (fhandler_pty_master::dwProcessId): New variable.
475 (fhandler_pty_master::from_master): Ditto.
476 (fhandler_pty_master::to_master): Ditto.
477 (fhandler_pty_master::setup): New function.
478 (fhandler_pty_master::fixup_after_fork): Ditto.
479 (fhandler_pty_master::fixup_after_exec): Ditto.
480 * fhandler_termios.cc (fhandler_termios::fixup_after_exec): Delete
482 (fhandler_termios::fixup_after_fork): Ditto.
483 * fhandler_tty.cc (fhandler_tty_master::init): Use fhandler_pty_master
484 setup function rather than obsolete tty::common_init. Delete obsolete
486 (fhandler_tty_slave::fhandler_tty_slave): Set inuse to NULL here.
487 (fhandler_tty_slave::open): Change debugging output for clarity. Check
488 for different things when doing a sanity check on the tty. Reflect the
489 fact that master_pid now is the cygwin pid rather than the windows pid.
490 Use "arch" rather than "archetype" for consistency.
491 (fhandler_tty_slave::close): Close inuse here.
492 (fhandler_tty_slave::dup): Remove old if 0'ed code.
493 (fhandler_pty_master::dup): New function. Handles pty master
495 (fhandler_pty_master::fhandler_pty_master): Zero pty_master specific
497 (fhandler_pty_master::open): Implement using archetypes, similar to
498 slave. Use fhandler_pty_master setup function rather than obsolete
499 tty::common_init. Don't set inuse.
500 (fhandler_tty_common::close): Don't deal with inuse. Delete old if
502 (fhandler_pty_master::close): Implement using archetypes. Close
503 from_master and to_master.
504 (fhandler_tty_common::set_close_on_exec): Just set close_on_exec flag
505 here since everything uses archetypes now.
506 (fhandler_tty_common::fixup_after_fork): Delete definition.
507 (fhandler_tty_slave::fixup_after_exec): Define new function.
508 (fhandler_pty_master::setup): New function, derived from
510 (fhandler_pty_master::fixup_after_fork): New function.
511 (shared_info.h): Reset SHARED_INFO_CB to reflect new tty size.
512 * tty.cc (tty_list::terminate): Close individual handles from
514 (tty::master_alive): Delete.
515 (tty::make_pipes): Ditto.
516 (tty::common_init): Ditto.
517 * tty.h (tty::from_slave): Delete.
518 (tty::to_slave): Ditto.
519 (tty::common_init): Delete declaration.
520 (tty::make_pipes): Ditto.
521 (tty::master_pid): Define as pid_t since it is now a cygwin pid.
523 2006-06-01 Christopher Faylor <cgf@timesys.com>
525 * cygheap.cc (cygheap_fixup_in_child): Don't close parent handle here.
526 Let the caller do that.
527 * dcrt0.cc (child_info_spawn::handle_spawn): Close parent handle here
528 to allow fixup_after_exec functions to use it.
530 * cygtls.cc (_cygtls::call2): Avoid calling exit thread if called with
532 * cygtls.h (_cygtls::isinitialized): Check that we actually have a tls
533 before seeing if it is initialized.
534 * gendef (_sigfe_maybe): Ditto.
535 * dcrt0.cc (dll_crt0_1): Remove static, use just one argument.
536 * dll_init.cc (dllcrt0_info): New structure.
537 (dll_dllcrt0): Change into a front-end to renamed dll_dllcrt0_1 so that
538 we'll always be assured of having something like a tls.
539 (dll_dllcrt0_1): New function, basically renamed from from dll_dllcrt0.
540 Unconditionally call _my_tls.init_exception_handler now that we are
541 assured of having a tls. Change variable name from "linking" to "linked".
542 * winsup.h (dll_crt0_1): Declare.
543 (dll_dllcrt0_1): Ditto.
545 2006-05-30 Christopher Faylor <cgf@timesys.com>
547 * cygtls.cc (_cygtls::call2): Don't call ExitThread on the main thread.
549 2006-05-29 Christopher Faylor <cgf@timesys.com>
551 * winf.h (MAXCYGWINCMDLEN): Set down size to 30000 or suffer fork
554 2006-05-28 Christopher Faylor <cgf@timesys.com>
556 * sigproc.cc (child_info::proc_retry): Mask all of the bits we're
557 interested in, which includes bits above and below 0xc0000000.
559 2006-05-27 Christopher Faylor <cgf@timesys.com>
561 * dll_init.cc (dll_dllcrt0): Previous change didn't work very well with
562 fork. Semi-revert it but change name of variable to something that
565 2006-05-27 Christopher Faylor <cgf@timesys.com>
567 * thread.cc (verifyable_object_isvalid): Check for NULL specifically.
569 2006-05-27 Christopher Faylor <cgf@timesys.com>
571 * dll_init.cc (dll_dllcrt0): Call _my_tls.init_exception_handler if
572 we've finished initializing (Thanks to Gary Zablackis for noticing this
573 problem). Just use cygwin_finished_initializing rather than defining a
576 2006-05-25 Christopher Faylor <cgf@timesys.com>
578 * debug.h (ModifyHandle): Define new macro.
579 (modify_handle): Declare new function.
580 * debug.cc (modify_handle): Define new function.
581 * fhandler.h (fhandler_base::fork_fixup): Change return value from void
583 * fhandler.cc (fhandler_base::fork_fixup): Return true if fork fixup has
585 * pipe.cc (fhandler_pipe::set_close_on_exec): Set inheritance of
586 protected handle via ModifyHandle if DEBUGGING.
587 (fhandler_pipe::fixup_after_fork): Protect guard handle if fork fixup
590 2006-05-24 Christopher Faylor <cgf@timesys.com>
592 * cygtls.cc (_cygtls::call): Call call2 using _my_tls.
593 (_cygtls::init_exception_handler): Always replace existing exception
594 handler with cygwin exception handler.
595 * cygtls.h (_cygtls::call2): Remove static designation.
596 * dcrto.cc (dll_crt0_1): Define in a way that allows calling via
598 (_initialize_main_tls): Delete.
599 (_dll_crt0): Call dll_crt0_1 via cygtls::call. Set _main_tls here.
600 * external.cc (cygwin_internal): Implement CW_CYGTLS_PADSIZE.
601 * include/sys/cygwin.h (CW_CYGTLS_PADSIZE): Define.
602 * tlsoffsets.h: Regenerate.
604 2006-05-24 Christopher Faylor <cgf@timesys.com>
606 * configure.in: Update to newer autoconf.
607 (thanks to Steve Ellcey)
608 * configure: Regenerate.
609 * aclocal.m4: New file.
611 2006-05-23 Lev Bishop <lev.bishop+cygwin@gmail.com>
613 * fhandler.cc (readv): Remove nonsensical assert.
615 2006-05-23 Christopher Faylor <cgf@timesys.com>
617 * select.cc (start_thread_socket): Delay setting thread local exitsock
618 until we know it's correct. Return correct value on error.
620 2006-05-23 Lev Bishop <lev.bishop+cygwin@gmail.com>
621 Christopher Faylor <cgf@timesys.com>
623 * select.cc (start_thread_socket): Clean up exitsock in case of error.
624 Use si->exitcode consistently.
626 2006-05-21 Christopher Faylor <cgf@timesys.com>
628 * child_info.h (_CI_SAW_CTRL_C): New enum.
629 (CURR_CHILD_INFO_MAGIC): Reset.
630 (saw_ctrl_c): New function.
631 (set_saw_ctrl_c): Ditto.
632 * sigproc.cc (child_info::proc_retry): Return EXITCODE_OK if we get
633 STATUS_CONTROL_C_EXIT and we actually saw a CTRL-C.
634 * spawn.cc (dwExeced): Delete.
635 (chExeced): New variable.
636 (spawn_guts): Set chExeced;
637 * exceptions.cc (dwExeced): Delete declaration.
639 (ctrl_c_handler): Detect if we're an exec stub process and set a flag,
642 * fhandler_tty.cc (fhandler_tty_common::__release_output_mutex): Add
643 extra DEBUGGING test.
645 * pinfo.cc: Fix comment.
647 2006-05-21 Christopher Faylor <cgf@timesys.com>
649 * fhandle.h (fhandler_pipe::create_guard): Revert change which
650 eliminated SECURITY_ATTRIBUTES argument.
651 * pipe.cc (fhandler_pipe::open): Duplicate guard from other process and
652 protect it appropriately. Eliminate unneeded writepipe_exists
653 temporary variable. Set inheritance appropriately.
654 (fhandler_pipe::set_close_on_exec): Revert change which eliminated
655 handling guard inheritance.
656 (fhandler_pipe::fixup_after_fork): Ditto. Use correct name of entity
657 being checked by fork_fixup.
658 (fhandler_pipe::fixup_after_exec): Don't bother with guard here.
659 (fhandler_pipe::dup): Cosmetic changes and revert creation of
660 writepipe_exists as noninheritable.
661 (fhandler_pipe::create): Revert change which eliminated
662 SECURITY_ATTRIBUTES argument. Revert change which always made
663 writepipe_exists noninheritable.
665 2006-05-21 Christopher Faylor <cgf@timesys.com>
667 * debug.cc (add_handle): Print handle value when collision detected.
668 * dtable.cc (dtable::stdio_init): Cosmetic change.
669 * fhandler.h (fhandler_base::create_read_state): Protect handle.
670 (fhandler_pipe::create_guard): Ditto. Always mark the handle as
672 (fhandler_pipe::is_slow): Return boolean value rather than numeric 1.
673 * pipe.cc (fhandler_pipe::fhandler_pipe): Always flag that we need fork
675 (fhandler_pipe::open): Don't pass security attributes to create_guard.
676 (fhandler_pipe::set_close_on_exec): Don't handle guard here.
677 (fhandler_pipe::close): Accommodate now-protected guard handle.
678 (fhandler_pipe::fixup_in_child): Don't protect read_state here.
679 (fhandler_pipe::fixup_after_exec): Close guard handle if close_on_exec.
680 (fhandler_pipe::fixup_after_fork): Don't bother with guard here.
681 (fhandler_pipe::dup): Don't set res to non-error prematurely. Use
682 boolean values where appropriate. Protect guard and read_state.
683 (fhandler_pipe::create): Don't call need_fork_fixup since it is now the
684 default. Don't protect read_state or guard.
686 * pipe.cc (fhandler_base::ready_for_read): Use bool values for "avail".
688 * spawn.cc (spawn_guts): Set cygheap->pid_handle as inheritable when
691 2006-05-15 Lev Bishop <lev.bishop+cygwin@gmail.com>
692 Christopher Faylor <cgf@timesys.com>
694 * select.cc (fhandler_pipe::ready_for_read): Actually get the guard
695 mutex for blocking reads.
697 2006-05-20 Christopher Faylor <cgf@timesys.com>
699 * fhandler_tty.cc (fhandler_tty::close): Remove problematic hExeced guard.
701 2006-05-20 Christopher Faylor <cgf@timesys.com>
703 * fhandler_tty.cc (fhandler_tty_slave::open): Reinstate call to
704 need_invisible on first pty open.
706 2006-05-18 Christopher Faylor <cgf@timesys.com>
708 * fhandler_console.cc (fhandler_console::need_invisible): Allocate an
709 invisible window station when ctty != TTY_CONSOLE.
711 2006-05-16 Christopher Faylor <cgf@timesys.com>
713 * cygtls.cc (_cygtls::remove): Don't test for initialization since
714 this function will always be called when _my_tls is initialized.
715 * init.cc (dll_entry): Don't attempt to remove tls info if _my_tls is
716 obviously not even available.
718 2006-05-15 Christopher Faylor <cgf@timesys.com>
720 * sigproc.cc (no_signals_available): Detect hwait_sig ==
721 INVALID_HANDLE_VALUE.
722 (wait_sig): Set hwait_sig to INVALID_HANDLE_VALUE on __SIGEXIT.
724 2006-05-15 Christopher Faylor <cgf@timesys.com>
726 * cygtls.cc (_cygtls::init_thread): Zero entire _my_tls structure and
728 * cygtls.h (_my_tls::padding): Delete.
729 (CYGTLS_PADSIZE): Redefine concept of padding to mean padding at the
731 * dcrt0.cc (initialize_main_tls): Change return to void.
732 * gentls_offsets: Treat const specially, too. Keep going after a '}'
733 is found. Change negative offset calculation to use CYGTLS_PADSIZE.
734 * init.cc (_my_oldfunc): New variable.
735 (threadfunc_fe): Use stored tls value for oldfunc rather than blindly
736 writing to the stack.
737 (munge_threadfunc): Set oldfunc in tls.
738 (dll_entry): Initialize tls allocation.
739 * tlsoffsets.h: Regenerate.
741 2006-05-13 Christopher Faylor <cgf@timesys.com>
743 * ntdll.h (STATUS_INVALID_INFO_CLASS): Conditionalize.
745 2006-05-10 Brian Dessent <brian@dessent.net>
747 * Makefile.in (clean): Also delete *.dbg.
749 2006-05-08 Christian Franke <Christian.Franke@t-online.de>
751 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix typo which
752 caused test for ".." to be skipped.
754 2006-05-02 Christopher Faylor <cgf@timesys.com>
756 * external.cc (cygwin_internal): Set errno on failure.
758 2006-04-27 Corinna Vinschen <corinna@vinschen.de>
760 * pipe.cc (DEFAULT_PIPEBUFSIZE): Raise to 64K.
762 2006-04-26 Corinna Vinschen <corinna@vinschen.de>
764 * fhandler.h (fhandler_base): Change fstat_helper prototype
765 to take file size and inode number as 64 bit values.
766 * fhandler_disk_file.cc (FS_IS_SAMBA): Move to path.cc
767 (FS_IS_SAMBA_WITH_QUOTA): Ditto.
768 (path_conv::hasgood_inode): Delete.
769 (path_conv::is_samba): Delete.
770 (path_conv::isgood_inode): Centralized function to recognize
772 (fhandler_base::fstat_by_handle): Constify fvi_size and fai_size.
773 Accomodate argument change in fstat_helper.
774 (fhandler_base::fstat_by_name): Ditto.
775 (fhandler_base::fstat_helper): Accomodate argument change. Call
776 path_conv::isgood_inode to recognize good inodes.
777 (fhandler_disk_file::opendir): Explain Samba weirdness here.
778 Call path_conv::fs_is_samba instead of path_conv::is_samba.
779 (fhandler_disk_file::readdir): Add STATUS_INVALID_INFO_CLASS
780 as valid return code from NtQueryDirectoryFile to indicate that
781 FileIdBothDirectoryInformation is not supported.
782 Call path_conv::isgood_inode to recognize good inodes.
783 * ntdll.h (STATUS_INVALID_INFO_CLASS): Define.
784 * path.cc (fs_info::update): Rework file system recognition
785 and set appropriate flags.
786 * path.h (struct fs_info): Add is_ntfs, is_samba and is_nfs flags.
787 Constify pure read accessors.
789 2006-04-24 Christopher Faylor <cgf@timesys.com>
791 * environ.cc (getearly): Force correct dereference order when
792 inspecting environ table.
794 2006-04-24 Corinna Vinschen <corinna@vinschen.de>
796 * select.cc (thread_pipe): Raise sleep time only every 8th iteration.
797 (thread_mailslot): Ditto.
799 2006-04-23 Corinna Vinschen <corinna@vinschen.de>
800 Christopher Faylor <cgf@timesys.com>
802 * select.cc (thread_pipe): Raise sleep time dynamically to speed up
803 select on pipes when copying lots of data.
804 (thread_mailslot): Ditto for mailslots.
806 2006-04-22 Christopher Faylor <cgf@timesys.com>
808 * signal.cc (abort): On second thought, just set incyg once.
810 2006-04-22 Christopher Faylor <cgf@timesys.com>
812 * signal.cc (abort): Set incyg manually to help get a reliable gdb
814 * cygwin.din (abort): Make NOSIGFE.
816 2006-04-21 Pierre Humblet Pierre.Humblet@ieee.org
817 Christopher Faylor <cgf@timesys.com>
819 * environ.cc (getearly): Use GetEnvironmentVariable and cmalloc instead
820 of GetEnvironmentStrings.
821 (environ_init): Revert rawenv stuff.
823 2006-04-21 Christopher Faylor <cgf@timesys.com>
825 * environ.cc (rawenv): Make this variable a file-scope static.
826 (getearly): Rename 's' variable to 'len' since 's' is used fairly
827 consistently throughout cygwin as a string variable. Remove rawenv
828 declaration. Perform other minor cleanups.
829 (environ_init): Remove rawenv declaration. Only set rawenv to
830 GetEnvironmentStrings() if it has not already been set. Properly free
833 2006-04-21 Christopher Faylor <cgf@timesys.com>
835 * tty.h (tty::hwnd): Move to tty_min.
836 (tty::gethwnd): Ditto.
837 (tty::sethwnd): Ditto.
838 (tty_min::hwnd): Receive variable from tty class.
839 (tty_min::gethwnd): Receive function from tty classs.
840 (tty_min::sethwnd): Ditto.
841 * dtable.cc (dtable::stdio_init): Only call init_console_handler when
842 we actually own the console.
843 * fhandler_console.cc (fhandler_console::get_tty_stuff): Set tty's hwnd
845 * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Semi-reinstate
846 handling of console when pgrp is set.
848 2006-04-21 Pierre Humblet <Pierre.Humblet@ieee.org>
849 Corinna Vinschen <corinna@vinschen.de>
851 * environ.cc (getearly): New function.
852 (findenv_func): New function pointer, predefined to getearly.
853 (getenv): Call findenv function over the findenv_func pointer.
854 (environ_init): Change findenv_func pointer to my_findenv after Cygwin
855 environment is initialized.
857 2006-04-21 Lars Munch <lars@segv.dk>
859 * include/asm/byteorder.h (__ntohl): Fix the missing uint32_t.
861 2006-04-21 Corinna Vinschen <corinna@vinschen.de>
863 * fhandler_socket.cc (fhandler_socket::wait): Reorder setting
864 WSAError to avoid spurious errors with WSAError set to 0.
866 2006-04-21 Corinna Vinschen <corinna@vinschen.de>
868 * include/asm/byteorder.h: Include stdint.h. Per standard, change
869 datatypes in ntohX and htonX functions to uintXX_t types.
871 2006-04-18 Christopher Faylor <cgf@timesys.com>
873 * exceptions.cc (ctrl_c_handler): Only exit TRUE on CTRL_LOGOFF_EVENT
874 when we have actually handled the event.
876 2006-04-17 Eric Blake <ebb9@byu.net>
878 * mktemp.cc (_gettemp): Open temp files in binary mode.
880 2006-04-14 Corinna Vinschen <corinna@vinschen.de>
882 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Use UINT32_MAX
885 2006-04-14 Corinna Vinschen <corinna@vinschen.de>
887 * fhandler_disk_file.cc (path_conv::hasgood_inode): Make inline.
888 Drop remote fs handling entirely since unreliable inode numbers
889 are now recognized differently.
890 (path_conv::is_samba): Make inline.
891 (fhandler_disk_file::opendir): Reformat comment.
892 (fhandler_base::fstat_helper): Special case remote file systems
893 returning (unreliable) 32 bit inode numbers.
894 (fhandler_disk_file::readdir): Ditto.
895 * fhandler_netdrive.cc (fhandler_netdrive::readdir): Ditto.
897 2006-04-13 Christopher Faylor <cgf@timesys.com>
899 * spawn.cc (spawn_guts): Move ch.set() call back to where it was
902 2006-04-13 Corinna Vinschen <corinna@vinschen.de>
904 * sysconf.cc (sysconf): Add _SC_THREADS, _SC_THREAD_ATTR_STACKSIZE,
905 _SC_THREAD_PRIORITY_SCHEDULING, _SC_THREAD_PROCESS_SHARED,
906 _SC_THREAD_SAFE_FUNCTIONS, _SC_TIMERS handling.
908 2006-04-12 Corinna Vinschen <corinna@vinschen.de>
909 Christopher Faylor <cgf@timesys.com>
911 * spawn.cc (spawn_guts): Revert patch which treated derived cygwin
912 programs differently from those which are mounted with -X. Pass extra
913 argument to linebuf::fromargv.
914 * winf.h (MAXCYGWINCMDLEN): New define.
915 (linebuf::finish): Add a new argument denoting when command line
917 (linebuf::fromargv): Ditto.
918 * winf.cc (linebuf::finish): Implement above change.
919 (linebuf::fromargv): Ditto.
921 2006-04-11 Christopher Faylor <cgf@timesys.com>
923 * Makefile.in (DLL_OFILES): Add winf.o.
924 * spawn.cc: Move command line handling stuff into winf.cc.
928 2006-04-05 Christopher Faylor <cgf@timesys.com>
930 * fhandler_socket.cc: Move iptypes.h include after winsock2 since it
934 2006-04-05 Christopher Faylor <cgf@timesys.com>
936 * dcrt0.cc (dll_crt0_0): Move user_data->{resourcelocks,threadinterface}
937 initialization here from dll_crt0_1.
938 (dll_crt0_1): See above.
940 2006-04-04 Corinna Vinschen <corinna@vinschen.de>
942 * net.cc (fdsock): Raise default SO_RCVBUF/SO_SNDBUF buffer sizes to
943 the same values as on Linux.
945 2006-04-03 Christopher Faylor <cgf@timesys.com>
947 * child_info.h (CURR_CHILD_INFO_MAGIC): Update.
948 (child_info_fork::alloc_stack): Move into this class.
949 (child_info_fork::alloc_stack_hard_way): Ditto.
950 * dcrt0.cc (child_info_fork::alloc_stack): Ditto.
951 (child_info_fork::alloc_stack_hard_way): Ditto.
952 (_dll_crt0): Reference alloc_stack via fork_info.
954 2006-04-03 Corinna Vinschen <corinna@vinschen.de>
956 * spawn.cc (linebuf::finish): Drop argument. Don't check command line
958 (spawn_guts): Remove wascygexec. Check real_path.iscygexec instead.
959 Accommodate change to linebuf::finish.
961 2006-04-03 Christopher Faylor <cgf@timesys.com>
963 * dcrt0.cc (sm): Delete.
964 (alloc_stack_hard_way): Figure out where the stack lives here rather
965 than relying on previously filled out information which has been
966 invalid since 1.5.19.
968 2006-03-31 Corinna Vinschen <corinna@vinschen.de>
970 * fhandler_disk_file.cc (FS_IS_SAMBA_WITH_QUOTA): New define.
971 (path_conv::hasgood_inode): Recognize Samba with quota support
973 (path_conv::is_samba): Ditto. Fix comment to include Samba version
974 numbers for later reference.
976 2006-03-30 Corinna Vinschen <corinna@vinschen.de>
978 * security.h (sec_user_nih): Make sid1 argument mandatory.
981 2006-03-29 Christopher Faylor <cgf@timesys.com>
983 * sigproc.cc (wait_for_sigthread): Use the current user sid when
984 setting up the signal pipe rather than relying on (eventually) the
987 2006-03-29 Christopher Faylor <cgf@timesys.com>
989 * dcrt0.cc (child_info_fork::handle_fork): Set uid/gid in myself so
990 that it can be used by subsequent startup functions.
991 (dll_crt0_0): Issue a warning if DuplicateTokenEx fails and DEBUGGING.
992 (dll_crt0_1): Move user_data->{resourcelocks,threadinterface}
993 initialization here from dll_crt0_0.
994 * fork.cc (frok::child): Tell wait_for_sigthread that this is fork.
995 (frok::parent): Only initialize start_time once. Tighten time when
996 we're "deimpersonated".
997 * sigproc.cc (signal_fixup_after_exec): Rework (futiley) sa_buf stuff.
998 Add debugging output.
999 (wait_for_sigthread): Accept an argument which illustrates whether we
1001 (wait_sig): Avoid using myself pointer.
1002 * winsup.h ((wait_for_sigthread): Reflect change to argument.
1004 2006-03-26 Christopher Faylor <cgf@timesys.com>
1006 * spawn.cc (spawn_guts): Close handles if we know that we will not be
1007 seeing a sync event from the child.
1009 2006-03-26 Christopher Faylor <cgf@timesys.com>
1011 * sigproc.cc (wait_sig): Move myself manipulation...
1012 (wait_for_sigthread): ...to here.
1014 2006-03-24 Corinna Vinschen <corinna@vinschen.de>
1016 * fhandler_floppy.cc: Include ntdef.h and ntdll.h.
1017 (fhandler_dev_floppy::get_drive_info): Rearrange so that now
1018 NtQueryVolumeInformationFile is called on drives which don't support
1019 IOCTL_DISK_GET_DRIVE_GEOMETRY.
1020 * ntdll.h (struct _FILE_FS_SIZE_INFORMATION): Add.
1021 (enum _FSINFOCLASS): Add missing values.
1023 2006-03-23 Christopher Faylor <cgf@timesys.com>
1025 * fhandler_console.cc (fhandler_console::fixup_after_fork_exec): Make
1026 error message more explicit.
1027 * pinfo.cc (_pinfo::commune_request): Don't lock process unless we're
1030 2006-03-23 Christopher Faylor <cgf@timesys.com>
1032 * dcrt0.cc (child_info_spawn::handle_spawn): Don't initialize the
1033 console handler here.
1034 * dtable.cc (dtable::stdio_init): Initialize console handler here.
1036 2006-03-23 Christopher Faylor <cgf@timesys.com>
1038 * sigproc.cc (sigalloc): Don't set SA_RESTART here.
1039 * signal.cc (_SA_NORESTART): New flag.
1040 (sigaction_worker): New function, derived from sigaction. Don't set
1041 internal flags unless called internally.
1042 (sigaction): Use sigaction_worker.
1043 (signal): Honor new _SA_NORESTART flag.
1044 (siginterrupt): Set _SA_NORESTART flag appropriately. Use
1045 sigaction_worker to set flags.
1046 * include/cygwin/signal.h: Define _SA_INTERNAL_MASK here.
1048 2006-03-22 Corinna Vinschen <corinna@vinschen.de>
1050 * thread.cc (pthread_mutex::is_good_initializer_or_bad_object): Delete.
1051 (pthread_cond::is_good_initializer_or_bad_object): Delete.
1052 (pthread_rwlock::is_good_initializer_or_bad_object): Delete.
1053 (pthread_cond::init): Remove disabled code. Guard assignment to
1054 object to initialize against access violation.
1055 (pthread_rwlock::init): Ditto.
1056 (pthread_mutex::init): Ditto.
1058 2006-03-22 Eric Blake <ebb9@byu.net>
1060 * fhandler.cc (fcntl): Print flags in hex.
1062 2006-03-22 Christopher Faylor <cgf@timesys.com>
1064 * dcrt0.cc (dll_crt0_0): Semi-revert 2006-03-14 change which moved
1065 pinfo_init and uinfo_init here.
1066 (dll_crt0_1): Ditto.
1067 (__dll_crt0): Ditto. Don't call update_envptrs here.
1068 (dll_crt0_1): Ditto. Move wait_for_sigthread call here from dll_crt0_0.
1069 * environ.cc (environ_init): Call it here instead.
1070 * sigproc.cc (my_readsig): New static variable.
1071 (wait_for_sigthread): Set up read pipe here since we are assured that
1072 we have the proper privileges when this is called.
1073 (talktome): Eliminate second argument since it is available as a global
1075 (wait_sig): Reflect use of my_readsig.
1077 2006-03-22 Corinna Vinschen <corinna@vinschen.de>
1079 * thread.cc (pthread_cond::init): Disable validity test of object
1080 to initialize since test of uninitialized content is unreliable.
1081 (pthread_rwlock::init): Ditto.
1082 (pthread_mutex::init): Ditto.
1084 2006-03-21 Christopher Faylor <cgf@timesys.com>
1086 * signal.cc (signal): Don't set SA_RESTART here.
1087 (siginterrupt): White space.
1088 * sigproc.cc (sigalloc): Set SA_RESTART here, on initialization.
1090 2006-03-21 Christopher Faylor <cgf@timesys.com>
1092 * child_info.h (child_status): Fix typo which made it impossible to set
1094 (child_info::isstraced): Booleanize.
1095 (child_info::iscygwin): Ditto.
1096 * sigproc.cc (child_info::child_info): Minor cleanup of flag setting.
1097 * spawn.cc (spawn_guts): Only close_all_files when we know the process
1098 has started successfully.
1100 * exceptions.cc (init_console_handler): Fix indentation.
1102 2006-03-20 Christopher Faylor <cgf@timesys.com>
1104 * dcrt0.cc (dll_crt0_0): Call SetErrorMode earlier.
1105 * pinfo.cc (_pinfo::dup_proc_pipe): Reset wr_proc_pipe on failure.
1106 Return previous pipe handle.
1107 * pinfo.h (_pinfo::dup_proc_pipe): Reflect change to return value.
1108 * spawn.cc (spawn_guts): Restore previous proc pipe on retry or if
1109 process exits before synchronization.
1111 2006-03-20 Christopher Faylor <cgf@timesys.com>
1113 * child_info.h (child_status): New enum.
1114 (child_info::flag): Rename from 'straced'.
1115 (child_info::isstraced): New function.
1116 (child_info::iscygwin): Ditto.
1117 (child_info_fork::handle_fork): Reparmize.
1118 (child_info_fork::handle_failure): Ditto.
1119 (child_info_spawn::handle_spawn): New function.
1120 * dcrt0.cc (get_cygwin_startup_info): Use isstraced method.
1121 (child_info_spawn::handle_spawn): Define new function from code
1122 previously in dll_crt0_0.
1123 (dll_crt0_0): Move spawn stuff into handle_spawn. Only call
1124 init_console_handler for fork case.
1125 * sigproc.cc (child_info::child_info): Set flag appropriately.
1126 (child_info::proc_retry): Treat exit code as "funny" if it's a cygwin
1128 * spawn.cc (spawn_guts): Remove commented out flag setting.
1130 2006-03-19 Christopher Faylor <cgf@timesys.com>
1132 * pinfo.cc (commune_process): Fix randomly invalid pointer which caused
1133 fifos to work incorrectly.
1135 2006-03-19 Christopher Faylor <cgf@timesys.com>
1137 * dcrt0.cc (dll_crt0_0): Oops. We need to bother with setting
1138 init_console_handler in the fork/exec case.
1140 2006-03-19 Christopher Faylor <cgf@timesys.com>
1142 * dcrt0.cc (dll_crt0_0): Don't bother with setting init_console_handler
1143 here since it will be set later when we discover if we have a ctty or
1145 * exceptions.cc (init_console_handler): Properly remove NULL handler.
1147 2006-03-18 Christopher Faylor <cgf@timesys.com>
1149 * pinfo.h (EXITCODE_OK): Define new constant.
1150 * sigproc.cc (child_info::sync): Return EXITCODE_OK if entering with
1152 (sig_send): Don't complain if sending signals while blocked if the
1153 sender isn't in the main thread.
1155 2006-03-18 Christopher Faylor <cgf@timesys.com>
1157 * child_info.h (CURR_CHILD_INFO_MAGIC): Regenerate.
1158 (child_info::retry): Move here from fork subclass.
1159 (child_info::exit_code): New field.
1160 (child_info::retry_count): Max retry count for process start.
1161 (child_info::proc_retry): Declare new function.
1162 (child_info_fork::retry): Move to parent.
1163 (child_info_fork::fork_retry): Ditto.
1164 * dcrt0.cc (child_info::fork_retry): Rename and move.
1165 (child_info_fork::handle_failure): Move.
1166 (dll_crt0_0): Initialize console handler based on whether we have a
1167 controlling tty or not. Avoid nonsensical check for fork where it can
1169 * environ.cc (set_proc_retry): Rename from set_fork_retry. Set
1170 retry_count in child_info.
1171 (parse_thing): Reflect above change.
1172 * exceptions.cc (dummy_ctrl_c_handler): Remove unused variable name.
1173 (ctrl_c_handler): Always return TRUE for the annoying
1175 * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Remove call to
1176 init_console_handler.
1177 * fhandler_tty.cc (fhandler_tty_slave::open): Just call
1178 mange_console_count here and let it decide what to do with initializing
1179 console control handling.
1180 * fork.cc (fork_retry): Remove definition.
1181 (frok::parent): Define static errbuf and use in error messages (not
1182 thread safe yet). Close pi.hThread as soon as possible. Protect
1183 pi.hProcess as soon as possible. Don't set retry_count. That happens
1184 automatically in the constructor now. Accommodate name change from
1185 fork_retry to proc_retry.
1186 * init.cc (dll_entry): Turn off ctrl-c handling early until we know how
1187 it is supposed to be handled.
1188 * pinfo.cc (_pinfo::dup_proc_pipe): Remember original proc pipe value
1189 for failure error message. Tweak debug message slightly.
1190 * sigproc.cc (child_info::retry_count): Define.
1191 (child_info::child_info): Initialize retry count.
1192 (child_info::sync): Set exit code if process dies before
1194 (child_info::proc_retry): Rename from child_info_fork::fork_retry. Use
1195 previously derived exit code. Be more defensive about what is
1196 classified as an error exit.
1197 (child_info_fork::handle_failure): Move here from dcrt0.cc.
1198 * spawn.cc (spawn_guts): Maintain error mode when starting new process
1199 to avoid annoying pop ups. Move deimpersonate call within new loop.
1200 Move envblock freeing to end. Loop if process dies prematurely with
1202 * syscalls.cc (setpgid): Remove hopefully unneeded call to
1203 init_console_handler.
1205 2006-03-15 Christopher Faylor <cgf@timesys.com>
1207 * cygheap.cc (init_cygheap::manage_console_count): Turn console control
1208 handler on/off depending on whether we have allocated a console or not.
1209 * dcrt0.cc (child_info_fork::fork_retry): Add more potential retry
1211 (dll_crt0_0): Turn on/off console control depending on whether we have
1212 a controlling tty or not.
1213 * exceptions.cc (init_console_handler): Change BOOL to bool.
1214 * fhandler_console.cc (fhandler_console::need_invisible): Cosmetic
1216 * winsup.h (init_console_handler): Reflect argument type change.
1218 * wincap.h (supports_setconsolectrlhandler_null): Remove duplicate
1219 capability throughout.
1222 2006-03-14 Christopher Faylor <cgf@timesys.com>
1224 * child_info.h (child_info_fork::fork_retry): Declare new function.
1225 * dcrt0.cc (child_info_fork::fork_retry): Define new function.
1226 * fork.cc (frok::parent): Move retry decision into
1227 child_info_fork::fork_retry and honor what it tells us to do.
1228 * sigproc.cc (sig_send): Unhold signals on __SIGEXIT.
1230 2006-03-14 Christopher Faylor <cgf@timesys.com>
1232 * fork.cc (frok::parent): Improve error message.
1234 2006-03-14 Christopher Faylor <cgf@timesys.com>
1236 * dcrt0.cc (main_environ): Initialize to &__cygwin_environment.
1237 (dll_crt0_1): Move resourcelocks, thread interface, pinfo_init, and
1239 (dll_crt0_0): ...to here.
1240 (_dll_crt0): Call update_envptrs here after setting main_environ.
1241 * environ.cc (environ_init): Eliminate initted variable. Don't call
1242 update_envptrs here.
1243 * sigproc.cc (wait_sig): Use my_sendsig when calling CreatePipe to
1244 avoid a dereference.
1246 2006-03-13 Christopher Faylor <cgf@timesys.com>
1248 * child_info.h (child_info_fork::handle_failure): Declare new function.
1249 (child_info_fork::retry): New field.
1250 * dcrt0.cc (__api_fatal_exit_val): Define.
1251 (child_info_fork::handle_failure): Define new function.
1252 (__api_fatal): Exit using __api_fatal_exit_val value.
1253 * environ.cc (set_fork_retry): Set fork_retry based on CYGWIN
1254 environment variable.
1255 (parse_thing): Add "fork_retry" setting.
1256 * fork.cc (fork_retry): Define.
1257 (frok::parent): Reorganize to allow retry of failed child creation if
1258 child signalled that it was ok to do so.
1259 * heap.cc (heap_init): Signal parent via handle_failure when
1261 * pinfo.h (EXITCODE_RETRY): Declare.
1262 * sigproc.cc (child_info::sync): Properly exit with failure condition
1263 if called for fork and didn't see subproc_ready.
1264 * spawn.cc (spawn_guts): Use windows pid as first argument.
1265 * winsup.h: Remove obsolete NEW_MACRO_VARARGS define.
1266 (__api_fatal_exit_val): Declare.
1267 (set_api_fatal_return): Define.
1268 (in_dllentry): Declare.
1269 * exceptions.cc (inside_kernel): Remove unneeded in_dllentry
1272 2006-03-13 Christopher Faylor <cgf@timesys.com>
1274 * dcrt0.cc (dll_crt0_0): Reorganize so that sigproc_init is called a
1275 little later. Add a comment.
1276 * fork.cc (resume_child): Make void.
1277 (frok::parent): Only zero pi when necessary. Explicitly zero si. Set
1278 this_errno when child_copy fails. Accommodate change to resume_child.
1279 * sigproc.cc (sigalloc): Move global_sigs initialization here.
1280 (sigproc_init): Move global_sigs.
1281 (sig_send): Just check for flush signals once.
1283 * wincap.h: Define supports_setconsolectrlhandler_null throughout.
1286 2006-03-13 Corinna Vinschen <corinna@vinschen.de>
1288 * autoload.cc (LoadDLLfuncNt): New define to wrap NT native functions.
1289 Use for NT native functions throughout.
1290 * dtable.cc (handle_to_fn): Treat return value of NtQueryObject as
1293 2006-03-12 Christopher Faylor <cgf@timesys.com>
1295 * cygtls.cc (_cygtls::remove): Reset initialized flag right away if we
1296 were previously initialized.
1297 * cygtls.h (_cygtls::initialized): Move nearer to the end to catch
1298 situation when Windows 98 mysteriously changes parts of _my_tls when
1299 thread is detaching.
1300 * gendef (__sigfe_maybe): Simplify slightly.
1301 * tlsoffsets.h: Regenerate.
1303 2006-03-12 Christopher Faylor <cgf@timesys.com>
1305 * cygtls.h (CYGTLS_INITIALIZED): Change to a little more unlikely value.
1306 (CYGTLSMAGIC): Delete.
1307 * dcrt0.cc (dll_crt0_0): Call sigproc_init during init startup.
1308 (_dll_crt0): Don't worry about sync_startup. Just wait for sigthread here.
1309 * dll_init.cc (cygwin_detach_dll): Only pick up tls version of retaddr
1310 if we have a valid tls.
1311 * fork.cc (frok::child): Remove sigproc_init initialization since it
1312 happens much earlier now.
1313 * gendef: Recognize SIGFE_MAYBE.
1314 (fefunc): Generate calls to _sigfe_maybe, if appropriate.
1315 (_sigfe_maybe): New function.
1316 * init.cc (search_for): Always initialize search_for, even on fork.
1317 (calibration_thread): Delete.
1318 (calibration_id): Delete.
1319 (prime_threads): Delete.
1320 (munge_threadfunc): Remove calibration_thread special case. Avoid
1321 calling thread function if we haven't yet hit the "search_for" thread.
1322 (dll_entry): Remove prime_threads call. Only call munge_threadfunc
1323 when hwait_sig is active. Ditto. for _my_tls.remove ();
1324 * sigproc.cc (hwait_sig): Make global.
1325 (sigproc_init): Don't bother with sync_startup.
1326 (sig_send): Treat flush as a no-op when signals are held.
1327 (wait_sig): Cause signals to be held after fork.
1329 2006-03-09 Corinna Vinschen <corinna@vinschen.de>
1331 * syscalls.cc (rename): Move existance check for oldpath further up
1332 to the start of the function. Avoid another case of a name collision
1333 if oldpath is a shortcut and a file or directory newpath already exists.
1335 2006-03-09 Corinna Vinschen <corinna@vinschen.de>
1337 * autoload.cc (NtClose): Define.
1338 (NtOpenDirectoryObject): Define.
1339 (NtQueryDirectoryObject): Define.
1340 * fhandler_proc.cc: Include ctype.h and wchar.h.
1341 (format_proc_partitions): Revamp loop over existing harddisks by
1342 scanning the NT native \Device object directory and looking for
1344 * ntdll.h: Rearrange system call declarations alphabetically.
1345 (DIRECTORY_QUERY): Define.
1346 (struct _DIRECTORY_BASIC_INFORMATION): Define.
1347 (NtOpenDirectoryObject): Declare.
1348 (NtQueryDirectoryObject): Declare.
1350 2006-03-08 Christopher Faylor <cgf@timesys.com>
1352 * cygtls.h (_cygtls::retaddr): New method.
1353 * dll_init.cc (cygwin_detach_dll): Use new tls method to find return
1354 address since this function is now signal guarded.
1355 (update_envptrs): Remove unneeded braces.
1356 * syscalls.cc (statvfs): Coerce full_path to avoid a gcc warning.
1358 2006-03-08 Corinna Vinschen <corinna@vinschen.de>
1360 * syscalls.cc (statvfs): Simplify path name expression.
1362 2006-03-08 Corinna Vinschen <corinna@vinschen.de>
1364 * syscalls.cc: Include winioctl.h.
1365 (statvfs): Request correct volume size using DeviceIoControl if
1366 quotas are enforced on the file system.
1368 2006-03-03 Corinna Vinschen <corinna@vinschen.de>
1370 * dir.cc (opendir): Fix indentation.
1371 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Move storing
1372 fhandler in file descriptor table to some point very late in function
1373 to avoid double free'ing. Add comment to explain what happens.
1374 Add label free_mounts and don't forget to delete __DIR_mounts structure
1375 if NtOpenFile fails.
1377 2006-03-02 Corinna Vinschen <corinna@vinschen.de>
1379 * syscalls.cc (chroot): Disallow chroot into special directories.
1380 Return EPERM instead.
1382 2006-03-02 Corinna Vinschen <corinna@vinschen.de>
1384 * fhandler_disk_file.cc (__DIR_mounts::check_missing_mount): Check
1385 cygdrive string length for those who have cygdrive mapped to "/".
1387 2006-03-01 Corinna Vinschen <corinna@vinschen.de>
1389 * sec_helper.cc (set_cygwin_privileges): Request SE_BACKUP_NAME
1392 2006-03-01 Corinna Vinschen <corinna@vinschen.de>
1394 * fhandler_proc.cc (fhandler_proc::fstat): Always return fixed link
1395 count of 1 for /proc directory instead of incorrect PROC_LINK_COUNT.
1397 2006-03-01 Corinna Vinschen <corinna@vinschen.de>
1399 * fhandler.h (enum dirent_states): Remove dirent_saw_cygdrive,
1400 dirent_saw_dev and dirent_saw_proc.
1401 (fhandler_cygdrive::open): Declare.
1402 (fhandler_cygdrive::close): Declare.
1403 * fhandler_disk_file.cc (class __DIR_mounts): Move to beginning of file.
1404 (__DIR_mounts::check_mount): New parameter to indicate if inode number
1405 is needed in calling function or not. Add /proc and /cygdrive handling.
1406 (__DIR_mounts::check_missing_mount): Ditto.
1407 (path_conv::ndisk_links): Use __DIR_mounts class to create correct
1408 hardlink count for directories with mount points in them.
1409 (fhandler_disk_file::readdir_helper): Remove /dev, /proc and /cygdrive
1411 (fhandler_cygdrive::open): New method.
1412 (fhandler_cygdrive::close): New method.
1413 (fhandler_cygdrive::fstat): Always return fixed inode number 2 and
1414 fixed link count of 1. Drop call to set_drives.
1415 (fhandler_cygdrive::opendir): Drop call to get_namehash.
1416 (fhandler_cygdrive::readdir): Handle "." entry to return fixed inode
1419 2006-03-01 Christopher Faylor <cgf@timesys.com>
1421 * cygwin.din: Fix some erroneous SIGFE/NOSIGFE settings.
1423 2006-03-01 Christopher Faylor <cgf@timesys.com>
1425 * cygthread.cc (cygthread::callfunc): Revert below change. Make ev a
1426 manual reset event again. so that it will be reset by WaitFor*Object
1428 (cygthread::stub): Ditto.
1429 (cygthread::terminate_thread): Reset ev if it was found to have been
1432 2006-03-01 Christopher Faylor <cgf@timesys.com>
1434 * analyze_sigfe: New script.
1435 * dllfixdbg: Add copyright.
1437 * gendevices: Ditto.
1438 * gentls_offsets: Ditto.
1440 2006-03-01 Christopher Faylor <cgf@timesys.com>
1442 * cygthread.cc (cygthread::callfunc): Create ev as an auto-reset event
1443 so that it will be reset by WaitFor*Object as appropriate.
1444 (cygthread::stub): Ditto.
1445 (cygthread::terminate_thread): Remove forced setting of thread
1448 2006-03-01 Corinna Vinschen <corinna@vinschen.de>
1450 * include/sys/dirent.h (struct __DIR): Rename __d_unused to
1452 * fhandler_disk_file.cc (struct __DIR_cache): Remove useless "typedef".
1453 (d_dirname): Remove useless "struct".
1454 (d_cachepos): Ditto.
1456 (class __DIR_mounts): New class, implementing mount point tracking
1458 (d_mounts): New macro for easy access to __DIR_mounts structure.
1459 (fhandler_disk_file::opendir): Allocate __DIR_mounts structure and
1460 let __d_internal element of dir point to it.
1461 (fhandler_disk_file::readdir_helper): Add mount points in the current
1462 directory, which don't have a real directory backing them.
1463 Don't generate an inode number for /dev. Add comment, why.
1464 (fhandler_disk_file::readdir): Move filling fname to an earlier point.
1465 Check if current entry is a mount point and evaluate correct inode
1467 (fhandler_disk_file::readdir_9x): Ditto.
1468 (fhandler_disk_file::rewinddir): Set all mount points in this directory
1469 to "not found" so that they are listed again after calling rewinddir().
1470 (fhandler_disk_file::closedir): Deallocate __DIR_mounts structure.
1471 * path.cc (mount_info::get_mounts_here): New method to evaluate a list
1472 of mount points in a given parent directory.
1473 * shared_info.h (class mount_info): Declare get_mounts_here.
1475 2006-02-28 Corinna Vinschen <corinna@vinschen.de>
1477 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Use iscygdrive
1478 instead of isspecial.
1479 * path.h (path_conv::iscygdrive): New method.
1481 2006-02-28 Christopher Faylor <cgf@timesys.com>
1483 * exceptions.cc (_cygtls::interrupt_now): Remove "inside cygwin" check
1484 since some cygwin functions are meant to be interrupted.
1486 2006-02-28 Corinna Vinschen <corinna@vinschen.de>
1488 * cygwin.din: Export __isinff, __isinfd, __isnanf, __isnand.
1489 * include/cygwin/version.h: Bump API minor number to 155.
1491 2006-02-28 Corinna Vinschen <corinna@vinschen.de>
1493 * dir.cc (readdir_worker): Use slash as path separator when evaluating
1494 namehash for paths below /proc.
1495 * fhandler_netdrive.cc (fhandler_netdrive::readdir): Use expensive
1496 inode number evaluation on share names.
1498 2006-02-27 Christopher Faylor <cgf@timesys.com>
1500 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Only set
1501 d_cachepos under NT or suffer memory corruption.
1502 (fhandler_disk_file::readdir_helper): Avoid else with a return. Just
1503 calculate extension location once when doing symlink checks.
1504 (fhandler_disk_file::readdir): Make debug output more useful.
1505 (fhandler_disk_file::readdir_9x): Ditto. Eliminate redundant variable.
1507 2006-02-27 Christopher Faylor <cgf@timesys.com>
1509 * include/sys/termios.h (cfsetispeed): Just define as a function rather
1510 than resorting to a macro.
1511 (cfsetospeed): Ditto.
1513 2006-02-27 Christopher Faylor <cgf@timesys.com>
1515 * sigproc.cc: Fix a comment.
1517 2006-02-27 Christopher Faylor <cgf@timesys.com>
1519 * cygthread.cc (cygthread::release): Add a comment.
1521 2006-02-27 Corinna Vinschen <corinna@vinschen.de>
1523 * fhandler_netdrive.cc (fhandler_netdrive::fstat): Create unambiguous
1525 (fhandler_netdrive::readdir): Ditto.
1527 2006-02-24 Christopher Faylor <cgf@timesys.com>
1529 * sigproc.cc (sigheld): Define new variable.
1530 (sig_dispatch_pending): Don't check sigq since that's racy.
1531 (sig_send): Set sigheld flag if __SIGHOLD is specified, reset it if
1532 __SIGNOHOLD is specified. Ignore flush signals if we're holding
1535 2006-02-23 Christopher Faylor <cgf@timesys.com>
1537 * cygwin.din (_exit): Use signal front end.
1540 2006-02-23 Christopher Faylor <cgf@timesys.com>
1542 * winsup.h (cygwin_hmodule): Declare.
1543 * exceptions.cc (inside_kernel): Reverse return values to reflect
1544 function name. Return true if we're in cygwin1.dll or if we're
1545 executing in dll_entry.
1546 (_cygtls::interrupt_now): Reflect reversal of inside_kernel return
1548 * hookapi.cc (cygwin_hmodule): Remove declaration.
1549 * init.cc (dll_entry): Use in_dllentry global to record that we are
1550 executing in dllentry.
1552 2006-02-22 Corinna Vinschen <corinna@vinschen.de>
1554 * exceptions.cc (_cygtls::interrupt_now): Reorder conditional
1555 to call inside_kernel only if this isn't locked.
1557 2006-02-22 Corinna Vinschen <corinna@vinschen.de>
1559 * fhandler.cc (fhandler_base::open): Add FILE_READ_ATTRIBUTES to
1560 access flags in case of query_read_control case, add FILE_READ_DATA
1561 in case of query_stat_control.
1563 2006-02-20 Christopher Faylor <cgf@timesys.com>
1565 * spawn.cc (av::fixup): Check for .bat and friends specifically now
1566 since these extensions are no longer automatically detected.
1568 2006-02-19 Christopher Faylor <cgf@timesys.com>
1570 * exceptions.cc (stackdump): Avoid dumping more than once.
1572 2006-02-19 Christopher Faylor <cgf@timesys.com>
1574 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Use NtOpenFile
1575 to open the directory.
1576 (fhandler_disk_file::readdir): Use NT_SUCCESS to determine if status
1579 2006-02-19 Corinna Vinschen <corinna@vinschen.de>
1581 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Drop generating
1584 2006-02-18 Corinna Vinschen <corinna@vinschen.de>
1586 * fhandler_disk_file.cc (FS_IS_SAMBA): Move out of
1587 path_conv::hasgood_inode.
1588 (path_conv::is_samba): New method.
1589 (fhandler_base::fstat_by_handle): Don't even try to use
1590 FileIdBothDirectoryInformation on Samba.
1591 * path.h (class path_conv): Declare is_samba method.
1593 2006-02-17 Christopher Faylor <cgf@timesys.com>
1595 * path.cc (conv_path_list): Eat empty paths when converting to POSIX.
1596 (cygwin_conv_to_win32_path): Deal with Cygwin's necessity of adding a
1597 '/' to the end of a path ending in '.'.
1599 2006-02-16 Corinna Vinschen <corinna@vinschen.de>
1601 * cygwin.din: Export sigignore and sigset.
1602 * exceptions.cc (sigset): New function.
1603 (sigignore): New function.
1604 * include/cygwin/signal.h (SIG_HOLD): Define.
1605 (sigignore): Declare.
1607 * include/cygwin/version.h: Bump API minor number to 154.
1609 2006-02-13 Igor Peshansky <pechtcha@cs.nyu.edu>
1611 * include/mntent.h: Add missing #include.
1613 2006-02-13 Igor Peshansky <pechtcha@cs.nyu.edu>
1615 * gentls_offsets: Fix typo in error message.
1617 2006-02-10 Christopher Faylor <cgf@timesys.com>
1619 * fhandler_process.cc (format_process_stat): Use cygwin-derived start
1620 time even on NT since it is the logical start time of the "process".
1621 * pinfo.cc (set_myself): Don't set start time when it should have
1622 already been set previously.
1624 2006-02-10 Brian Ford <Brian.Ford@FlightSafety.com>
1626 * times.cc (clock_getres): Use correct conversion from milliseconds to
1627 seconds/nanoseconds.
1628 (clock_setres): Use correct conversion to nanoseconds.
1630 2006-02-10 Christopher Faylor <cgf@timesys.com>
1632 * external.cc (sync_winenv): Rename from "setup_winenv". Use same
1633 mechanism as spawn to determine environment variables which should be
1634 converted back to windows form.
1635 (cygwin_internal): Reflect setup_winenv -> sync_winenv name change.
1636 * include/sys/cygwin.h: Ditto.
1638 2006-02-09 Corinna Vinschen <corinna@vinschen.de>
1640 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Only set
1641 the dirent_get_d_ino flag on filesystems having useful File IDs.
1642 Add comment explaining why.
1644 2006-02-07 Corinna Vinschen <corinna@vinschen.de>
1646 * dtable.cc (handle_to_fn): Accommodate new argument order in call to
1648 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Call sys_wcstombs
1649 instead of just wcstombs to accommodate OEM codepages.
1650 * miscfuncs.cc (sys_wcstombs): Split len argument in source and target
1651 length. Always 0-terminate result in target string.
1652 * security.cc (lsa2wchar): Remove unused function.
1654 (get_lsa_srv_inf): Ditto.
1655 (get_logon_server): Accommodate new argument order in call to
1657 (get_user_groups): Ditto.
1658 (get_user_local_groups): Ditto.
1659 (get_priv_list): Call sys_wcstombs directly instead of lsa2str.
1660 * uinfo.cc (cygheap_user::ontherange): Accommodate new argument order
1661 in call to sys_wcstombs.
1662 * winsup.h (sys_wcstombs): Change prototype to match new argument order.
1664 2006-02-07 Corinna Vinschen <corinna@vinschen.de>
1666 * init.cc (respawn_wow64_process): Exit with the exit code returned
1667 by the respawned process.
1669 2006-02-06 Christopher Faylor <cgf@timesys.com>
1671 Always zero all elements of siginfo_t throughout.
1672 * cygtls.h (_cygtls::thread_context): Declare new field.
1673 (_cygtls::thread_id): Ditto.
1674 (_cygtls::signal_exit): Move into this class.
1675 (_cygtls::copy_context): Declare new function.
1676 (_cygtls::signal_debugger): Ditto.
1677 * cygtls.cc (_cygtls::init_thread): Fill out thread id field.
1678 * exceptions.cc (exception): Change message when exception info is
1679 unknown. Copy context to thread local storage.
1680 (_cygtls::handle_exceptions): Avoid double test for fault_guarded.
1681 Reflect move of signal_exit to _cygtls class.
1682 (sigpacket::process): Copy context to thread local storage.
1683 (_cygtls::signal_exit): Move to _cygtls class. Call signal_debugger to
1684 notify debugger of exiting signal (WIP). Call stackdump here (WIP).
1685 (_cygtls::copy_context): Define new function.
1686 (_cygtls::signal_debugger): Ditto.
1687 * tlsoffsets.h: Regenerate.
1688 * include/cygwin.h (_fpstate): New internal structure.
1689 (ucontext): Declare new structure (WIP).
1690 (__COPY_CONTEXT_SIZE): New define.
1692 * exceptions.cc (_cygtls::interrupt_setup): Clear "threadkill" field
1693 when there is no sigwaiting thread.
1694 (setup_handler): Move event handling into interrupt_setup.
1696 2006-02-06 Corinna Vinschen <corinna@vinschen.de>
1698 * fhandler_socket.cc (fhandler_socket::connect): Fix formatting.
1699 (fhandler_socket::wait): Handle SA_RESTART when signal arrives.
1701 2006-02-06 Corinna Vinschen <corinna@vinschen.de>
1703 * include/cygwin/socket.h (CMSG_FIRSTHDR): Avoid compiler warning.
1705 2006-02-05 Corinna Vinschen <corinna@vinschen.de>
1707 * include/features.h: Add comment to explain what's going to happen
1709 * include/sys/stdio.h: Guard getline and getdelim prototypes with
1710 _GNU_SOURCE to avoid collision with old-style declarations.
1712 2006-02-05 Corinna Vinschen <corinna@vinschen.de>
1714 * environ.cc (struct parse_thing): Add transparent_exe option.
1715 * fhandler_disk_file.cc (fhandler_disk_file::link): Accommodate
1716 transparent_exe option. Add .exe suffix for links to executable files,
1717 if transparent_exe is set.
1718 * fhandler_process.cc (fhandler_process::fill_filebuf): Remove .exe
1719 suffix if transparent_exe option is set.
1720 * path.cc (symlink_worker): Accommodate transparent_exe option.
1721 (realpath): Don't tack on .exe suffix if transparent_exe is set.
1722 * syscalls.cc (transparent_exe): New global variable.
1723 (unlink): Accommodate transparent_exe option.
1726 (rename): Ditto. Maybe add .exe suffix when renaming executable files.
1727 (pathconf): Accommodate transparent_exe option.
1728 * winsup.h: Declare transparent_exe.
1730 2006-02-05 Christopher Faylor <cgf@timesys.com>
1731 Corinna Vinschen <corinna@vinschen.de>
1733 * fhandler_disk_file.cc (fhandler_disk_file::readdir_9x): Remove
1736 2006-02-05 Corinna Vinschen <corinna@vinschen.de>
1738 * fhandler_disk_file.cc (fhandler_disk_file::rewinddir): Remove label
1739 "out". Move test for NULL __handle ...
1740 (fhandler_disk_file::rewinddir_9x): ... here.
1742 2006-02-05 Corinna Vinschen <corinna@vinschen.de>
1744 * dir.cc (rewinddir): Keep dirent_get_d_ino and dirent_set_d_ino flags.
1746 2006-02-05 Christopher Faylor <cgf@timesys.com>
1748 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Don't close dir
1749 handle when we hit EOF since rewwindir may reactivate it.
1750 (fhandler_disk_file::readdir_9x): Eliminate superfluous temporary
1752 (fhandler_disk_file::closedir): Return EBADF when trying to close
1753 unopened DIR. Reorganize slightly. Return actual derived error value
1754 rather than always returning 0.
1756 2006-02-04 Christopher Faylor <cgf@timesys.com>
1758 * dir.cc (rmdir): Reorganize check for trailing dot to return correct
1759 error when directory does not exist.
1761 2006-02-03 Christopher Faylor <cgf@timesys.com>
1763 * dir.cc (mkdir): Reorganize check for trailing dot to return correct
1764 error when directory exists.
1765 * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Remove special
1766 test for path ending in '.'.
1768 2006-02-03 Corinna Vinschen <corinna@vinschen.de>
1770 * path.cc (suffix_scan::lnk_match): Return true beginning with
1772 (suffix_scan::next): Rearrange code to make .lnk append order slightly
1774 * spawn.cc (exe_suffixes): Try no suffix before .exe suffix to align
1775 evaluation with stat_suffixes.
1776 (dll_suffixes): Ditto.
1778 2006-02-02 Christopher Faylor <cgf@timesys.com>
1780 * cygwin/version.h: Mention CW_SETUP_WINENV in comment for API minor
1783 2006-02-02 Corinna Vinschen <corinna@vinschen.de>
1785 * cygwin.din (updwtmpx): Export.
1786 * syscalls.cc (updwtmpx): New function.
1787 * include/utmpx.h (updwtmpx): Declare.
1788 * include/cygwin/version.h: Bump API minor number to 153.
1790 2006-02-02 Christopher Faylor <cgf@timesys.com>
1792 * external.cc (setup_winenv): New function.
1793 (cygwin_internal): Implement CW_SETUP_WINENV.
1794 * sys/cygwin.h (cygwin_getinfo_types): Define CW_SETUP_WINENV.
1796 2006-02-02 Corinna Vinschen <corinna@vinschen.de>
1798 * security.cc (is_group_member): Fix comment.
1800 2006-02-02 Corinna Vinschen <corinna@vinschen.de>
1802 * security.cc (is_group_member): Use local group info type 1. Test
1803 group for being a global group or a well-known SID before adding it
1804 to the group list. Add comment.
1806 2006-02-01 Corinna Vinschen <corinna@vinschen.de>
1808 * autoload.cc (GetTcpTable): Define.
1809 * fhandler_socket.cc (address_in_use): New function to check if
1810 sockaddr_in address is already in use.
1811 (fhandler_socket::bind): Check if address is alreay in use in case of
1812 SO_REUSEADDR, to circumvent WinSock non-standard behaviour.
1814 2006-02-01 Corinna Vinschen <corinna@vinschen.de>
1816 * spawn.cc (dll_suffixes): Add .exe and "no suffix" to the list.
1818 2006-01-31 Corinna Vinschen <corinna@vinschen.de>
1820 * dlfcn.cc (check_path_access): Call find_exec with FE_DLL option.
1821 * path.h (enum fe_types): Add FE_DLL value.
1822 * spawn.cc (std_suffixes): Remove.
1823 (exe_suffixes): New suffix_info for executing files.
1824 (dll_suffixes): New suffix_info for searching shared libraries.
1825 (perhaps_suffix): Add opt argument. Use dll_suffixes if FE_DLL
1826 option is given, exe_suffixes otherwise.
1827 (find_exec): Propagate opt argument to perhaps_suffix. Drop suffix
1828 check when testing execute permission.
1829 (spawn_guts): Call perhaps_suffix with FE_NADA opt argument.
1831 2006-01-31 Christopher Faylor <cgf@timesys.com>
1833 * spawn.cc (av::fixup): Remove unused argument.
1834 (spawn_guts): Remove capitalization in debugging.
1836 2006-01-31 Corinna Vinschen <corinna@vinschen.de>
1838 * spawn.cc (find_exec): Only return files with execute permission set
1839 if ntsec is on. Don't check execute permission of Windows batch files.
1840 (av::fixup): Handle empty files gracefully. Drop execute permission
1842 * path.cc (suffix_scan::next): Don't skip any suffix on first run.
1844 2006-01-31 Corinna Vinschen <corinna@vinschen.de>
1846 * path.cc (cwdstuff::set): Don't set win32 error, only POSIX errno.
1848 2006-01-31 Corinna Vinschen <corinna@vinschen.de>
1850 * path.cc (cwdstuff::set): When SetCurrentDirectory returns
1851 ERROR_INVALID_FUNCTION, bend it over to ERROR_FILE_NOT_FOUND. Add
1852 comment to explain why.
1854 2006-01-31 Corinna Vinschen <corinna@vinschen.de>
1856 * dir.cc (readdir_worker): Add comment about writing old 32 bit d_ino.
1857 * include/cygwin/version.h: Bump API minor number to 152.
1858 (CYGWIN_VERSION_CHECK_FOR_NEEDS_D_INO): Remove.
1860 2006-01-30 Corinna Vinschen <corinna@vinschen.de>
1862 * fhandler_disk_file.cc (fhandler_disk_file::rewinddir): Simplify
1865 2006-01-30 Corinna Vinschen <corinna@vinschen.de>
1867 * fhandler_disk_file.cc (d_cachepos): Rename from d_pos to distinct
1868 clearly from __d_position. Change throughout.
1869 (fhandler_disk_file::rewinddir): Reset readdir cache on NT.
1871 2006-01-29 Corinna Vinschen <corinna@vinschen.de>
1873 * fhandler_disk_file.cc (readdir_get_ino): Don't follow symlinks.
1875 2006-01-29 Corinna Vinschen <corinna@vinschen.de>
1877 * fhandler.h (class fhandler_socket): Add saw_reuseaddr status flag.
1878 * fhandler_socket.cc (fhandler_socket::bind): Set socket to
1879 SO_EXCLUSIVEADDRUSE if application didn't explicitely set SO_REUSEADDR
1880 socket option, on systems supporting SO_EXCLUSIVEADDRUSE.
1881 * net.cc (cygwin_setsockopt): Set fhandler's saw_reuseaddr status flag
1882 if SO_REUSEADDR socket option has been successsfully set.
1883 * wincap.h (wincaps::has_exclusiveaddruse): New element.
1884 * wincap.cc: Implement above element throughout.
1886 2006-01-28 Corinna Vinschen <corinna@vinschen.de>
1888 * fhandler_disk_file.cc (fhandler_disk_file::mkdir): In case or error,
1889 check for existance explicitely and set errno to EEXIST.
1891 2006-01-28 Corinna Vinschen <corinna@vinschen.de>
1893 * fhandler_disk_file.cc (DIR_NUM_ENTRIES): New define determining
1894 minimum number of dir entries which fit into the readdir cache.
1895 (DIR_BUF_SIZE): Define globally as size of readdir cache.
1896 (struct __DIR_cache): New structure used for readdir caching on NT.
1897 (d_dirname): Accessor for struct __DIR_cache, use throughout.
1900 (fhandler_disk_file::opendir): Allocate __d_dirname to contain readdir
1902 (fhandler_disk_file::readdir): Use buf as pointer into readdir cache.
1903 Implement readdir caching.
1905 2006-01-28 Corinna Vinschen <corinna@vinschen.de>
1907 * include/sys/dirent.h (struct dirent): Revert misguided attempt to
1908 rename __d_unused1 to __d_fd.
1910 2006-01-27 Corinna Vinschen <corinna@vinschen.de>
1912 * autoload.cc (NtQueryDirectoryFile): Define.
1913 * dir.cc (__opendir_with_d_ino): Just call opendir.
1914 (opendir): Remove CYGWIN_VERSION_CHECK_FOR_NEEDS_D_INO handling.
1915 (readdir_worker): Only try generating d_ino if it's 0.
1916 Utilize namehash of directories fhandler. Call readdir_get_ino to
1917 generate d_ino for "..".
1918 (seekdir64): Keep dirent_set_d_ino flag.
1919 * fhandler.h (enum dirent_states): Add dirent_get_d_ino.
1920 (class fhandler_disk_file): Declare new private methods readdir_helper
1922 * fhandler_disk_file.cc (path_conv::hasgood_inode): New method to
1923 evaluate if a filesystem has reliable inode numbers.
1924 (fhandler_base::fstat_by_handle): Accommodate structure member name
1925 change from IndexNumber to FileId.
1926 (fhandler_base::fstat_helper): Call hasgood_inode here.
1927 (fhandler_disk_file::opendir): Call fhaccess only for real files.
1928 Don't append '*' to __d_dirname here, move to readdir_9x. On NT,
1929 open directory handle here. Set dirent_get_d_ino and dirent_set_d_ino
1930 flags according to wincap and filesystem.
1931 (fhandler_disk_file::readdir_helper): New method to implement readdir
1932 postprocessing only once.
1933 (readdir_get_ino_by_handle): New static function.
1934 (readdir_get_ino): New function to centralize inode number evaluation
1935 in case inode number hasn't been returned by NtQueryDirectoryFile.
1936 (fhandler_disk_file::readdir): Move old functionality to readdir_9x.
1937 Call readdir_9x when on 9x/Me. Implement NT specific readdir here.
1938 (fhandler_disk_file::readdir_9x): Move 9x specific readdir here.
1939 (fhandler_disk_file::seekdir): Accommodate new NT readdir method.
1940 (fhandler_disk_file::closedir): Ditto.
1941 (fhandler_cygdrive::fstat): Set d_ino to namehash. Add comment.
1942 (fhandler_cygdrive::opendir): Call get_namehash to prepare later
1943 correct evaluation of d_ino.
1944 (fhandler_cygdrive::readdir): Replace recursion with loop. Evaluate
1945 drive's d_ino by calling readdir_get_ino.
1946 * fhandler_proc.cc (fhandler_proc::readdir): Set dirent_saw_dot and
1947 dirent_saw_dot_dot to avoid seeing . and .. entries twice.
1948 * fhandler_process.cc (fhandler_process::readdir): Ditto.
1949 * fhandler_registry.cc (fhandler_registry::readdir): Ditto.
1950 * ntdll.h (STATUS_INVALID_PARAMETER): New define.
1951 (STATUS_INVALID_LEVEL): New define.
1952 (struct _FILE_INTERNAL_INFORMATION): Rename member IndexNumber to
1953 FileId (as in Nebbitt).
1954 * path.h (path_conv::hasgood_inode): Now implemented in
1955 fhandler_disk_file.cc.
1956 * wincap.h (wincaps::has_fileid_dirinfo): New element.
1957 * wincap.cc: Implement above element throughout.
1958 * winsup.h (readdir_get_ino): Add declaration.
1959 * include/sys/dirent.h (struct dirent): Slightly rename structure
1960 members to accommodate changes.
1961 Remove __USE_EXPENSIVE_CYGWIN_D_INO handling and declaration of
1962 __opendir_with_d_ino.
1964 2006-01-27 Christopher Faylor <cgf@timesys.com>
1966 * spawn.cc (spawn_guts): Fix potential handle leak when failing exec.
1968 2006-01-27 Christopher Faylor <cgf@timesys.com>
1970 * exceptions.cc (inside_kernel): Fix to return true if we can't get the
1971 name of the DLL for the given memory block since we are not in kernel
1974 2006-01-26 Corinna Vinschen <corinna@vinschen.de>
1976 * fhandler.cc (fhandler_base::open): Fix bug in argument order to
1977 InitializeObjectAttributes call.
1979 2006-01-25 Corinna Vinschen <corinna@vinschen.de>
1981 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix test for
1982 dirent_isroot to use the correct boolean operator.
1984 2006-01-25 Christopher Faylor <cgf@timesys.com>
1986 * ntdll.h: (temporarily?) Add more functions for querying directory.
1988 2006-01-24 Christopher Faylor <cgf@timesys.com>
1990 * dir.cc (readdir_worker): Turn off expensive inode calculation.
1992 2006-01-24 Corinna Vinschen <corinna@vinschen.de>
1994 * fhandler_process.cc (fhandler_process::fill_filebuf): Disable
1995 stripping the .exe suffix from the link target in PROCESS_EXE and
1996 PROCESS_EXENAME case.
1997 * path.cc (realpath): Tack on .exe suffix if necessary.
1999 2006-01-24 Corinna Vinschen <corinna@vinschen.de>
2001 * fhandler_disk_file.cc (fhandler_base::fstat_helper): Try harder
2002 to determine remote file systems with reliable inode numbers. Add
2005 2006-01-23 Corinna Vinschen <corinna@vinschen.de>
2007 * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Reset
2008 inheritance for duplicated socket.
2010 2006-01-20 Christopher Faylor <cgf@timesys.com>
2012 * include/cygwin/version.h: Bump API minor number to 151.
2013 * dir.cc (__opendir_with_d_ino): New function.
2014 (opendir): Set flag if we should be calculating inodes.
2015 (readdir_worker): Calculate d_ino by calling stat if the user has asked
2017 (seekdir64): Maintain all persistent flag settings.
2018 * fhandler.h (dirent_states): Add dirent_set_d_ino.
2019 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Reflect changes
2020 to dirent structure.
2021 * fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
2022 * include/sys/dirent.h (struct dirent): Coalesce two similar
2023 structures. Remove all shreds of the apparently highly confusing
2024 references to inodes. Add support for calculating a real inode if
2025 __USE_EXPENSIVE_CYGWIN_D_INO is defined.
2027 2006-01-20 Christopher Faylor <cgf@timesys.com>
2029 * include/sys/dirent.h: Add comments for people who are REALLY confused
2030 about whether they should be using something called __invalid_d_ino or
2033 2006-01-20 Corinna Vinschen <corinna@vinschen.de>
2035 * fhandler_socket.cc (fhandler_socket::prepare): Fix debug output.
2036 (fhandler_socket::release): Add debug output for WSAEventSelect failure.
2037 (fhandler_socket::ioctl): Always cancel WSAEventSelect before switching
2038 to blocking mode. Only set nonblocking flag if ioctlsocket call
2039 succeeded. Only print new socket state if ioctlsocket call succeeded.
2041 2006-01-19 Christopher Faylor <cgf@timesys.com>
2043 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Check posix path
2044 for root rather than windows path.
2046 2006-01-19 Christopher Faylor <cgf@timesys.com>
2048 * dir.cc (readdir_worker): Fill in invalid fields with -1. Accommodate
2049 name change from __ino32 to __invalid_ino32.
2050 * include/sys/dirent.h (__invalid_ino32): Rename from __ino32. Don't
2051 define unused d_type macros.
2053 2006-01-18 Christopher Faylor <cgf@timesys.com>
2055 * heap.cc (heap_init): Remove Sleep.
2057 2006-01-18 Corinna Vinschen <corinna@vinschen.de>
2059 * net.cc (rresvport): Remove extern declaration.
2061 2006-01-18 Corinna Vinschen <corinna@vinschen.de>
2063 * autoload.cc (rresvport): Remove.
2064 * net.cc (last_used_rrecvport): New global shared variable.
2065 (cygwin_rresvport): Implement rresvport without using rresvport from
2068 2006-01-18 Corinna Vinschen <corinna@vinschen.de>
2070 * include/cygwin/socket.h (struct sockaddr_storage): Fix typo in
2071 ss_family member name.
2073 2006-01-16 Christopher Faylor <cgf@timesys.com>
2075 * include/cygwin/version.h: Bump DLL minor version number to 20.
2077 2006-01-13 Corinna Vinschen <corinna@vinschen.de>
2079 * uname.cc (uname): Concatenate a "-WOW64" to utsname's sysname
2080 member to see when running under WOW64.
2082 2006-01-13 Corinna Vinschen <corinna@vinschen.de>
2084 * net.cc (cygwin_setsockopt): Ignore errors when setting IP_TOS on
2085 Windows 2000 and above. Clarify the comment about IP_TOS and move
2086 to the place where the magic happens.
2087 (get_ifconf): Remove unused code.
2088 * wincap.h (wincaps::has_disabled_user_tos_setting): New element.
2089 * wincap.cc: Implement above element throughout.
2091 2006-01-12 Christopher Faylor <cgf@timesys.com>
2093 * fhandler_console.cc (set_console_state_for_spawn): Fix to recognize
2096 2006-01-12 Christopher Faylor <cgf@timesys.com>
2098 * fhandler.h (set_console_state_for_spawn): Whackamole the argument
2100 * spawn.cc (spawn_guts): Ditto, i.e., once again call
2101 set_console_state_for_spawn with an indication of whether we're about
2102 to start a cygwin process.
2103 * fhandler_console.cc (set_console_state_for_spawn): Don't set the
2104 console state if we know we're starting a cygwin process or if we're
2107 2006-01-10 Corinna Vinschen <corinna@vinschen.de>
2109 * dcrt0.cc (dll_crt0_0): Remove call to wincap.init.
2110 * init.cc (dll_entry): Rename is_wow64_proc to wow64_test_stack_marker.
2111 Call wincap.init here before doing anything else. Use wincap.is_wow64
2112 to determine if we're running in a WOW64 emulator.
2113 * mmap.cc (MapViewNT): Don't use AT_ROUND_TO_PAGE in WOW64, it's
2114 apparently not supported.
2115 (mmap64): Don't create mappings beyond EOF, which would need to use
2116 AT_ROUND_TO_PAGE, on WOW64.
2117 * wincap.cc (wincap): Throw into the .cygwin_dll_common section.
2118 (wincapc::init): Determine if running in WOW64 and set wow_64 flag.
2119 * wincap.h (class wincapc): Add wow64 member.
2120 (wincapc::is_wow64): New method.
2122 2006-01-10 Christopher Faylor <cgf@timesys.com>
2124 * fhandler_proc.cc (format_proc_cpuinfo): Avoid leading whitespace in
2127 2006-01-09 Christopher Faylor <cgf@timesys.com>
2129 * spawn.cc (spawn_guts): Reorganize slightly so that 16 bit check is
2130 done prior to check for command.com/cmd.com. Don't bother setting
2131 CREATE_SUSPENDED flag for a MS-DOS process since it doesn't work
2132 anyway. Avoid calling remember() when the child process has already
2134 (av::fixup): Explicitly set cygexec flag to false on a 16 bit process.
2136 2006-01-09 Corinna Vinschen <corinna@vinschen.de>
2138 * include/getopt.h (getopt_long_only): Declare.
2140 2006-01-09 Eric Blake <ebb9@byu.net>
2142 * cygwin.din: Export getsubopt.
2143 * include/cygwin/version.h: Bump API minor version.
2145 2006-01-08 Christopher Faylor <cgf@timesys.com>
2147 * fhandler_tty.cc (fhandler_tty_slave::dup): Don't assign a controlling
2148 terminal to a process when duped. Linux doesn't do this, so we won't
2151 2006-01-08 Christopher Faylor <cgf@timesys.com>
2153 * environ.cc (spenvs[]): windir -> WINDIR.
2155 2006-01-07 Christopher Faylor <cgf@timesys.com>
2157 * fhandler_console.cc (fhandler_console::need_invisible): Remove
2160 2006-01-07 Christopher Faylor <cgf@timesys.com>
2162 * fhandler.h (set_console_state_for_spawn): Eliminate argument from
2164 * fhandler.cc (set_console_state_for_spawn): Eliminate argument from
2165 definition. Always check for invisible console.
2166 (fhandler_console::need_invisible): Don't do anything if the windows
2167 station is already not visible.
2168 * spawn.cc (spawn_guts): Accommodate change of argument to
2169 set_console_state_for_spawn.
2171 2006-01-05 Christopher Faylor <cgf@timesys.com>
2173 * sigproc.cc (no_signals_available): Use existence of signal thread
2174 handle to figure out if we can actually send signals rather than
2175 relying on my_sendsig.
2176 (hwait_sig): Make static.
2177 (sigproc_init): Don't set my_sendsig to anything special. Use new
2178 global static hwait_sig.
2179 (wait_sig): Set hwait_sig to NULL when we are exiting.
2181 2006-01-05 Christopher Faylor <cgf@timesys.com>
2183 * include/getopt.h: Accommodate recent unfortunate newlib changes.
2185 2006-01-05 Christopher Faylor <cgf@timesys.com>
2187 * cygtls.cc (_cygtls::remove): Don't output debugging info if this
2188 isn't a cygwin thread.
2189 * sigproc.cc (sigproc_init): Move clearing of sync_startup here to
2190 lessen the likelihood of trying to deal with non-cygwin threads in
2193 * fhandler_console: Fix set_console_state_for_spawn comment.
2195 2006-01-05 Igor Peshansky <pechtcha@cs.nyu.edu>
2197 * spawn.cc (spawn_guts): Invert the argument to
2198 set_console_state_for_spawn.
2200 2006-01-04 Christopher Faylor <cgf@timesys.com>
2202 * fhandler_console.cc (fhandler_console::need_invisible): Only try to
2203 open "CygwinInvisible" windows station if opening of default station
2204 fails. Use CloseWindowStation to close window station handle.
2206 2006-01-04 Christopher Faylor <cgf@timesys.com>
2208 * fhandler_console.cc (fhandler_console::need_invisible): Open up the
2209 security of the newly created windows station.
2211 2006-01-04 Eric Blake <ebb9@byu.net>
2213 * path.cc (dot_special_chars): Add ", <, >, and |.
2215 2006-01-03 Christopher Faylor <cgf@timesys.com>
2217 * fhandler_console.cc (beep): Use MB_OK which is documented as using
2218 the default bell rather than -1 which seems to behave differently on
2219 different versions of Windows.
2221 2006-01-03 Christopher Faylor <cgf@timesys.com>
2223 * fhandler_process.cc (fhandler_process::readdir): Add missing argument
2226 * fhandler_console.cc (fhandler_console::need_invisible): Use made-up
2227 name for windows station rather than asking Windows to create one for
2230 * spawn.cc (spawn_guts): Don't mess with console if we're detaching.
2232 2006-01-03 Christopher Faylor <cgf@timesys.com>
2234 * dir.cc (readdir_worker): Minor code cleanup.
2236 * fhandler_console.cc (beep): Use a more Windows-generic wav file if
2237 the beep is missing. Use a more foolproof way to find out whether we
2238 should be recreating the missing key.
2240 * registry.h (reg_key::_disposition): New field.
2241 (reg_key::created): New function.
2242 * registry.cc (reg_key::reg_key): Set _disposition to zero by default.
2243 (reg_key::build_key): Fill in _disposition field.
2245 2006-01-03 Eric Blake <ebb9@byu.net>
2247 * dir.cc (readdir_worker): Ensure that saw_dot* flags are updated when
2248 not handling inodes.
2250 2006-01-02 Christopher Faylor <cgf@timesys.com>
2252 * fhandler_console.cc (beep): New function. Restores missing "Default
2253 Beep", if necessary.
2254 (fhandler_console::write_normal): Use beep().
2256 2006-01-02 Christopher Faylor <cgf@timesys.com>
2258 * dcrt0.cc (_dll_crt0): Remove more leftover debugging stuff.
2259 (cygwin_dll_init): Remove unneeded initializations. Call _dll_crt0
2260 rather than dll_crt0_1.
2262 2006-01-02 Corinna Vinschen <corinna@vinschen.de>
2264 * syslog.cc: Include sys/un.h instead of sys/socket.h.
2265 (syslogd_inited): Convert to enum type noting the exact result of
2266 trying to connect to syslog daemon. Use this way throughout.
2267 (connect_syslogd): New static function taking over the task to
2268 connect to syslog socket. Use correct struct sockaddr_un instead of
2270 (try_connect_syslogd): Call connect_syslogd. If write fails on
2271 connection oriented socket, try to reconnect to syslog socket and
2274 2006-01-01 Christopher Faylor <cgf@timesys.com>
2276 * pinfo.cc (pinfo::exit): Swap signal and normal exit value when not
2277 started from a cygwin process - just like the good-old-days of B20.
2279 2006-01-01 Christopher Faylor <cgf@timesys.com>
2281 * strace.cc (strace::write_childpid): Remove debugging output.
2283 2006-01-01 Christopher Faylor <cgf@timesys.com>
2285 * cygtls.cc (_cygtls::remove): Remove left over debugging cruft which
2286 caused this function to always return prematurely.
2288 2006-01-01 Christopher Faylor <cgf@timesys.com>
2290 * exceptions.cc (sigpacket::process): Pass actual reference to signal's
2291 sigaction structure to setup_handler.
2293 2006-01-01 Christopher Faylor <cgf@timesys.com>
2295 * exceptions.cc (_cygtls::interrupt_setup): Implement SA_RESETHAND.
2296 * include/cygwin/signal.h: Define SA_ONESHOT and SA_NOMASK.
2298 * dcrt0.cc (get_cygwin_startup_info): Remove commented out code.
2300 2006-01-01 Corinna Vinschen <corinna@vinschen.de>
2302 * syslog.cc (vklog): Never log kernel messages using the vsyslog