OSDN Git Service

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