OSDN Git Service

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