1 2006-08-09 Corinna Vinschen <corinna@vinschen.de>
3 * path.h (SYMLINK_EA_NAME): Remove.
4 (SHORTCUT_HDR_SIZE): Ditto.
6 2006-08-09 Christopher Faylor <cgf@timesys.com>
8 * autoload.cc (GetHandleInformation): Declare new function.
9 (SetHandleInformation): Ditto.
10 * debug.cc (add_handle): Use SetHandleInformation to protect handle.
11 (close_handle): Use SetHandleInformation to unprotect handle.
13 * spawn.cc (spawn_guts): Move detached test outside of P_OVERLAY block.
15 2006-08-07 Corinna Vinschen <corinna@vinschen.de>
17 * autoload.cc (NtSetInformationFile): Define.
18 * cygwin.din: Export posix_fadvise and posix_fallocate.
19 * fhandler.cc (fhandler_base::fadvise): New method.
20 (fhandler_base::ftruncate): Add allow_truncate parameter.
21 * fhandler.h (class fhandler_base): Add fadvise method. Accomodate
22 new parameter to ftruncate.
23 (class fhandler_pipe): Add fadvise and ftruncate methods.
24 (class fhandler_disk_file): Add fadvise method. Accomodate new
25 parameter to ftruncate.
26 * fhandler_disk_file.cc (fhandler_disk_file::fadvise): New method.
27 (fhandler_disk_file::ftruncate): Accomodate new allow_truncate
28 parameter. Set EOF using NtSetInformationFile on NT.
29 * ntdll.h (struct _FILE_END_OF_FILE_INFORMATION): Define.
30 (NtSetInformationFile): Declare.
31 * pipe.cc (fhandler_pipe::fadvise): New method.
32 (fhandler_pipe::ftruncate): Ditto.
33 * syscalls.cc (posix_fadvise): New function.
34 (posix_fallocate): Ditto.
35 (ftruncate64): Accomodate second parameter to fhandler's ftruncate
37 * include/fcntl.h: Add POSIX_FADV_* flags. Add declarations of
38 posix_fadvise and posix_fallocate.
39 * include/cygwin/version.h: Bump API minor number.
41 2006-08-02 Christopher Faylor <cgf@timesys.com>
43 * environ.cc (env_win32_to_posix_path_list): Declare.
44 (conv_envvars): Use env_win32_to_posix_path_list rather than
45 cygwin_win32_to_posix_path_list.
46 (posify): Translate back to win32 path if errno is EIDRM.
47 * environ.h: Update copyright. Define ENV_CVT.
48 * path.cc (conv_path_list): If converting for the environment and
49 removed an element set errno to ENV_CVT.
50 (env_win32_to_posix_path_list): New function.
52 2006-08-01 Christopher Faylor <cgf@timesys.com>
54 * environ.cc (dos_file_warning): Declare.
55 (parse_thing): Add "dosfilewarning". Alphabetize.
56 * path.cc (normalize_posix_path): Return -1 when MS-DOS path detected.
57 (warn_msdos): New function.
58 (path_conv::check): Call if !PC_NOWARN and MS-DOS path detected.
59 (cygwin_conv_to_win32_path): Set PC_NOWARN when calling path_conv.
60 (cygwin_conv_to_full_win32_path): Ditto.
61 * path.h (pathconv_arg::PC_NOWARN): Define.
62 * shared_info.h (user_info::warned_msdos): New field.
63 (CURR_USER_MAGIC): Reset.
65 2006-07-31 Corinna Vinschen <corinna@vinschen.de>
67 * fhandler_socket.cc (fhandler_socket::recv_internal): Fix a problem
68 with poll(2) after shutdown(SHUT_RD) has been called on the local side.
69 * poll.cc (poll): Use POSIX type nfds_t for second parameter. Drop
70 special socket handling for POLLIN. Add comment to explain why.
71 * include/sys/poll.h: Declare nfds_t. Use as type for second parameter
72 in poll(2) declaration.
74 2006-07-31 Corinna Vinschen <corinna@vinschen.de>
76 * fhandler_socket.cc (fhandler_socket::evaluate_events): Circumvent
77 potential race condition.
78 (fhandler_socket::recv_internal): Fix MSG_PEEK bug on blocking sockets
79 and simplify recv loop.
80 (fhandler_socket::send_internal): Only lock when changing wsock_events.
82 2006-07-31 Corinna Vinschen <corinna@vinschen.de>
84 * autoload.cc: Drop LoadDLLprime for wsock32 since no wsock32 function
85 is used anymore. Drop all unused ws2_32.dll functions.
87 2006-07-28 Corinna Vinschen <corinna@vinschen.de>
89 * fhandler.h (struct wsa_event): Define here.
90 (class fhandler_socket): Make wsock_evt private again.
91 (fhandler_socket::wsock_event): New read accessor for wsock_evt.
92 (fhandler_socket::serial_number): New read accessor to get the
93 socket's serial number.
94 (fhandler_socket::ready_for_read): Just return true.
95 * fhandler_socket.cc (struct wsa_event): Move definition to fhandler.h.
96 * select.cc (struct socketinf): Add serial number vector.
97 (start_thread_socket): Identify duplicate sockets by their serial
98 number, not (wrongly) by their wsock_evt.
100 2006-07-27 Corinna Vinschen <corinna@vinschen.de>
102 * fhandler_socket.cc: Revert misguided attempt to handle FD_CLOSE error
103 conditions in evaluate_events.
104 (search_wsa_event_slot): Move wrongly placed memset in
105 fhandler_socket::init_events here.
106 (fhandler_socket::init_events): Initially set FD_WRITE event for
107 connectionless sockets.
108 * poll.cc (poll): Don't add sockets always to except_fds since select
109 is now supposed to do it right.
110 * select.cc (set_bits): Set connection state correctly for failed
111 af_local_connect on local sockets. Remove socket special handling
112 for except_selected descriptors.
113 (peek_socket): Try to set the read/write/exception bits actually
116 2006-07-27 Brian Ford <Brian.Ford@FlightSafety.com>
118 * fhandler_socket.cc (fhandler_socket::recvmsg): Remove unused tot
119 argument. All callers changed.
120 (fhandler_socket::sendmsg): Likewise.
121 * net.cc (cygwin_recvmsg): Likewise.
122 (cygwin_sendmsg): Likewise, and prevent calling sendmsg whith an
124 * fhandler.h (fhandler_socket::recvmsg): Adjust prototype.
125 (fhandler_socket::sendmsg): Likewise.
127 2006-07-27 Corinna Vinschen <corinna@vinschen.de>
129 * fhandler.h (class fhandler_socket): Remove prot_info_ptr.
130 (fhandler_socket::fixup_before_fork_exec): Remove.
131 (fhandler_socket::fixup_after_exec): Remove.
132 (fhandler_socket::need_fixup_before): Remove.
133 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Drop
134 initializing prot_info_ptr. Remove unused code.
135 (fhandler_socket::~fhandler_socket): Drop free'ing prot_info_ptr.
136 (struct wsa_event): Rename connect_errorcode to errorcode.
137 (fhandler_socket::evaluate_events): Handle FD_CLOSE error condition
138 as FD_CONNECT error condition, except, never reset an FD_CLOSE error
139 condition. Always set FD_WRITE after successfully recorded FD_CONNECT.
140 (fhandler_socket::fixup_before_fork_exec): Remove.
141 (fhandler_socket::fixup_after_fork): Revert to using handle duplication.
142 (fhandler_socket::fixup_after_exec): Remove.
143 (fhandler_socket::dup): Revert to using handle duplication.
144 (fhandler_socket::send_internal): Only call wait_for_events in case
145 of WSAEWOULDBLOCK condition.
146 (fhandler_socket::set_close_on_exec): Call
147 fhandler_base::set_close_on_exec.
148 * net.cc (fdsock): Just set socket to inheritable on non-NT. Don't
149 call inc_need_fixup_before.
150 * select.cc (peek_socket): Don't set except_ready on every FD_CLOSE,
153 2006-07-26 Brian ford <Brian.Ford@FlightSafety.com>
155 * fhandler.cc (fhandler_base::read): Call get_readahead_into_buffer
156 instead of duplicating it.
158 2006-07-26 Corinna Vinschen <corinna@vinschen.de>
160 * shared.cc (offsets): Define as offsets relative to cygwin_hmodule
161 instead of addresses.
162 (off_addr): New macro.
163 (open_shared): Use offsets array accordingly. Remove unused code.
164 * shared_info.h (cygwin_shared_address): Remove.
166 2006-07-26 Corinna Vinschen <corinna@vinschen.de>
168 * cygheap.h (struct init_cygheap): Remove shared_h and mt_h members.
169 * fhandler_tape.cc (mt): Define as DLL shared area in
170 .cygwin_dll_common instead of as dynamically allocated area.
171 Change referencing throughout.
172 * mtinfo.h (mt_h): Remove entirely.
173 (mt): Remove extern declaration.
174 * shared.cc (cygwin_shared_area): New global cygwin_shared
175 variable located in .cygwin_dll_common.
176 (offsets): Define shared region addresses descending from
177 cygwin_shared_address.
178 (open_shared): Replace usage of SH_CYGWIN_SHARED by SH_USER_SHARED.
179 (memory_init): Set cygwin_shared just by pointing to cygwin_shared_area.
180 * shared_info.h (shared_locations): Remove SH_CYGWIN_SHARED and
182 (cygwin_shared_address): Define as DLL start address.
183 * tty.h (tty_min::tty_min): Remove constructor.
185 2006-07-25 Corinna Vinschen <corinna@vinschen.de>
187 * include/cygwin/in6.h: Guard in_port_t typedef more restrictive to
188 avoid compiler warning.
190 2006-07-25 Christopher Faylor <cgf@timesys.com>
192 * security.cc (get_logon_server): Remove nret and use dret for
193 everything to avoid a g++ warning.
195 2006-07-25 Corinna Vinschen <corinna@vinschen.de>
197 * include/cygwin/version.h: Bump DLL version to 1.7.0.
199 2006-07-25 Corinna Vinschen <corinna@vinschen.de>
202 * fhandler_socket.cc: Don't include select.h.
205 2006-07-25 Corinna Vinschen <corinna@vinschen.de>
207 * cygtls.h: Drop socket related includes.
208 (struct _local_storage): Remove exitsock and exitsock_sin. Add
210 * cygtls.cc: Accomodate above change throughout.
211 * fhandler.h (class fhandler_socket): Make wsock_evt public.
212 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Accomodate
214 (fhandler_socket::evaluate_events): Drop FD_CONNECT event as soon as
215 it gets read once. Never remove FD_WRITE event here.
216 (fhandler_socket::wait_for_events): Wait 50 ms instead of INFINITE for
218 (fhandler_socket::accept): Fix conditional. Set wsock_events members
219 of accepted socket to useful start values.
220 (fhandler_socket::recv_internal): Always drop FD_READ/FD_OOB events from
221 wsock_events after the call to WSARecvFrom.
222 (fhandler_socket::send_internal): Drop FD_WRITE event from wsock_events
223 if the call to WSASendTo fails with WSAEWOULDBLOCK. Fix return value
225 * select.cc (struct socketinf): Change to accomodate using socket event
227 (peek_socket): Use event handling for peeking socket.
228 (thread_socket): Ditto.
229 (start_thread_socket): Ditto.
230 (socket_cleanup): Same here.
231 * tlsoffsets.h: Regenerate.
233 2006-07-23 Christopher Faylor <cgf@timesys.com>
235 * include/cygwin/version.h: Bump DLL minor version number to 22.
237 2006-07-20 Corinna Vinschen <corinna@vinschen.de>
239 * fhandler.h (class fhandler_socket): Rearrange slightly to keep
240 event handling methods and members together. Drop owner status flag.
241 Split wait method. Rename event handling methods for readability.
242 * fhandler_socket.cc (struct wsa_event): Add owner field.
243 (LOCK_EVENTS): New macro.
244 (UNLOCK_EVENTS): Ditto.
245 (fhandler_socket::init_events): rename from prepare.
246 (fhandler_socket::evaluate_events): First half of former wait method.
247 Do everything but wait. Allow specifiying whether or not events from
248 event_mask should be erased from wsock_events->events. Simplify
249 OOB handling. Allow sending SIGURG to any process (group).
250 (fhandler_socket::wait_for_events): Second half of former wait method.
251 Call evaluate_events and wait in a loop if socket is blocking.
252 (fhandler_socket::release_events): Rename from release.
253 (fhandler_socket::connect): Accomodate above name changes.
254 (fhandler_socket::accept): Ditto.
255 (fhandler_socket::recv_internal): Ditto.
256 (fhandler_socket::send_internal): Ditto.
257 (fhandler_socket::close): Ditto.
258 (fhandler_socket::fcntl): Always set owner to given input value on
259 F_SETOWN. Handle F_GETOWN.
260 * net.cc (fdsock): Accomodate above name changes.
262 2006-07-20 Corinna Vinschen <corinna@vinschen.de>
264 * fhandler_socket.cc (fhandler_socket::wait): Set Winsock errno to
265 WSAEWOULDBLOCK instead of WSAEINPROGRESS.
267 2006-07-19 Corinna Vinschen <corinna@vinschen.de>
269 * pinfo.cc (commune_process): Don't add extra \0 to cmdline.
270 (_pinfo::cmdline): Ditto process internal.
272 2006-07-19 Corinna Vinschen <corinna@vinschen.de>
274 * mmap.cc (msync): Disable rounding up len. Fix bug in access check
277 2006-07-19 Corinna Vinschen <corinna@vinschen.de>
279 * path.cc (symlink_worker): Return EEXIST if newpath exists.
281 2006-07-18 Christopher Faylor <cgf@timesys.com>
283 * tty.cc (tty_list::terminate): Don't enter the busy loop if we don't
286 2006-07-18 Silvio Laguzzi <slaguzzi@data-al.de>
288 * sec_acl.cc (acltotext32): Add missing handling of default ACL entry
291 2006-07-18 Brian Ford <Brian.Ford@FlightSafety.com>
292 Corinna Vinschen <corinna@vinschen.de>
294 * winsup.h (mmap_region_status): New enum.
295 (mmap_is_attached_or_noreserve_page): Adjust prototype and rename
297 * mmap.cc (mmap_is_attached_or_noreserve_page): Rename
298 mmap_is_attached_or_noreserve. Add region length parameter.
300 * exceptions.cc (_cygtls::handle_exceptions): Accomodate above.
301 * fhandler.cc (fhandler_base::raw_read): Call above for NOACCESS
302 errors and retry on success to allow reads into untouched
303 MAP_NORESERVE buffers.
305 2006-07-18 Corinna Vinschen <corinna@vinschen.de>
307 * fhandler_floppy.cc (fhandler_dev_floppy::ioctl): Fix typo in lint
310 2006-07-18 Corinna Vinschen <corinna@vinschen.de>
312 * cygwin.din (posix_openpt): Export.
313 * tty.cc (posix_openpt): New function.
314 * include/cygwin/stdlib.h (posix_openpt): Declare.
315 * include/cygwin/version.h: Bump API minor number.
317 2006-07-17 Christopher Faylor <cgf@timesys.com>
320 * cygheap.h (cygheap_user): Remove unneeded class names from function
322 * fhandler.h (fhandler_base): Ditto.
323 (fhandler_dev_floppy): Ditto.
324 (fhandler_console): Ditto.
325 * wininfo.h (wininfo): Ditto.
326 * exceptions.cc (sigpacket::process): Avoid compiler errors about gotos
328 * fhandler_fifo.cc (fhandler_fifo::open): Ditto.
329 * fhandler_floppy.cc (fhandler_dev_floppy::ioctl): Ditto.
330 * fhandler_tty.cc (fhandler_tty_slave::ioctl): Ditto.
331 * mmap.cc (mmap64): Ditto.
332 * pipe.cc (fhandler_pipe::open): Ditto.
333 * spawn.cc (spawn_guts): Ditto.
335 * sec_helper.cc: Fix some comments.
336 (get_null_sd): Move file-scope static to only function where it is
339 2006-07-14 Christopher Faylor <cgf@timesys.com>
341 * fork.cc (fork): Lock the process before forking to prevent things
342 like new fds from being opened, etc.
343 * sync.h (lock_process::dont_bother): New function.
345 2006-07-14 Christopher Faylor <cgf@timesys.com>
347 * include/cygwin/types.h: Update copyright.
349 2006-07-14 Christopher Faylor <cgf@timesys.com>
351 * cygwin.sc: Make sure there's something in the cygheap.
352 * dllfixdbg: Accommodate newer binutils which put the gnu_debuglink at
353 the end rather than at the beginning.
355 2006-07-14 Corinna Vinschen <corinna@vinschen.de>
357 * security.cc (get_token_group_sidlist): Always add the interactive
358 group to the token. Add comment. Create logon_id group SID by
359 copying it from incoming group list.
360 (create_token): Add subauth_token parameter. Use information in
361 subauth_token if present. Tweak SourceIdentifier if subauth_token
362 is present for debugging purposes.
363 * security.h (create_token): Add subauth_token parameter in declaration.
364 * syscalls.cc (seteuid32): Call subauth first. Call create_token
365 regardless. Use subauth token in call to create_token if subauth
368 2006-07-13 Christopher Faylor <cgf@timesys.com>
370 * sigproc.cc (waitq_head): Don't initialize to zero.
371 * sigproc.h: Update copyright, fix whitespace.
373 2006-07-13 Christopher Faylor <cgf@timesys.com>
375 * fhandler.cc (fhandler_base::raw_read): Only return EISDIR when we're
376 really trying to read a directory.
378 * sigproc.cc: Use "Static" where appropriate.
380 2006-07-13 Corinna Vinschen <corinna@vinschen.de>
382 * include/netinet/in.h: Update copyright.
384 2006-07-13 Corinna Vinschen <corinna@vinschen.de>
386 * fhandler_socket.cc: Update copyright.
387 * include/pthread.h: Ditto.
389 2006-07-13 Corinna Vinschen <corinna@vinschen.de>
391 * fhandler_socket.cc (fhandler_socket::wait): Rework function so that
392 WaitForMultipleObjects is really only called when necessary.
394 2006-07-13 Corinna Vinschen <corinna@vinschen.de>
396 * mmap.cc (mmap64): Drop MAP_NORESERVE flag for non-anonymous,
397 non-private mappings.
398 (mmap_record::unmap_pages): Only check noreserve flag which now implies
399 anonymous and private.
401 (fixup_mmaps_after_fork): Ditto.
403 2006-07-13 Corinna Vinschen <corinna@vinschen.de>
405 * mmap.cc (mmap64): Drop MAP_RESERVED flag for all non-anonymous,
406 non-private mappings.
408 2006-07-13 Corinna Vinschen <corinna@vinschen.de>
410 * exceptions.cc (_cygtls::handle_exceptions): Call new
411 mmap_is_attached_or_noreserve_page function in case of access violation
412 and allow application to retry access on noreserve pages.
413 * mmap.cc (mmap_is_attached_or_noreserve_page): Changed from
414 mmap_is_attached_page. Handle also noreserve pages now. Change
416 * winsup.h (mmap_is_attached_or_noreserve_page): Declare instead of
417 mmap_is_attached_page.
419 2006-07-12 Corinna Vinschen <corinna@vinschen.de>
421 * mmap.cc (mmap_record::alloc_page_map): Don't call VirtualProtect
422 on maps created with MAP_NORESERVE.
424 2006-07-12 Corinna Vinschen <corinna@vinschen.de>
426 * include/netdb.h: Declare rcmd, rcmd_af, rexec, rresvport,
427 rresvport_af, iruserok, iruserok_sa, ruserok.
429 2006-07-12 Corinna Vinschen <corinna@vinschen.de>
431 * Makefile.in (DLL_OFILES): Drop iruserok.o. Add rcmd.o.
432 * autoload.cc (rcmd): Drop definition.
433 * cygwin.din: Export bindresvport, bindresvport_sa, iruserok_sa,
434 rcmd_af, rresvport_af.
435 * net.cc (cygwin_rcmd): Remove.
436 (last_used_bindresvport): Rename from last_used_rrecvport.
437 (cygwin_bindresvport_sa): New function implementing bindresvport_sa.
438 (cygwin_bindresvport): New function implementing bindresvport.
439 (cygwin_rresvport): Remove.
440 * include/cygwin/version.h: Bump API minor number.
441 * include/netinet/in.h: Declare bindresvport and bindresvport_sa.
442 * libc/iruserok.c: Remove file.
443 * libc/rcmd.cc: New file implementing rcmd, rcmd_af, rresvport,
444 rresvport_af, iruserok_sa, iruserok and ruserok.
446 2006-07-12 Corinna Vinschen <corinna@vinschen.de>
448 * include/pthread.h: Define PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT and
449 PTHREAD_PRIO_PROTECT only if _POSIX_THREAD_PRIO_INHERIT is defined.
451 2006-07-12 Corinna Vinschen <corinna@vinschen.de>
453 * fhandler_socket.cc (fhandler_socket::getsockname): Return valid
454 result for unbound sockets.
456 2006-07-11 Corinna Vinschen <corinna@vinschen.de>
458 * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Handle
459 wsock_mtx and wsock_evt on fork, thus handling close_on_exec correctly.
460 (fhandler_socket::fixup_after_exec): Drop misguided attempt to handle
462 (fhandler_socket::dup): Call fixup_after_fork with NULL parent.
464 (fhandler_socket::set_close_on_exec): Handle wsock_mtx and wsock_evt.
466 2006-07-10 Corinna Vinschen <corinna@vinschen.de>
468 * fhandler.h (class fhandler_socket): Add wsock_mtx, wsock_evt
469 and wsock_events members. Remove closed status flag, add listener
470 status flag. Accomodate new implementation of socket event handling
471 methods. Declare recv* and send* functions ssize_t as the POSIX
473 (fhandler_socket::recv_internal): Declare.
474 (fhandler_socket::send_internal): Ditto.
475 * fhandler_socket.cc (EVENT_MASK): Define mask of selected events.
476 (fhandler_socket::fhandler_socket): Initialize new members.
477 (fhandler_socket::af_local_setblocking): Don't actually set the
478 socket to blocking mode. Keep sane event selection.
479 (fhandler_socket::af_local_unsetblocking): Don't actually set the
480 socket to previous blocking setting, just remember it.
481 (struct wsa_event): New structure to keep event data per shared
483 (NUM_SOCKS): Define number of shared sockets concurrently handled by
484 all active Cygwin processes.
485 (wsa_events): New shared datastructure keeping all wsa_event records.
486 (socket_serial_number): New shared variable to identify shared sockets.
487 (wsa_slot_mtx): Global mutex to serialize wsa_events access.
488 (search_wsa_event_slot): New static function to select a new wsa_event
489 slot for a new socket.
490 (fhandler_socket::prepare): Rewrite. Prepare event selection
492 (fhandler_socket::wait): Rewrite. Wait for socket events in thread
493 safe and multiple process safe.
494 (fhandler_socket::release): Rewrite. Close per-socket descriptor
495 mutex handle and event handle.
496 (fhandler_socket::dup): Duplicate wsock_mtx and wsock_evt. Fix
497 copy-paste error in debug output.
498 (fhandler_socket::connect): Accomodate new event handling.
499 (fhandler_socket::listen): Set listener flag on successful listen.
500 (fhandler_socket::accept): Accomodate new event handling.
501 (fhandler_socket::recv_internal): New inline method centralizing
503 (fhandler_socket::recvfrom): Call recv_internal now.
504 (fhandler_socket::recvmsg): Ditto. Streamline copying from iovec
506 (fhandler_socket::send_internal): New inline method centralizing
508 (fhandler_socket::sendto): Call send_internal now.
509 (fhandler_socket::sendmsg): Ditto. Streamline copying from iovec
511 (fhandler_socket::close): Call release now.
512 (fhandler_socket::ioctl): Never actually switch to blocking mode.
513 Just keep track of the setting.
514 * net.cc (fdsock): Call prepare now.
515 (cygwin_connect): Revert again to event driven technique.
516 (cygwin_accept): Ditto.
517 * poll.cc (poll): Don't call recvfrom on a listening socket.
518 Remove special case for failing recvfrom.
519 * include/sys/socket.h: Declare recv* and send* functions ssize_t as
522 2006-07-10 Corinna Vinschen <corinna@vinschen.de>
524 * libc/inet_addr.c: Define __INSIDE_CYGWIN_NET__.
525 * libc/inet_network.c: Ditto.
527 2006-07-07 Corinna Vinschen <corinna@vinschen.de>
529 * fhandler_socket.cc (fhandler_socket::wait): Disable SA_RESTART
532 2006-07-07 Corinna Vinschen <corinna@vinschen.de>
534 * net.cc (cygwin_inet_ntop): Fix data type of forth parameter.
536 2006-07-07 Corinna Vinschen <corinna@vinschen.de>
538 * Makefile.in (DLL_OFILES): Add inet_addr.o and inet_network.o.
539 * autoload.cc (inet_addr): Drop definition.
541 * net.cc: Forward declare cygwin_inet_aton and cygwin_inet_ntop.
542 (cygwin_inet_ntoa): Call cygwin_inet_ntop instead of Winsock inet_ntoa.
543 (cygwin_inet_addr): Remove here.
544 (cygwin_inet_aton): Ditto.
545 (cygwin_inet_network): Ditto.
546 * libc/inet_addr.c: New file implementing cygwin_inet_aton and
548 * libc/inet_network.c: New file implementing cygwin_inet_network.
550 2006-07-06 Christopher Faylor <cgf@timesys.com>
552 * hookapi.cc: Add comment header
553 (putmem): Make static.
555 (rvadelta): Ditto. Don't assume that a section which ends where the
556 import_rva begins is the import list.
558 * child_info.h: Update copyright.
561 2006-07-06 Corinna Vinschen <corinna@vinschen.de>
563 * include/cygwin/in6.h (struct in6_addr): Fix typo.
565 2006-07-06 Corinna Vinschen <corinna@vinschen.de>
567 * cygwin.din: Export in6addr_any, in6addr_loopback, freeaddrinfo,
568 gai_strerror, getaddrinfo, getnameinfo.
569 * fhandler_socket.cc: Include cygwin/in6.h.
570 (get_inet_addr): Accomodate AF_INET6 usage.
571 (fhandler_socket::connect): Ditto.
572 (fhandler_socket::listen): Ditto.
573 (fhandler_socket::sendto): Ditto.
574 * net.cc: Include cygwin/in6.h.
575 (in6addr_any): Define.
576 (in6addr_loopback): Define.
577 (cygwin_socket): Accomodate AF_INET6 usage.
578 (socketpair): Bind socketpairs only to loopback for security.
579 (inet_pton4): New static function.
581 (cygwin_inet_pton): New AF_INET6 aware inet_pton implementation.
582 (inet_ntop4): New static function.
584 (cygwin_inet_ntop): New AF_INET6 aware inet_ntop implementation.
585 (ga_aistruct): New static function.
593 (ipv4_freeaddrinfo): Ditto.
594 (ipv4_getaddrinfo): Ditto.
595 (ipv4_getnameinfo): Ditto.
596 (gai_errmap_t): New structure holding error code - error string mapping.
597 (cygwin_gai_strerror): New function implementing gai_strerror.
598 (w32_to_gai_err): New static function.
599 (get_ipv6_funcs): Ditto.
600 (load_ipv6_funcs): Ditto.
601 (cygwin_freeaddrinfo): New function implementing freeaddrinfo.
602 (cygwin_getaddrinfo): New function implementing getaddrinfo.
603 (cygwin_getnameinfo): New function implementing getnameinfo.
604 * include/netdb.h: Include stdint.h and cygwin/socket.h. Define
605 data types and macros used by getaddrinfo and friends. Declare
606 freeaddrinfo, gai_strerror, getaddrinfo and getnameinfo.
607 * include/cygwin/in.h: Add IPv6 related IPPROTOs. Remove definition
608 of struct sockaddr_in6. Include cygwin/in6.h instead.
609 * include/cygwin/in6.h: New header file defining IPv6 releated
610 data types and macros.
611 * include/cygwin/socket.h: Enable AF_INET6 and PF_INET6. Add
612 IPv6 related socket options.
613 * include/cygwin/version.h: Bump API minor number.
615 2006-07-06 Corinna Vinschen <corinna@vinschen.de>
617 * autoload.cc (DsGetDcNameA): Define.
618 (NetGetAnyDCName): Define.
619 * security.cc: Include dsgetdc.h.
620 (DsGetDcNameA): Declare.
621 (DS_FORCE_REDISCOVERY): Define.
622 (get_logon_server): Add bool parameter to control rediscovery of DC.
623 Use DsGetDcNameA function if supported, NetGetDCName/NetGetAnyDCName
625 (get_server_groups): Rediscover DC if get_user_groups fails and
627 (get_reg_security): Use correct error code macro when testing
628 RegGetKeySecurity return value.
629 * security.h (get_logon_server): Remove default vaue from wserver
630 parameter. Add rediscovery parameter.
631 * uinfo.cc (cygheap_user::env_logsrv): Accomodate rediscovery parameter
632 in call to get_logon_server.
634 2006-07-05 Christopher Faylor <cgf@timesys.com>
636 * sortdin: Ignore all leading underscores when deriving a sort key.
637 * cygwin.din: Resort.
639 2006-07-05 Christopher Faylor <cgf@timesys.com>
641 * sortdin: New program.
644 2006-07-05 Corinna Vinschen <corinna@vinschen.de>
646 * fhandler.h (fhandler_socket::wait): Reset default timeout to 10ms.
648 2006-07-05 Corinna Vinschen <corinna@vinschen.de>
650 * path.cc (path_conv::check): Ignore has_ea setting, it's always unset
651 at this point anyway.
652 (get_symlink_ea): Remove.
653 (set_symlink_ea): Remove.
654 (symlink_worker): Drop writing symlink into NTFS extended attributes.
655 (symlink_info::check): Drop reading symlinks from NTFS extended
658 2006-07-04 Christopher Faylor <cgf@timesys.com>
660 * libc/rexec.cc (cygwin_rexec): Obvious (?) fix to correct a gcc
661 warning - set port to zero first thing in the function.
663 2006-07-04 Corinna Vinschen <corinna@vinschen.de>
665 * signal.cc (signal): Set sa_mask to sig.
667 2006-07-04 Corinna Vinschen <corinna@vinschen.de>
669 * Makefile.in (DLL_OFILES): Add rexec.o.
670 * autoload.cc (inet_network): Drop definition.
672 * net.cc (rexec): Drop extern declaration.
673 (inet_network): Ditto.
674 (cygwin_inet_network): Implement using inet_addr.
675 (cygwin_rexec): Remove.
676 * libc/rexec.cc: New file.
678 2006-07-04 Corinna Vinschen <corinna@vinschen.de>
680 * fhandler_socket.cc (fhandler_socket::listen): Allow listening on
683 2006-07-04 Corinna Vinschen <corinna@vinschen.de>
685 * fhandler.h (fhandler_socket::wait): Set default timeout to INFINITE.
687 2006-07-03 Corinna Vinschen <corinna@vinschen.de>
689 * autoload.cc (NtQueryEaFile): Define.
690 (NtSetEaFile): Define.
691 * fhandler.cc (fhandler_base::open): Use appropriate open flags
692 in query case when allow_ntea is set.
693 * ntdll.h (struct _FILE_GET_EA_INFORMATION): Define.
694 (struct _FILE_FULL_EA_INFORMATION): Define.
695 (NtQueryEaFile): Declare.
696 (NtSetEaFile): Declare.
697 * ntea.cc (read_ea): Rename from NTReadEA and rewrite using
699 (write_ea): Rename from NTWriteEA and rewrite using NtSetEaFile.
700 * path.cc (get_symlink_ea): Make static. Add handle parameter to
701 accomodate new read_ea call.
702 (set_symlink_ea): Make static. Add handle parameter to accomodate new
704 (symlink_worker): Call set_symlink_ea while file is still open.
705 (symlink_info::check): Call get_symlink_ea after file has been opened.
706 * security.cc (get_file_attribute): Accomodate new read_ea call.
707 (set_file_attribute): Accomodate new write_ea call.
708 * security.h (read_ea): Change declaration accordingly.
711 2006-07-03 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
713 * fhandler.h (class dev_console): Add `metabit' indicating the
714 current meta key mode.
715 * fhandler_console.cc (fhandler_console::read): Set the top bit of
716 the character if metabit is true.
717 * fhandler_console.cc (fhandler_console::ioctl): Implement
718 KDGKBMETA and KDSKBMETA commands.
719 * fhandler_tty.cc (process_ioctl): Support KDSKBMETA.
720 (fhandler_tty_slave::ioctl): Send KDGKBMETA and KDSKBMETA to the
722 * include/cygwin/kd.h: New file for the meta key mode.
723 * include/sys/kd.h: New file.
725 2006-07-03 Eric Blake <ebb9@byu.net>
727 * include/stdint.h (UINT8_C, UINT16_C): Unsigned types smaller
728 than int promote to signed int.
730 2006-07-03 Corinna Vinschen <corinna@vinschen.de>
732 * net.cc (cygwin_sendto): Define appropriate parameters using
733 socklen_t type according to SUSv3.
734 (cygwin_recvfrom): Ditto.
735 (cygwin_setsockopt): Ditto.
736 (cygwin_getsockopt): Ditto.
737 (cygwin_connect): Ditto.
738 (cygwin_accept): Ditto.
739 (cygwin_bind): Ditto.
740 (cygwin_getsockname): Ditto.
741 (cygwin_getpeername): Ditto.
742 (cygwin_recv): Ditto.
743 (cygwin_send): Ditto.
744 * include/cygwin/socket.h (socklen_t): Typedef and define.
745 * include/sys/socket.h: Declare socket functions using socklen_t type.
747 2006-07-02 Christopher Faylor <cgf@timesys.com>
749 * include/cygwin/version.h: Bump DLL minor version number to 21.
751 2006-06-30 Corinna Vinschen <corinna@vinschen.de>
753 * net.cc (cygwin_sendto): Allow zero-sized packets.
754 (cygwin_sendmsg): Ditto.
756 2006-06-26 Corinna Vinschen <corinna@vinschen.de>
758 Revert patches from 2005-10-22 and 2006-06-14 to use event driven
759 accept and connect back to using select:
760 * fhandler.h (class fhandler_socket): Remove accept_mtx.
761 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Drop
762 initializing accept_mtx.
763 (fhandler_socket::accept): Drop event handling.
764 (fhandler_socket.cc (fhandler_socket::connect): Ditto.
765 (fhandler_socket::dup): Drop accept_mtx handling.
766 (fhandler_socket::listen): Ditto.
767 (fhandler_socket::prepare): Ditto.
768 (fhandler_socket::release): Ditto.
769 (fhandler_socket::close): Ditto.
770 * net.cc (cygwin_accept): Revert to calling cygwin_select to
771 implement interuptible accept.
772 (cygwin_connect): Ditto for connect.
774 2006-06-22 Christopher Faylor <cgf@timesys.com>
776 * fhandler_fifo.cc (fhandler_fifo::open): Release process lock and grab
777 a system-wide mutex to prevent a deadlock and a race.
778 * sync.h (lock_process): Make fhandler_fifo a friend.
780 * smallprint.c (__small_vsprintf): Cosmetic change.
782 2006-06-15 Corinna Vinschen <corinna@vinschen.de>
784 * cygwin.din: Export __srget_r, __swbuf_r.
785 * include/cygwin/version.h: Bump API minor number to 156.
787 2006-06-14 Corinna Vinschen <corinna@vinschen.de>
789 * fhandler.h (class fhandler_socket): Add private mutex handle
791 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Initialize
793 (fhandler_socket::dup): Duplicate accept_mtx, if available.
794 (fhandler_socket::listen): Create accept_mtx before trying to listen.
795 (fhandler_socket::prepare): Wait for accept_mtx if available to
796 serialize accepts on the same socket.
797 (fhandler_socket::release): Release accept_mtx.
798 (fhandler_socket::close): Close accept_mtx on successful closesocket.
800 2006-06-12 Christopher Faylor <cgf@timesys.com>
802 * fhandler_tty.cc (fhandler_pty_master::close): Always close
803 from_master/to_master since we always have copies of these handles.
805 2006-06-12 Corinna Vinschen <corinna@vinschen.de>
807 * include/sys/wait.h: Move definition of wait constants from here...
808 * include/cygwin/wait.h: ...to here. New file.
809 * include/cygwin/stdlib.h: Include cygwin/wait.h to conform with SUSv3.
811 2006-06-12 Pierre Humblet Pierre.Humblet@ieee.org
813 * heap.cc (heap_init): Only commit if allocsize is not zero.
815 2006-06-12 Corinna Vinschen <corinna@vinschen.de>
817 * net.cc (fdsock): Disable raising buffer sizes. Add comment to
820 2006-06-04 Christopher Faylor <cgf@timesys.com>
822 * ioctl.cc (ioctl): Accommodate change in reported pty master device
824 * select.cc (peek_pipe): Ditto.
826 2006-06-04 Christopher Faylor <cgf@timesys.com>
828 * cygtls.h (CYGTLS_PADSIZE): Reset to a size that XP SP1 seems to like.
829 * tlsoffsets.h: Regenerate.
831 2006-06-03 Christopher Faylor <cgf@timesys.com>
833 * cygthread.cc (cygthread::terminate_thread): In debugging output, use
834 name of thread being terminated rather than thread doing the
837 * fhandler.h (fhandler_pty_master::slave): Delete.
838 (fhandler_pty_master::get_unit): Ditto.
839 (fhandler_pty_master::setup): Change argument declaration to
840 accommodate new usage.
841 * fhandler_tty.cc (fhandler_tty_master::init): Remove obsolete slave
842 assignment. Pass argument to setup indicating that this is a tty.
843 (fhandler_tty_slave::open): Use dev() method rather than referencing
845 (fhandler_pty_master::open): Don't create archetype based on ptym
846 device number. Set device number to use DEV_TTYM_MAJOR and tty number.
847 Pass argument to setup indicating that this is a pty.
848 (fhandler_pty_master::setup): Change single argument to a flag
849 indicating whether we're creating a pty and use appropriately.
850 Calculate 't' variable here rather than in caller.
852 * fhandler_dsp.cc (fhandler_dev_dsp::open): Use dev() method rather
853 than referencing pc.dev directly.
855 2006-06-03 Christopher Faylor <cgf@timesys.com>
857 * dcrt0.cc (dll_crt0_0): Call tty_list::init_session here.
858 (dll_crt0_1): Reflect renaming from tty_init to tty::init_session.
859 (do_exit): Reflect moving of tty_terminate into tty_list.
860 * exceptions.cc (events_init): Move tty_mutex stuff elsewhere.
861 * fhandler_console.cc (set_console_title): Use lock_ttys class.
862 * fhandler_termios.cc (fhandler_termios::bg_check): Make debug output
864 * fhandler_tty.cc (fhandler_tty_slave::open): Reflect move of
865 attach_tty into tty_list class. Don't attempt to grab master end of
866 pty if master doesn't exist.
867 (fhandler_pty_master::open): Reflect move of allocate_tty into tty_list
868 class. Use lock_ttys::release to release mutex. Improve debugging
870 (fhandler_pty_master::setup): Remove if 0'ed block. Fix argument to
871 SetNamedPipeHandleState.
872 * pinfo.cc (_pinfo::set_ctty): Lock ttys before setting sid/pgid.
873 Improve debugging. Add temporary debugging.
874 * tty.cc (tty_list::init_session): New function.
875 (tty::init_session): Rename from tty_init. Reflect move of attach_tty
877 (tty::create_master): Rename from create_tty_master.
878 (tty_list::attach): Rename from attach_tty. Reflect renaming of
879 connect_tty to connect. Ditto for allocate_tty.
880 (tty_terminate): Delete.
881 (tty_list::terminate): Subsume tty_terminate. Use lock_ttys rather
882 than manipulating mutex directly.
883 (tty_list::allocate): Rename from allocate_tty. Use lock_ttys rather
884 than manipulating mutex directly. Don't set sid here since linux
885 apparently doesn't do this. Reflect move of create_tty_master into
887 (lock_ttys::lock_ttys): Define new constructor.
888 (lock_ttys::release): New function.
889 * tty.h (tty::exists): Return false immediately if !master_pid.
890 (tty::set_master_closed): Define new function.
891 (tty::create_master): Ditto.
892 (tty::init_session): Ditto.
893 (tty_list::mutex): New field.
894 (tty_list::allocate): Define new function.
895 (tty_list::connect): Ditto.
896 (tty_list::attach): Ditto.
897 (tty_list::init_session): Ditto.
898 (lock_ttys): New class.
899 (tty_init): Delete declaration.
900 (tty_terminate): Ditto.
902 (create_tty_master): Ditto.
904 2006-06-03 Christopher Faylor <cgf@timesys.com>
906 * Makefile.in (libdl.a): New library.
908 2006-06-03 Christopher Faylor <cgf@timesys.com>
910 * fhandler_tty.cc (fhandler_pty_master::close): Don't close handles if
912 (fhandler_pty_master::setup): Make sure that original handle is closed
913 when changing inheritance.
914 (fhandler_pty_master::fixup_after_fork): Set from_master/to_master to
916 (fhandler_pty_master::fixup_after_exec): Clear from_master/to_master
919 2006-06-03 Christopher Faylor <cgf@timesys.com>
921 * cygheap.cc (init_cygheap::close_ctty): Remove obsolete code.
922 * dcrt0.cc (child_info_spawn::handle_spawn): Signal ready after we've
923 run fixup_after_exec.
924 * dtable.cc (dtable::fixup_after_exec): Add debugging output.
925 * fhandler_tty.cc (fhandler_pty_master::doecho): Use class version of
927 (fhandler_tty_common::close): Remove obsolete code.
928 (fhandler_tty_slave::fixup_after_exec): Don't close, since this is done
929 in dtable's fixup_after_exec. (revisit later?)
930 (fhandler_pty_master::fixup_after_exec): Ditto.
932 2006-06-02 Christopher Faylor <cgf@timesys.com>
934 * cygtls.h (CYGTLS_PADSIZE): Bump up or suffer a regrettable collision
936 * tlsoffsets.h: Regenerate.
938 * dcrt0.cc (break_here): Define unconditionally for use elsewhere.
939 Call DebugBreak, if appropriate.
940 (initial_env): Rely on break_here() to call DebugBreak.
941 * exceptions.cc (try_to_debug): Ditto.
943 2006-06-02 Christopher Faylor <cgf@timesys.com>
945 * fhandler.cc (fhandler_base::fixup_after_exec): Declare here.
946 * fhandler.h (fhandler_base::fixup_after_exec): Make non-inline.
947 (fhandler_termios::fixup_after_fork): Delete declaration.
948 (fhandler_termios::fixup_after_exec): Ditto.
949 (fhandler_tty_common::inuse): Remove.
950 (fhandler_tty_common::dup): Delete declaration.
951 (fhandler_tty_common::fixup_after_fork): Ditto.
952 (fhandler_tty_slave::fixup_after_exec): Declare new function.
953 (fhandler_pty_master::dwProcessId): New variable.
954 (fhandler_pty_master::from_master): Ditto.
955 (fhandler_pty_master::to_master): Ditto.
956 (fhandler_pty_master::setup): New function.
957 (fhandler_pty_master::fixup_after_fork): Ditto.
958 (fhandler_pty_master::fixup_after_exec): Ditto.
959 * fhandler_termios.cc (fhandler_termios::fixup_after_exec): Delete
961 (fhandler_termios::fixup_after_fork): Ditto.
962 * fhandler_tty.cc (fhandler_tty_master::init): Use fhandler_pty_master
963 setup function rather than obsolete tty::common_init. Delete obsolete
965 (fhandler_tty_slave::fhandler_tty_slave): Set inuse to NULL here.
966 (fhandler_tty_slave::open): Change debugging output for clarity. Check
967 for different things when doing a sanity check on the tty. Reflect the
968 fact that master_pid now is the cygwin pid rather than the windows pid.
969 Use "arch" rather than "archetype" for consistency.
970 (fhandler_tty_slave::close): Close inuse here.
971 (fhandler_tty_slave::dup): Remove old if 0'ed code.
972 (fhandler_pty_master::dup): New function. Handles pty master
974 (fhandler_pty_master::fhandler_pty_master): Zero pty_master specific
976 (fhandler_pty_master::open): Implement using archetypes, similar to
977 slave. Use fhandler_pty_master setup function rather than obsolete
978 tty::common_init. Don't set inuse.
979 (fhandler_tty_common::close): Don't deal with inuse. Delete old if
981 (fhandler_pty_master::close): Implement using archetypes. Close
982 from_master and to_master.
983 (fhandler_tty_common::set_close_on_exec): Just set close_on_exec flag
984 here since everything uses archetypes now.
985 (fhandler_tty_common::fixup_after_fork): Delete definition.
986 (fhandler_tty_slave::fixup_after_exec): Define new function.
987 (fhandler_pty_master::setup): New function, derived from
989 (fhandler_pty_master::fixup_after_fork): New function.
990 (shared_info.h): Reset SHARED_INFO_CB to reflect new tty size.
991 * tty.cc (tty_list::terminate): Close individual handles from
993 (tty::master_alive): Delete.
994 (tty::make_pipes): Ditto.
995 (tty::common_init): Ditto.
996 * tty.h (tty::from_slave): Delete.
997 (tty::to_slave): Ditto.
998 (tty::common_init): Delete declaration.
999 (tty::make_pipes): Ditto.
1000 (tty::master_pid): Define as pid_t since it is now a cygwin pid.
1002 2006-06-01 Christopher Faylor <cgf@timesys.com>
1004 * cygheap.cc (cygheap_fixup_in_child): Don't close parent handle here.
1005 Let the caller do that.
1006 * dcrt0.cc (child_info_spawn::handle_spawn): Close parent handle here
1007 to allow fixup_after_exec functions to use it.
1009 * cygtls.cc (_cygtls::call2): Avoid calling exit thread if called with
1011 * cygtls.h (_cygtls::isinitialized): Check that we actually have a tls
1012 before seeing if it is initialized.
1013 * gendef (_sigfe_maybe): Ditto.
1014 * dcrt0.cc (dll_crt0_1): Remove static, use just one argument.
1015 * dll_init.cc (dllcrt0_info): New structure.
1016 (dll_dllcrt0): Change into a front-end to renamed dll_dllcrt0_1 so that
1017 we'll always be assured of having something like a tls.
1018 (dll_dllcrt0_1): New function, basically renamed from from dll_dllcrt0.
1019 Unconditionally call _my_tls.init_exception_handler now that we are
1020 assured of having a tls. Change variable name from "linking" to "linked".
1021 * winsup.h (dll_crt0_1): Declare.
1022 (dll_dllcrt0_1): Ditto.
1024 2006-05-30 Christopher Faylor <cgf@timesys.com>
1026 * cygtls.cc (_cygtls::call2): Don't call ExitThread on the main thread.
1028 2006-05-29 Christopher Faylor <cgf@timesys.com>
1030 * winf.h (MAXCYGWINCMDLEN): Set down size to 30000 or suffer fork
1033 2006-05-28 Christopher Faylor <cgf@timesys.com>
1035 * sigproc.cc (child_info::proc_retry): Mask all of the bits we're
1036 interested in, which includes bits above and below 0xc0000000.
1038 2006-05-27 Christopher Faylor <cgf@timesys.com>
1040 * dll_init.cc (dll_dllcrt0): Previous change didn't work very well with
1041 fork. Semi-revert it but change name of variable to something that
1044 2006-05-27 Christopher Faylor <cgf@timesys.com>
1046 * thread.cc (verifyable_object_isvalid): Check for NULL specifically.
1048 2006-05-27 Christopher Faylor <cgf@timesys.com>
1050 * dll_init.cc (dll_dllcrt0): Call _my_tls.init_exception_handler if
1051 we've finished initializing (Thanks to Gary Zablackis for noticing this
1052 problem). Just use cygwin_finished_initializing rather than defining a
1055 2006-05-25 Christopher Faylor <cgf@timesys.com>
1057 * debug.h (ModifyHandle): Define new macro.
1058 (modify_handle): Declare new function.
1059 * debug.cc (modify_handle): Define new function.
1060 * fhandler.h (fhandler_base::fork_fixup): Change return value from void
1062 * fhandler.cc (fhandler_base::fork_fixup): Return true if fork fixup has
1064 * pipe.cc (fhandler_pipe::set_close_on_exec): Set inheritance of
1065 protected handle via ModifyHandle if DEBUGGING.
1066 (fhandler_pipe::fixup_after_fork): Protect guard handle if fork fixup
1069 2006-05-24 Christopher Faylor <cgf@timesys.com>
1071 * cygtls.cc (_cygtls::call): Call call2 using _my_tls.
1072 (_cygtls::init_exception_handler): Always replace existing exception
1073 handler with cygwin exception handler.
1074 * cygtls.h (_cygtls::call2): Remove static designation.
1075 * dcrto.cc (dll_crt0_1): Define in a way that allows calling via
1077 (_initialize_main_tls): Delete.
1078 (_dll_crt0): Call dll_crt0_1 via cygtls::call. Set _main_tls here.
1079 * external.cc (cygwin_internal): Implement CW_CYGTLS_PADSIZE.
1080 * include/sys/cygwin.h (CW_CYGTLS_PADSIZE): Define.
1081 * tlsoffsets.h: Regenerate.
1083 2006-05-24 Christopher Faylor <cgf@timesys.com>
1085 * configure.in: Update to newer autoconf.
1086 (thanks to Steve Ellcey)
1087 * configure: Regenerate.
1088 * aclocal.m4: New file.
1090 2006-05-23 Lev Bishop <lev.bishop+cygwin@gmail.com>
1092 * fhandler.cc (readv): Remove nonsensical assert.
1094 2006-05-23 Christopher Faylor <cgf@timesys.com>
1096 * select.cc (start_thread_socket): Delay setting thread local exitsock
1097 until we know it's correct. Return correct value on error.
1099 2006-05-23 Lev Bishop <lev.bishop+cygwin@gmail.com>
1100 Christopher Faylor <cgf@timesys.com>
1102 * select.cc (start_thread_socket): Clean up exitsock in case of error.
1103 Use si->exitcode consistently.
1105 2006-05-21 Christopher Faylor <cgf@timesys.com>
1107 * child_info.h (_CI_SAW_CTRL_C): New enum.
1108 (CURR_CHILD_INFO_MAGIC): Reset.
1109 (saw_ctrl_c): New function.
1110 (set_saw_ctrl_c): Ditto.
1111 * sigproc.cc (child_info::proc_retry): Return EXITCODE_OK if we get
1112 STATUS_CONTROL_C_EXIT and we actually saw a CTRL-C.
1113 * spawn.cc (dwExeced): Delete.
1114 (chExeced): New variable.
1115 (spawn_guts): Set chExeced;
1116 * exceptions.cc (dwExeced): Delete declaration.
1117 (chExeced): Declare.
1118 (ctrl_c_handler): Detect if we're an exec stub process and set a flag,
1121 * fhandler_tty.cc (fhandler_tty_common::__release_output_mutex): Add
1122 extra DEBUGGING test.
1124 * pinfo.cc: Fix comment.
1126 2006-05-21 Christopher Faylor <cgf@timesys.com>
1128 * fhandle.h (fhandler_pipe::create_guard): Revert change which
1129 eliminated SECURITY_ATTRIBUTES argument.
1130 * pipe.cc (fhandler_pipe::open): Duplicate guard from other process and
1131 protect it appropriately. Eliminate unneeded writepipe_exists
1132 temporary variable. Set inheritance appropriately.
1133 (fhandler_pipe::set_close_on_exec): Revert change which eliminated
1134 handling guard inheritance.
1135 (fhandler_pipe::fixup_after_fork): Ditto. Use correct name of entity
1136 being checked by fork_fixup.
1137 (fhandler_pipe::fixup_after_exec): Don't bother with guard here.
1138 (fhandler_pipe::dup): Cosmetic changes and revert creation of
1139 writepipe_exists as noninheritable.
1140 (fhandler_pipe::create): Revert change which eliminated
1141 SECURITY_ATTRIBUTES argument. Revert change which always made
1142 writepipe_exists noninheritable.
1144 2006-05-21 Christopher Faylor <cgf@timesys.com>
1146 * debug.cc (add_handle): Print handle value when collision detected.
1147 * dtable.cc (dtable::stdio_init): Cosmetic change.
1148 * fhandler.h (fhandler_base::create_read_state): Protect handle.
1149 (fhandler_pipe::create_guard): Ditto. Always mark the handle as
1151 (fhandler_pipe::is_slow): Return boolean value rather than numeric 1.
1152 * pipe.cc (fhandler_pipe::fhandler_pipe): Always flag that we need fork
1154 (fhandler_pipe::open): Don't pass security attributes to create_guard.
1155 (fhandler_pipe::set_close_on_exec): Don't handle guard here.
1156 (fhandler_pipe::close): Accommodate now-protected guard handle.
1157 (fhandler_pipe::fixup_in_child): Don't protect read_state here.
1158 (fhandler_pipe::fixup_after_exec): Close guard handle if close_on_exec.
1159 (fhandler_pipe::fixup_after_fork): Don't bother with guard here.
1160 (fhandler_pipe::dup): Don't set res to non-error prematurely. Use
1161 boolean values where appropriate. Protect guard and read_state.
1162 (fhandler_pipe::create): Don't call need_fork_fixup since it is now the
1163 default. Don't protect read_state or guard.
1165 * pipe.cc (fhandler_base::ready_for_read): Use bool values for "avail".
1167 * spawn.cc (spawn_guts): Set cygheap->pid_handle as inheritable when
1170 2006-05-15 Lev Bishop <lev.bishop+cygwin@gmail.com>
1171 Christopher Faylor <cgf@timesys.com>
1173 * select.cc (fhandler_pipe::ready_for_read): Actually get the guard
1174 mutex for blocking reads.
1176 2006-05-20 Christopher Faylor <cgf@timesys.com>
1178 * fhandler_tty.cc (fhandler_tty::close): Remove problematic hExeced guard.
1180 2006-05-20 Christopher Faylor <cgf@timesys.com>
1182 * fhandler_tty.cc (fhandler_tty_slave::open): Reinstate call to
1183 need_invisible on first pty open.
1185 2006-05-18 Christopher Faylor <cgf@timesys.com>
1187 * fhandler_console.cc (fhandler_console::need_invisible): Allocate an
1188 invisible window station when ctty != TTY_CONSOLE.
1190 2006-05-16 Christopher Faylor <cgf@timesys.com>
1192 * cygtls.cc (_cygtls::remove): Don't test for initialization since
1193 this function will always be called when _my_tls is initialized.
1194 * init.cc (dll_entry): Don't attempt to remove tls info if _my_tls is
1195 obviously not even available.
1197 2006-05-15 Christopher Faylor <cgf@timesys.com>
1199 * sigproc.cc (no_signals_available): Detect hwait_sig ==
1200 INVALID_HANDLE_VALUE.
1201 (wait_sig): Set hwait_sig to INVALID_HANDLE_VALUE on __SIGEXIT.
1203 2006-05-15 Christopher Faylor <cgf@timesys.com>
1205 * cygtls.cc (_cygtls::init_thread): Zero entire _my_tls structure and
1207 * cygtls.h (_my_tls::padding): Delete.
1208 (CYGTLS_PADSIZE): Redefine concept of padding to mean padding at the
1210 * dcrt0.cc (initialize_main_tls): Change return to void.
1211 * gentls_offsets: Treat const specially, too. Keep going after a '}'
1212 is found. Change negative offset calculation to use CYGTLS_PADSIZE.
1213 * init.cc (_my_oldfunc): New variable.
1214 (threadfunc_fe): Use stored tls value for oldfunc rather than blindly
1215 writing to the stack.
1216 (munge_threadfunc): Set oldfunc in tls.
1217 (dll_entry): Initialize tls allocation.
1218 * tlsoffsets.h: Regenerate.
1220 2006-05-13 Christopher Faylor <cgf@timesys.com>
1222 * ntdll.h (STATUS_INVALID_INFO_CLASS): Conditionalize.
1224 2006-05-10 Brian Dessent <brian@dessent.net>
1226 * Makefile.in (clean): Also delete *.dbg.
1228 2006-05-08 Christian Franke <Christian.Franke@t-online.de>
1230 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix typo which
1231 caused test for ".." to be skipped.
1233 2006-05-02 Christopher Faylor <cgf@timesys.com>
1235 * external.cc (cygwin_internal): Set errno on failure.
1237 2006-04-27 Corinna Vinschen <corinna@vinschen.de>
1239 * pipe.cc (DEFAULT_PIPEBUFSIZE): Raise to 64K.
1241 2006-04-26 Corinna Vinschen <corinna@vinschen.de>
1243 * fhandler.h (fhandler_base): Change fstat_helper prototype
1244 to take file size and inode number as 64 bit values.
1245 * fhandler_disk_file.cc (FS_IS_SAMBA): Move to path.cc
1246 (FS_IS_SAMBA_WITH_QUOTA): Ditto.
1247 (path_conv::hasgood_inode): Delete.
1248 (path_conv::is_samba): Delete.
1249 (path_conv::isgood_inode): Centralized function to recognize
1250 a good inode number.
1251 (fhandler_base::fstat_by_handle): Constify fvi_size and fai_size.
1252 Accomodate argument change in fstat_helper.
1253 (fhandler_base::fstat_by_name): Ditto.
1254 (fhandler_base::fstat_helper): Accomodate argument change. Call
1255 path_conv::isgood_inode to recognize good inodes.
1256 (fhandler_disk_file::opendir): Explain Samba weirdness here.
1257 Call path_conv::fs_is_samba instead of path_conv::is_samba.
1258 (fhandler_disk_file::readdir): Add STATUS_INVALID_INFO_CLASS
1259 as valid return code from NtQueryDirectoryFile to indicate that
1260 FileIdBothDirectoryInformation is not supported.
1261 Call path_conv::isgood_inode to recognize good inodes.
1262 * ntdll.h (STATUS_INVALID_INFO_CLASS): Define.
1263 * path.cc (fs_info::update): Rework file system recognition
1264 and set appropriate flags.
1265 * path.h (struct fs_info): Add is_ntfs, is_samba and is_nfs flags.
1266 Constify pure read accessors.
1268 2006-04-24 Christopher Faylor <cgf@timesys.com>
1270 * environ.cc (getearly): Force correct dereference order when
1271 inspecting environ table.
1273 2006-04-24 Corinna Vinschen <corinna@vinschen.de>
1275 * select.cc (thread_pipe): Raise sleep time only every 8th iteration.
1276 (thread_mailslot): Ditto.
1278 2006-04-23 Corinna Vinschen <corinna@vinschen.de>
1279 Christopher Faylor <cgf@timesys.com>
1281 * select.cc (thread_pipe): Raise sleep time dynamically to speed up
1282 select on pipes when copying lots of data.
1283 (thread_mailslot): Ditto for mailslots.
1285 2006-04-22 Christopher Faylor <cgf@timesys.com>
1287 * signal.cc (abort): On second thought, just set incyg once.
1289 2006-04-22 Christopher Faylor <cgf@timesys.com>
1291 * signal.cc (abort): Set incyg manually to help get a reliable gdb
1293 * cygwin.din (abort): Make NOSIGFE.
1295 2006-04-21 Pierre Humblet Pierre.Humblet@ieee.org
1296 Christopher Faylor <cgf@timesys.com>
1298 * environ.cc (getearly): Use GetEnvironmentVariable and cmalloc instead
1299 of GetEnvironmentStrings.
1300 (environ_init): Revert rawenv stuff.
1302 2006-04-21 Christopher Faylor <cgf@timesys.com>
1304 * environ.cc (rawenv): Make this variable a file-scope static.
1305 (getearly): Rename 's' variable to 'len' since 's' is used fairly
1306 consistently throughout cygwin as a string variable. Remove rawenv
1307 declaration. Perform other minor cleanups.
1308 (environ_init): Remove rawenv declaration. Only set rawenv to
1309 GetEnvironmentStrings() if it has not already been set. Properly free
1310 rawenv in all cases.
1312 2006-04-21 Christopher Faylor <cgf@timesys.com>
1314 * tty.h (tty::hwnd): Move to tty_min.
1315 (tty::gethwnd): Ditto.
1316 (tty::sethwnd): Ditto.
1317 (tty_min::hwnd): Receive variable from tty class.
1318 (tty_min::gethwnd): Receive function from tty classs.
1319 (tty_min::sethwnd): Ditto.
1320 * dtable.cc (dtable::stdio_init): Only call init_console_handler when
1321 we actually own the console.
1322 * fhandler_console.cc (fhandler_console::get_tty_stuff): Set tty's hwnd
1324 * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Semi-reinstate
1325 handling of console when pgrp is set.
1327 2006-04-21 Pierre Humblet <Pierre.Humblet@ieee.org>
1328 Corinna Vinschen <corinna@vinschen.de>
1330 * environ.cc (getearly): New function.
1331 (findenv_func): New function pointer, predefined to getearly.
1332 (getenv): Call findenv function over the findenv_func pointer.
1333 (environ_init): Change findenv_func pointer to my_findenv after Cygwin
1334 environment is initialized.
1336 2006-04-21 Lars Munch <lars@segv.dk>
1338 * include/asm/byteorder.h (__ntohl): Fix the missing uint32_t.
1340 2006-04-21 Corinna Vinschen <corinna@vinschen.de>
1342 * fhandler_socket.cc (fhandler_socket::wait): Reorder setting
1343 WSAError to avoid spurious errors with WSAError set to 0.
1345 2006-04-21 Corinna Vinschen <corinna@vinschen.de>
1347 * include/asm/byteorder.h: Include stdint.h. Per standard, change
1348 datatypes in ntohX and htonX functions to uintXX_t types.
1350 2006-04-18 Christopher Faylor <cgf@timesys.com>
1352 * exceptions.cc (ctrl_c_handler): Only exit TRUE on CTRL_LOGOFF_EVENT
1353 when we have actually handled the event.
1355 2006-04-17 Eric Blake <ebb9@byu.net>
1357 * mktemp.cc (_gettemp): Open temp files in binary mode.
1359 2006-04-14 Corinna Vinschen <corinna@vinschen.de>
1361 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Use UINT32_MAX
1362 instead of UINT_MAX.
1364 2006-04-14 Corinna Vinschen <corinna@vinschen.de>
1366 * fhandler_disk_file.cc (path_conv::hasgood_inode): Make inline.
1367 Drop remote fs handling entirely since unreliable inode numbers
1368 are now recognized differently.
1369 (path_conv::is_samba): Make inline.
1370 (fhandler_disk_file::opendir): Reformat comment.
1371 (fhandler_base::fstat_helper): Special case remote file systems
1372 returning (unreliable) 32 bit inode numbers.
1373 (fhandler_disk_file::readdir): Ditto.
1374 * fhandler_netdrive.cc (fhandler_netdrive::readdir): Ditto.
1376 2006-04-13 Christopher Faylor <cgf@timesys.com>
1378 * spawn.cc (spawn_guts): Move ch.set() call back to where it was
1381 2006-04-13 Corinna Vinschen <corinna@vinschen.de>
1383 * sysconf.cc (sysconf): Add _SC_THREADS, _SC_THREAD_ATTR_STACKSIZE,
1384 _SC_THREAD_PRIORITY_SCHEDULING, _SC_THREAD_PROCESS_SHARED,
1385 _SC_THREAD_SAFE_FUNCTIONS, _SC_TIMERS handling.
1387 2006-04-12 Corinna Vinschen <corinna@vinschen.de>
1388 Christopher Faylor <cgf@timesys.com>
1390 * spawn.cc (spawn_guts): Revert patch which treated derived cygwin
1391 programs differently from those which are mounted with -X. Pass extra
1392 argument to linebuf::fromargv.
1393 * winf.h (MAXCYGWINCMDLEN): New define.
1394 (linebuf::finish): Add a new argument denoting when command line
1396 (linebuf::fromargv): Ditto.
1397 * winf.cc (linebuf::finish): Implement above change.
1398 (linebuf::fromargv): Ditto.
1400 2006-04-11 Christopher Faylor <cgf@timesys.com>
1402 * Makefile.in (DLL_OFILES): Add winf.o.
1403 * spawn.cc: Move command line handling stuff into winf.cc.
1405 * winf.cc: New file.
1407 2006-04-05 Christopher Faylor <cgf@timesys.com>
1409 * fhandler_socket.cc: Move iptypes.h include after winsock2 since it
1413 2006-04-05 Christopher Faylor <cgf@timesys.com>
1415 * dcrt0.cc (dll_crt0_0): Move user_data->{resourcelocks,threadinterface}
1416 initialization here from dll_crt0_1.
1417 (dll_crt0_1): See above.
1419 2006-04-04 Corinna Vinschen <corinna@vinschen.de>
1421 * net.cc (fdsock): Raise default SO_RCVBUF/SO_SNDBUF buffer sizes to
1422 the same values as on Linux.
1424 2006-04-03 Christopher Faylor <cgf@timesys.com>
1426 * child_info.h (CURR_CHILD_INFO_MAGIC): Update.
1427 (child_info_fork::alloc_stack): Move into this class.
1428 (child_info_fork::alloc_stack_hard_way): Ditto.
1429 * dcrt0.cc (child_info_fork::alloc_stack): Ditto.
1430 (child_info_fork::alloc_stack_hard_way): Ditto.
1431 (_dll_crt0): Reference alloc_stack via fork_info.
1433 2006-04-03 Corinna Vinschen <corinna@vinschen.de>
1435 * spawn.cc (linebuf::finish): Drop argument. Don't check command line
1437 (spawn_guts): Remove wascygexec. Check real_path.iscygexec instead.
1438 Accommodate change to linebuf::finish.
1440 2006-04-03 Christopher Faylor <cgf@timesys.com>
1442 * dcrt0.cc (sm): Delete.
1443 (alloc_stack_hard_way): Figure out where the stack lives here rather
1444 than relying on previously filled out information which has been
1445 invalid since 1.5.19.
1447 2006-03-31 Corinna Vinschen <corinna@vinschen.de>
1449 * fhandler_disk_file.cc (FS_IS_SAMBA_WITH_QUOTA): New define.
1450 (path_conv::hasgood_inode): Recognize Samba with quota support
1452 (path_conv::is_samba): Ditto. Fix comment to include Samba version
1453 numbers for later reference.
1455 2006-03-30 Corinna Vinschen <corinna@vinschen.de>
1457 * security.h (sec_user_nih): Make sid1 argument mandatory.
1460 2006-03-29 Christopher Faylor <cgf@timesys.com>
1462 * sigproc.cc (wait_for_sigthread): Use the current user sid when
1463 setting up the signal pipe rather than relying on (eventually) the
1466 2006-03-29 Christopher Faylor <cgf@timesys.com>
1468 * dcrt0.cc (child_info_fork::handle_fork): Set uid/gid in myself so
1469 that it can be used by subsequent startup functions.
1470 (dll_crt0_0): Issue a warning if DuplicateTokenEx fails and DEBUGGING.
1471 (dll_crt0_1): Move user_data->{resourcelocks,threadinterface}
1472 initialization here from dll_crt0_0.
1473 * fork.cc (frok::child): Tell wait_for_sigthread that this is fork.
1474 (frok::parent): Only initialize start_time once. Tighten time when
1475 we're "deimpersonated".
1476 * sigproc.cc (signal_fixup_after_exec): Rework (futiley) sa_buf stuff.
1477 Add debugging output.
1478 (wait_for_sigthread): Accept an argument which illustrates whether we
1480 (wait_sig): Avoid using myself pointer.
1481 * winsup.h ((wait_for_sigthread): Reflect change to argument.
1483 2006-03-26 Christopher Faylor <cgf@timesys.com>
1485 * spawn.cc (spawn_guts): Close handles if we know that we will not be
1486 seeing a sync event from the child.
1488 2006-03-26 Christopher Faylor <cgf@timesys.com>
1490 * sigproc.cc (wait_sig): Move myself manipulation...
1491 (wait_for_sigthread): ...to here.
1493 2006-03-24 Corinna Vinschen <corinna@vinschen.de>
1495 * fhandler_floppy.cc: Include ntdef.h and ntdll.h.
1496 (fhandler_dev_floppy::get_drive_info): Rearrange so that now
1497 NtQueryVolumeInformationFile is called on drives which don't support
1498 IOCTL_DISK_GET_DRIVE_GEOMETRY.
1499 * ntdll.h (struct _FILE_FS_SIZE_INFORMATION): Add.
1500 (enum _FSINFOCLASS): Add missing values.
1502 2006-03-23 Christopher Faylor <cgf@timesys.com>
1504 * fhandler_console.cc (fhandler_console::fixup_after_fork_exec): Make
1505 error message more explicit.
1506 * pinfo.cc (_pinfo::commune_request): Don't lock process unless we're
1509 2006-03-23 Christopher Faylor <cgf@timesys.com>
1511 * dcrt0.cc (child_info_spawn::handle_spawn): Don't initialize the
1512 console handler here.
1513 * dtable.cc (dtable::stdio_init): Initialize console handler here.
1515 2006-03-23 Christopher Faylor <cgf@timesys.com>
1517 * sigproc.cc (sigalloc): Don't set SA_RESTART here.
1518 * signal.cc (_SA_NORESTART): New flag.
1519 (sigaction_worker): New function, derived from sigaction. Don't set
1520 internal flags unless called internally.
1521 (sigaction): Use sigaction_worker.
1522 (signal): Honor new _SA_NORESTART flag.
1523 (siginterrupt): Set _SA_NORESTART flag appropriately. Use
1524 sigaction_worker to set flags.
1525 * include/cygwin/signal.h: Define _SA_INTERNAL_MASK here.
1527 2006-03-22 Corinna Vinschen <corinna@vinschen.de>
1529 * thread.cc (pthread_mutex::is_good_initializer_or_bad_object): Delete.
1530 (pthread_cond::is_good_initializer_or_bad_object): Delete.
1531 (pthread_rwlock::is_good_initializer_or_bad_object): Delete.
1532 (pthread_cond::init): Remove disabled code. Guard assignment to
1533 object to initialize against access violation.
1534 (pthread_rwlock::init): Ditto.
1535 (pthread_mutex::init): Ditto.
1537 2006-03-22 Eric Blake <ebb9@byu.net>
1539 * fhandler.cc (fcntl): Print flags in hex.
1541 2006-03-22 Christopher Faylor <cgf@timesys.com>
1543 * dcrt0.cc (dll_crt0_0): Semi-revert 2006-03-14 change which moved
1544 pinfo_init and uinfo_init here.
1545 (dll_crt0_1): Ditto.
1546 (__dll_crt0): Ditto. Don't call update_envptrs here.
1547 (dll_crt0_1): Ditto. Move wait_for_sigthread call here from dll_crt0_0.
1548 * environ.cc (environ_init): Call it here instead.
1549 * sigproc.cc (my_readsig): New static variable.
1550 (wait_for_sigthread): Set up read pipe here since we are assured that
1551 we have the proper privileges when this is called.
1552 (talktome): Eliminate second argument since it is available as a global
1554 (wait_sig): Reflect use of my_readsig.
1556 2006-03-22 Corinna Vinschen <corinna@vinschen.de>
1558 * thread.cc (pthread_cond::init): Disable validity test of object
1559 to initialize since test of uninitialized content is unreliable.
1560 (pthread_rwlock::init): Ditto.
1561 (pthread_mutex::init): Ditto.
1563 2006-03-21 Christopher Faylor <cgf@timesys.com>
1565 * signal.cc (signal): Don't set SA_RESTART here.
1566 (siginterrupt): White space.
1567 * sigproc.cc (sigalloc): Set SA_RESTART here, on initialization.
1569 2006-03-21 Christopher Faylor <cgf@timesys.com>
1571 * child_info.h (child_status): Fix typo which made it impossible to set
1573 (child_info::isstraced): Booleanize.
1574 (child_info::iscygwin): Ditto.
1575 * sigproc.cc (child_info::child_info): Minor cleanup of flag setting.
1576 * spawn.cc (spawn_guts): Only close_all_files when we know the process
1577 has started successfully.
1579 * exceptions.cc (init_console_handler): Fix indentation.
1581 2006-03-20 Christopher Faylor <cgf@timesys.com>
1583 * dcrt0.cc (dll_crt0_0): Call SetErrorMode earlier.
1584 * pinfo.cc (_pinfo::dup_proc_pipe): Reset wr_proc_pipe on failure.
1585 Return previous pipe handle.
1586 * pinfo.h (_pinfo::dup_proc_pipe): Reflect change to return value.
1587 * spawn.cc (spawn_guts): Restore previous proc pipe on retry or if
1588 process exits before synchronization.
1590 2006-03-20 Christopher Faylor <cgf@timesys.com>
1592 * child_info.h (child_status): New enum.
1593 (child_info::flag): Rename from 'straced'.
1594 (child_info::isstraced): New function.
1595 (child_info::iscygwin): Ditto.
1596 (child_info_fork::handle_fork): Reparmize.
1597 (child_info_fork::handle_failure): Ditto.
1598 (child_info_spawn::handle_spawn): New function.
1599 * dcrt0.cc (get_cygwin_startup_info): Use isstraced method.
1600 (child_info_spawn::handle_spawn): Define new function from code
1601 previously in dll_crt0_0.
1602 (dll_crt0_0): Move spawn stuff into handle_spawn. Only call
1603 init_console_handler for fork case.
1604 * sigproc.cc (child_info::child_info): Set flag appropriately.
1605 (child_info::proc_retry): Treat exit code as "funny" if it's a cygwin
1607 * spawn.cc (spawn_guts): Remove commented out flag setting.
1609 2006-03-19 Christopher Faylor <cgf@timesys.com>
1611 * pinfo.cc (commune_process): Fix randomly invalid pointer which caused
1612 fifos to work incorrectly.
1614 2006-03-19 Christopher Faylor <cgf@timesys.com>
1616 * dcrt0.cc (dll_crt0_0): Oops. We need to bother with setting
1617 init_console_handler in the fork/exec case.
1619 2006-03-19 Christopher Faylor <cgf@timesys.com>
1621 * dcrt0.cc (dll_crt0_0): Don't bother with setting init_console_handler
1622 here since it will be set later when we discover if we have a ctty or
1624 * exceptions.cc (init_console_handler): Properly remove NULL handler.
1626 2006-03-18 Christopher Faylor <cgf@timesys.com>
1628 * pinfo.h (EXITCODE_OK): Define new constant.
1629 * sigproc.cc (child_info::sync): Return EXITCODE_OK if entering with
1631 (sig_send): Don't complain if sending signals while blocked if the
1632 sender isn't in the main thread.
1634 2006-03-18 Christopher Faylor <cgf@timesys.com>
1636 * child_info.h (CURR_CHILD_INFO_MAGIC): Regenerate.
1637 (child_info::retry): Move here from fork subclass.
1638 (child_info::exit_code): New field.
1639 (child_info::retry_count): Max retry count for process start.
1640 (child_info::proc_retry): Declare new function.
1641 (child_info_fork::retry): Move to parent.
1642 (child_info_fork::fork_retry): Ditto.
1643 * dcrt0.cc (child_info::fork_retry): Rename and move.
1644 (child_info_fork::handle_failure): Move.
1645 (dll_crt0_0): Initialize console handler based on whether we have a
1646 controlling tty or not. Avoid nonsensical check for fork where it can
1648 * environ.cc (set_proc_retry): Rename from set_fork_retry. Set
1649 retry_count in child_info.
1650 (parse_thing): Reflect above change.
1651 * exceptions.cc (dummy_ctrl_c_handler): Remove unused variable name.
1652 (ctrl_c_handler): Always return TRUE for the annoying
1654 * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Remove call to
1655 init_console_handler.
1656 * fhandler_tty.cc (fhandler_tty_slave::open): Just call
1657 mange_console_count here and let it decide what to do with initializing
1658 console control handling.
1659 * fork.cc (fork_retry): Remove definition.
1660 (frok::parent): Define static errbuf and use in error messages (not
1661 thread safe yet). Close pi.hThread as soon as possible. Protect
1662 pi.hProcess as soon as possible. Don't set retry_count. That happens
1663 automatically in the constructor now. Accommodate name change from
1664 fork_retry to proc_retry.
1665 * init.cc (dll_entry): Turn off ctrl-c handling early until we know how
1666 it is supposed to be handled.
1667 * pinfo.cc (_pinfo::dup_proc_pipe): Remember original proc pipe value
1668 for failure error message. Tweak debug message slightly.
1669 * sigproc.cc (child_info::retry_count): Define.
1670 (child_info::child_info): Initialize retry count.
1671 (child_info::sync): Set exit code if process dies before
1673 (child_info::proc_retry): Rename from child_info_fork::fork_retry. Use
1674 previously derived exit code. Be more defensive about what is
1675 classified as an error exit.
1676 (child_info_fork::handle_failure): Move here from dcrt0.cc.
1677 * spawn.cc (spawn_guts): Maintain error mode when starting new process
1678 to avoid annoying pop ups. Move deimpersonate call within new loop.
1679 Move envblock freeing to end. Loop if process dies prematurely with
1681 * syscalls.cc (setpgid): Remove hopefully unneeded call to
1682 init_console_handler.
1684 2006-03-15 Christopher Faylor <cgf@timesys.com>
1686 * cygheap.cc (init_cygheap::manage_console_count): Turn console control
1687 handler on/off depending on whether we have allocated a console or not.
1688 * dcrt0.cc (child_info_fork::fork_retry): Add more potential retry
1690 (dll_crt0_0): Turn on/off console control depending on whether we have
1691 a controlling tty or not.
1692 * exceptions.cc (init_console_handler): Change BOOL to bool.
1693 * fhandler_console.cc (fhandler_console::need_invisible): Cosmetic
1695 * winsup.h (init_console_handler): Reflect argument type change.
1697 * wincap.h (supports_setconsolectrlhandler_null): Remove duplicate
1698 capability throughout.
1701 2006-03-14 Christopher Faylor <cgf@timesys.com>
1703 * child_info.h (child_info_fork::fork_retry): Declare new function.
1704 * dcrt0.cc (child_info_fork::fork_retry): Define new function.
1705 * fork.cc (frok::parent): Move retry decision into
1706 child_info_fork::fork_retry and honor what it tells us to do.
1707 * sigproc.cc (sig_send): Unhold signals on __SIGEXIT.
1709 2006-03-14 Christopher Faylor <cgf@timesys.com>
1711 * fork.cc (frok::parent): Improve error message.
1713 2006-03-14 Christopher Faylor <cgf@timesys.com>
1715 * dcrt0.cc (main_environ): Initialize to &__cygwin_environment.
1716 (dll_crt0_1): Move resourcelocks, thread interface, pinfo_init, and
1718 (dll_crt0_0): ...to here.
1719 (_dll_crt0): Call update_envptrs here after setting main_environ.
1720 * environ.cc (environ_init): Eliminate initted variable. Don't call
1721 update_envptrs here.
1722 * sigproc.cc (wait_sig): Use my_sendsig when calling CreatePipe to
1723 avoid a dereference.
1725 2006-03-13 Christopher Faylor <cgf@timesys.com>
1727 * child_info.h (child_info_fork::handle_failure): Declare new function.
1728 (child_info_fork::retry): New field.
1729 * dcrt0.cc (__api_fatal_exit_val): Define.
1730 (child_info_fork::handle_failure): Define new function.
1731 (__api_fatal): Exit using __api_fatal_exit_val value.
1732 * environ.cc (set_fork_retry): Set fork_retry based on CYGWIN
1733 environment variable.
1734 (parse_thing): Add "fork_retry" setting.
1735 * fork.cc (fork_retry): Define.
1736 (frok::parent): Reorganize to allow retry of failed child creation if
1737 child signalled that it was ok to do so.
1738 * heap.cc (heap_init): Signal parent via handle_failure when
1740 * pinfo.h (EXITCODE_RETRY): Declare.
1741 * sigproc.cc (child_info::sync): Properly exit with failure condition
1742 if called for fork and didn't see subproc_ready.
1743 * spawn.cc (spawn_guts): Use windows pid as first argument.
1744 * winsup.h: Remove obsolete NEW_MACRO_VARARGS define.
1745 (__api_fatal_exit_val): Declare.
1746 (set_api_fatal_return): Define.
1747 (in_dllentry): Declare.
1748 * exceptions.cc (inside_kernel): Remove unneeded in_dllentry
1751 2006-03-13 Christopher Faylor <cgf@timesys.com>
1753 * dcrt0.cc (dll_crt0_0): Reorganize so that sigproc_init is called a
1754 little later. Add a comment.
1755 * fork.cc (resume_child): Make void.
1756 (frok::parent): Only zero pi when necessary. Explicitly zero si. Set
1757 this_errno when child_copy fails. Accommodate change to resume_child.
1758 * sigproc.cc (sigalloc): Move global_sigs initialization here.
1759 (sigproc_init): Move global_sigs.
1760 (sig_send): Just check for flush signals once.
1762 * wincap.h: Define supports_setconsolectrlhandler_null throughout.
1765 2006-03-13 Corinna Vinschen <corinna@vinschen.de>
1767 * autoload.cc (LoadDLLfuncNt): New define to wrap NT native functions.
1768 Use for NT native functions throughout.
1769 * dtable.cc (handle_to_fn): Treat return value of NtQueryObject as
1772 2006-03-12 Christopher Faylor <cgf@timesys.com>
1774 * cygtls.cc (_cygtls::remove): Reset initialized flag right away if we
1775 were previously initialized.
1776 * cygtls.h (_cygtls::initialized): Move nearer to the end to catch
1777 situation when Windows 98 mysteriously changes parts of _my_tls when
1778 thread is detaching.
1779 * gendef (__sigfe_maybe): Simplify slightly.
1780 * tlsoffsets.h: Regenerate.
1782 2006-03-12 Christopher Faylor <cgf@timesys.com>
1784 * cygtls.h (CYGTLS_INITIALIZED): Change to a little more unlikely value.
1785 (CYGTLSMAGIC): Delete.
1786 * dcrt0.cc (dll_crt0_0): Call sigproc_init during init startup.
1787 (_dll_crt0): Don't worry about sync_startup. Just wait for sigthread here.
1788 * dll_init.cc (cygwin_detach_dll): Only pick up tls version of retaddr
1789 if we have a valid tls.
1790 * fork.cc (frok::child): Remove sigproc_init initialization since it
1791 happens much earlier now.
1792 * gendef: Recognize SIGFE_MAYBE.
1793 (fefunc): Generate calls to _sigfe_maybe, if appropriate.
1794 (_sigfe_maybe): New function.
1795 * init.cc (search_for): Always initialize search_for, even on fork.
1796 (calibration_thread): Delete.
1797 (calibration_id): Delete.
1798 (prime_threads): Delete.
1799 (munge_threadfunc): Remove calibration_thread special case. Avoid
1800 calling thread function if we haven't yet hit the "search_for" thread.
1801 (dll_entry): Remove prime_threads call. Only call munge_threadfunc
1802 when hwait_sig is active. Ditto. for _my_tls.remove ();
1803 * sigproc.cc (hwait_sig): Make global.
1804 (sigproc_init): Don't bother with sync_startup.
1805 (sig_send): Treat flush as a no-op when signals are held.
1806 (wait_sig): Cause signals to be held after fork.
1808 2006-03-09 Corinna Vinschen <corinna@vinschen.de>
1810 * syscalls.cc (rename): Move existance check for oldpath further up
1811 to the start of the function. Avoid another case of a name collision
1812 if oldpath is a shortcut and a file or directory newpath already exists.
1814 2006-03-09 Corinna Vinschen <corinna@vinschen.de>
1816 * autoload.cc (NtClose): Define.
1817 (NtOpenDirectoryObject): Define.
1818 (NtQueryDirectoryObject): Define.
1819 * fhandler_proc.cc: Include ctype.h and wchar.h.
1820 (format_proc_partitions): Revamp loop over existing harddisks by
1821 scanning the NT native \Device object directory and looking for
1823 * ntdll.h: Rearrange system call declarations alphabetically.
1824 (DIRECTORY_QUERY): Define.
1825 (struct _DIRECTORY_BASIC_INFORMATION): Define.
1826 (NtOpenDirectoryObject): Declare.
1827 (NtQueryDirectoryObject): Declare.
1829 2006-03-08 Christopher Faylor <cgf@timesys.com>
1831 * cygtls.h (_cygtls::retaddr): New method.
1832 * dll_init.cc (cygwin_detach_dll): Use new tls method to find return
1833 address since this function is now signal guarded.
1834 (update_envptrs): Remove unneeded braces.
1835 * syscalls.cc (statvfs): Coerce full_path to avoid a gcc warning.
1837 2006-03-08 Corinna Vinschen <corinna@vinschen.de>
1839 * syscalls.cc (statvfs): Simplify path name expression.
1841 2006-03-08 Corinna Vinschen <corinna@vinschen.de>
1843 * syscalls.cc: Include winioctl.h.
1844 (statvfs): Request correct volume size using DeviceIoControl if
1845 quotas are enforced on the file system.
1847 2006-03-03 Corinna Vinschen <corinna@vinschen.de>
1849 * dir.cc (opendir): Fix indentation.
1850 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Move storing
1851 fhandler in file descriptor table to some point very late in function
1852 to avoid double free'ing. Add comment to explain what happens.
1853 Add label free_mounts and don't forget to delete __DIR_mounts structure
1854 if NtOpenFile fails.
1856 2006-03-02 Corinna Vinschen <corinna@vinschen.de>
1858 * syscalls.cc (chroot): Disallow chroot into special directories.
1859 Return EPERM instead.
1861 2006-03-02 Corinna Vinschen <corinna@vinschen.de>
1863 * fhandler_disk_file.cc (__DIR_mounts::check_missing_mount): Check
1864 cygdrive string length for those who have cygdrive mapped to "/".
1866 2006-03-01 Corinna Vinschen <corinna@vinschen.de>
1868 * sec_helper.cc (set_cygwin_privileges): Request SE_BACKUP_NAME
1871 2006-03-01 Corinna Vinschen <corinna@vinschen.de>
1873 * fhandler_proc.cc (fhandler_proc::fstat): Always return fixed link
1874 count of 1 for /proc directory instead of incorrect PROC_LINK_COUNT.
1876 2006-03-01 Corinna Vinschen <corinna@vinschen.de>
1878 * fhandler.h (enum dirent_states): Remove dirent_saw_cygdrive,
1879 dirent_saw_dev and dirent_saw_proc.
1880 (fhandler_cygdrive::open): Declare.
1881 (fhandler_cygdrive::close): Declare.
1882 * fhandler_disk_file.cc (class __DIR_mounts): Move to beginning of file.
1883 (__DIR_mounts::check_mount): New parameter to indicate if inode number
1884 is needed in calling function or not. Add /proc and /cygdrive handling.
1885 (__DIR_mounts::check_missing_mount): Ditto.
1886 (path_conv::ndisk_links): Use __DIR_mounts class to create correct
1887 hardlink count for directories with mount points in them.
1888 (fhandler_disk_file::readdir_helper): Remove /dev, /proc and /cygdrive
1890 (fhandler_cygdrive::open): New method.
1891 (fhandler_cygdrive::close): New method.
1892 (fhandler_cygdrive::fstat): Always return fixed inode number 2 and
1893 fixed link count of 1. Drop call to set_drives.
1894 (fhandler_cygdrive::opendir): Drop call to get_namehash.
1895 (fhandler_cygdrive::readdir): Handle "." entry to return fixed inode
1898 2006-03-01 Christopher Faylor <cgf@timesys.com>
1900 * cygwin.din: Fix some erroneous SIGFE/NOSIGFE settings.
1902 2006-03-01 Christopher Faylor <cgf@timesys.com>
1904 * cygthread.cc (cygthread::callfunc): Revert below change. Make ev a
1905 manual reset event again. so that it will be reset by WaitFor*Object
1907 (cygthread::stub): Ditto.
1908 (cygthread::terminate_thread): Reset ev if it was found to have been
1911 2006-03-01 Christopher Faylor <cgf@timesys.com>
1913 * analyze_sigfe: New script.
1914 * dllfixdbg: Add copyright.
1916 * gendevices: Ditto.
1917 * gentls_offsets: Ditto.
1919 2006-03-01 Christopher Faylor <cgf@timesys.com>
1921 * cygthread.cc (cygthread::callfunc): Create ev as an auto-reset event
1922 so that it will be reset by WaitFor*Object as appropriate.
1923 (cygthread::stub): Ditto.
1924 (cygthread::terminate_thread): Remove forced setting of thread
1927 2006-03-01 Corinna Vinschen <corinna@vinschen.de>
1929 * include/sys/dirent.h (struct __DIR): Rename __d_unused to
1931 * fhandler_disk_file.cc (struct __DIR_cache): Remove useless "typedef".
1932 (d_dirname): Remove useless "struct".
1933 (d_cachepos): Ditto.
1935 (class __DIR_mounts): New class, implementing mount point tracking
1937 (d_mounts): New macro for easy access to __DIR_mounts structure.
1938 (fhandler_disk_file::opendir): Allocate __DIR_mounts structure and
1939 let __d_internal element of dir point to it.
1940 (fhandler_disk_file::readdir_helper): Add mount points in the current
1941 directory, which don't have a real directory backing them.
1942 Don't generate an inode number for /dev. Add comment, why.
1943 (fhandler_disk_file::readdir): Move filling fname to an earlier point.
1944 Check if current entry is a mount point and evaluate correct inode
1946 (fhandler_disk_file::readdir_9x): Ditto.
1947 (fhandler_disk_file::rewinddir): Set all mount points in this directory
1948 to "not found" so that they are listed again after calling rewinddir().
1949 (fhandler_disk_file::closedir): Deallocate __DIR_mounts structure.
1950 * path.cc (mount_info::get_mounts_here): New method to evaluate a list
1951 of mount points in a given parent directory.
1952 * shared_info.h (class mount_info): Declare get_mounts_here.
1954 2006-02-28 Corinna Vinschen <corinna@vinschen.de>
1956 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Use iscygdrive
1957 instead of isspecial.
1958 * path.h (path_conv::iscygdrive): New method.
1960 2006-02-28 Christopher Faylor <cgf@timesys.com>
1962 * exceptions.cc (_cygtls::interrupt_now): Remove "inside cygwin" check
1963 since some cygwin functions are meant to be interrupted.
1965 2006-02-28 Corinna Vinschen <corinna@vinschen.de>
1967 * cygwin.din: Export __isinff, __isinfd, __isnanf, __isnand.
1968 * include/cygwin/version.h: Bump API minor number to 155.
1970 2006-02-28 Corinna Vinschen <corinna@vinschen.de>
1972 * dir.cc (readdir_worker): Use slash as path separator when evaluating
1973 namehash for paths below /proc.
1974 * fhandler_netdrive.cc (fhandler_netdrive::readdir): Use expensive
1975 inode number evaluation on share names.
1977 2006-02-27 Christopher Faylor <cgf@timesys.com>
1979 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Only set
1980 d_cachepos under NT or suffer memory corruption.
1981 (fhandler_disk_file::readdir_helper): Avoid else with a return. Just
1982 calculate extension location once when doing symlink checks.
1983 (fhandler_disk_file::readdir): Make debug output more useful.
1984 (fhandler_disk_file::readdir_9x): Ditto. Eliminate redundant variable.
1986 2006-02-27 Christopher Faylor <cgf@timesys.com>
1988 * include/sys/termios.h (cfsetispeed): Just define as a function rather
1989 than resorting to a macro.
1990 (cfsetospeed): Ditto.
1992 2006-02-27 Christopher Faylor <cgf@timesys.com>
1994 * sigproc.cc: Fix a comment.
1996 2006-02-27 Christopher Faylor <cgf@timesys.com>
1998 * cygthread.cc (cygthread::release): Add a comment.
2000 2006-02-27 Corinna Vinschen <corinna@vinschen.de>
2002 * fhandler_netdrive.cc (fhandler_netdrive::fstat): Create unambiguous
2004 (fhandler_netdrive::readdir): Ditto.
2006 2006-02-24 Christopher Faylor <cgf@timesys.com>
2008 * sigproc.cc (sigheld): Define new variable.
2009 (sig_dispatch_pending): Don't check sigq since that's racy.
2010 (sig_send): Set sigheld flag if __SIGHOLD is specified, reset it if
2011 __SIGNOHOLD is specified. Ignore flush signals if we're holding
2014 2006-02-23 Christopher Faylor <cgf@timesys.com>
2016 * cygwin.din (_exit): Use signal front end.
2019 2006-02-23 Christopher Faylor <cgf@timesys.com>
2021 * winsup.h (cygwin_hmodule): Declare.
2022 * exceptions.cc (inside_kernel): Reverse return values to reflect
2023 function name. Return true if we're in cygwin1.dll or if we're
2024 executing in dll_entry.
2025 (_cygtls::interrupt_now): Reflect reversal of inside_kernel return
2027 * hookapi.cc (cygwin_hmodule): Remove declaration.
2028 * init.cc (dll_entry): Use in_dllentry global to record that we are
2029 executing in dllentry.
2031 2006-02-22 Corinna Vinschen <corinna@vinschen.de>
2033 * exceptions.cc (_cygtls::interrupt_now): Reorder conditional
2034 to call inside_kernel only if this isn't locked.
2036 2006-02-22 Corinna Vinschen <corinna@vinschen.de>
2038 * fhandler.cc (fhandler_base::open): Add FILE_READ_ATTRIBUTES to
2039 access flags in case of query_read_control case, add FILE_READ_DATA
2040 in case of query_stat_control.
2042 2006-02-20 Christopher Faylor <cgf@timesys.com>
2044 * spawn.cc (av::fixup): Check for .bat and friends specifically now
2045 since these extensions are no longer automatically detected.
2047 2006-02-19 Christopher Faylor <cgf@timesys.com>
2049 * exceptions.cc (stackdump): Avoid dumping more than once.
2051 2006-02-19 Christopher Faylor <cgf@timesys.com>
2053 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Use NtOpenFile
2054 to open the directory.
2055 (fhandler_disk_file::readdir): Use NT_SUCCESS to determine if status
2058 2006-02-19 Corinna Vinschen <corinna@vinschen.de>
2060 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Drop generating
2063 2006-02-18 Corinna Vinschen <corinna@vinschen.de>
2065 * fhandler_disk_file.cc (FS_IS_SAMBA): Move out of
2066 path_conv::hasgood_inode.
2067 (path_conv::is_samba): New method.
2068 (fhandler_base::fstat_by_handle): Don't even try to use
2069 FileIdBothDirectoryInformation on Samba.
2070 * path.h (class path_conv): Declare is_samba method.
2072 2006-02-17 Christopher Faylor <cgf@timesys.com>
2074 * path.cc (conv_path_list): Eat empty paths when converting to POSIX.
2075 (cygwin_conv_to_win32_path): Deal with Cygwin's necessity of adding a
2076 '/' to the end of a path ending in '.'.
2078 2006-02-16 Corinna Vinschen <corinna@vinschen.de>
2080 * cygwin.din: Export sigignore and sigset.
2081 * exceptions.cc (sigset): New function.
2082 (sigignore): New function.
2083 * include/cygwin/signal.h (SIG_HOLD): Define.
2084 (sigignore): Declare.
2086 * include/cygwin/version.h: Bump API minor number to 154.
2088 2006-02-13 Igor Peshansky <pechtcha@cs.nyu.edu>
2090 * include/mntent.h: Add missing #include.
2092 2006-02-13 Igor Peshansky <pechtcha@cs.nyu.edu>
2094 * gentls_offsets: Fix typo in error message.
2096 2006-02-10 Christopher Faylor <cgf@timesys.com>
2098 * fhandler_process.cc (format_process_stat): Use cygwin-derived start
2099 time even on NT since it is the logical start time of the "process".
2100 * pinfo.cc (set_myself): Don't set start time when it should have
2101 already been set previously.
2103 2006-02-10 Brian Ford <Brian.Ford@FlightSafety.com>
2105 * times.cc (clock_getres): Use correct conversion from milliseconds to
2106 seconds/nanoseconds.
2107 (clock_setres): Use correct conversion to nanoseconds.
2109 2006-02-10 Christopher Faylor <cgf@timesys.com>
2111 * external.cc (sync_winenv): Rename from "setup_winenv". Use same
2112 mechanism as spawn to determine environment variables which should be
2113 converted back to windows form.
2114 (cygwin_internal): Reflect setup_winenv -> sync_winenv name change.
2115 * include/sys/cygwin.h: Ditto.
2117 2006-02-09 Corinna Vinschen <corinna@vinschen.de>
2119 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Only set
2120 the dirent_get_d_ino flag on filesystems having useful File IDs.
2121 Add comment explaining why.
2123 2006-02-07 Corinna Vinschen <corinna@vinschen.de>
2125 * dtable.cc (handle_to_fn): Accommodate new argument order in call to
2127 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Call sys_wcstombs
2128 instead of just wcstombs to accommodate OEM codepages.
2129 * miscfuncs.cc (sys_wcstombs): Split len argument in source and target
2130 length. Always 0-terminate result in target string.
2131 * security.cc (lsa2wchar): Remove unused function.
2133 (get_lsa_srv_inf): Ditto.
2134 (get_logon_server): Accommodate new argument order in call to
2136 (get_user_groups): Ditto.
2137 (get_user_local_groups): Ditto.
2138 (get_priv_list): Call sys_wcstombs directly instead of lsa2str.
2139 * uinfo.cc (cygheap_user::ontherange): Accommodate new argument order
2140 in call to sys_wcstombs.
2141 * winsup.h (sys_wcstombs): Change prototype to match new argument order.
2143 2006-02-07 Corinna Vinschen <corinna@vinschen.de>
2145 * init.cc (respawn_wow64_process): Exit with the exit code returned
2146 by the respawned process.
2148 2006-02-06 Christopher Faylor <cgf@timesys.com>
2150 Always zero all elements of siginfo_t throughout.
2151 * cygtls.h (_cygtls::thread_context): Declare new field.
2152 (_cygtls::thread_id): Ditto.
2153 (_cygtls::signal_exit): Move into this class.
2154 (_cygtls::copy_context): Declare new function.
2155 (_cygtls::signal_debugger): Ditto.
2156 * cygtls.cc (_cygtls::init_thread): Fill out thread id field.
2157 * exceptions.cc (exception): Change message when exception info is
2158 unknown. Copy context to thread local storage.
2159 (_cygtls::handle_exceptions): Avoid double test for fault_guarded.
2160 Reflect move of signal_exit to _cygtls class.
2161 (sigpacket::process): Copy context to thread local storage.
2162 (_cygtls::signal_exit): Move to _cygtls class. Call signal_debugger to
2163 notify debugger of exiting signal (WIP). Call stackdump here (WIP).
2164 (_cygtls::copy_context): Define new function.
2165 (_cygtls::signal_debugger): Ditto.
2166 * tlsoffsets.h: Regenerate.
2167 * include/cygwin.h (_fpstate): New internal structure.
2168 (ucontext): Declare new structure (WIP).
2169 (__COPY_CONTEXT_SIZE): New define.
2171 * exceptions.cc (_cygtls::interrupt_setup): Clear "threadkill" field
2172 when there is no sigwaiting thread.
2173 (setup_handler): Move event handling into interrupt_setup.
2175 2006-02-06 Corinna Vinschen <corinna@vinschen.de>
2177 * fhandler_socket.cc (fhandler_socket::connect): Fix formatting.
2178 (fhandler_socket::wait): Handle SA_RESTART when signal arrives.
2180 2006-02-06 Corinna Vinschen <corinna@vinschen.de>
2182 * include/cygwin/socket.h (CMSG_FIRSTHDR): Avoid compiler warning.
2184 2006-02-05 Corinna Vinschen <corinna@vinschen.de>
2186 * include/features.h: Add comment to explain what's going to happen
2188 * include/sys/stdio.h: Guard getline and getdelim prototypes with
2189 _GNU_SOURCE to avoid collision with old-style declarations.
2191 2006-02-05 Corinna Vinschen <corinna@vinschen.de>
2193 * environ.cc (struct parse_thing): Add transparent_exe option.
2194 * fhandler_disk_file.cc (fhandler_disk_file::link): Accommodate
2195 transparent_exe option. Add .exe suffix for links to executable files,
2196 if transparent_exe is set.
2197 * fhandler_process.cc (fhandler_process::fill_filebuf): Remove .exe
2198 suffix if transparent_exe option is set.
2199 * path.cc (symlink_worker): Accommodate transparent_exe option.
2200 (realpath): Don't tack on .exe suffix if transparent_exe is set.
2201 * syscalls.cc (transparent_exe): New global variable.
2202 (unlink): Accommodate transparent_exe option.
2205 (rename): Ditto. Maybe add .exe suffix when renaming executable files.
2206 (pathconf): Accommodate transparent_exe option.
2207 * winsup.h: Declare transparent_exe.
2209 2006-02-05 Christopher Faylor <cgf@timesys.com>
2210 Corinna Vinschen <corinna@vinschen.de>
2212 * fhandler_disk_file.cc (fhandler_disk_file::readdir_9x): Remove
2215 2006-02-05 Corinna Vinschen <corinna@vinschen.de>
2217 * fhandler_disk_file.cc (fhandler_disk_file::rewinddir): Remove label
2218 "out". Move test for NULL __handle ...
2219 (fhandler_disk_file::rewinddir_9x): ... here.
2221 2006-02-05 Corinna Vinschen <corinna@vinschen.de>
2223 * dir.cc (rewinddir): Keep dirent_get_d_ino and dirent_set_d_ino flags.
2225 2006-02-05 Christopher Faylor <cgf@timesys.com>
2227 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Don't close dir
2228 handle when we hit EOF since rewwindir may reactivate it.
2229 (fhandler_disk_file::readdir_9x): Eliminate superfluous temporary
2231 (fhandler_disk_file::closedir): Return EBADF when trying to close
2232 unopened DIR. Reorganize slightly. Return actual derived error value
2233 rather than always returning 0.
2235 2006-02-04 Christopher Faylor <cgf@timesys.com>
2237 * dir.cc (rmdir): Reorganize check for trailing dot to return correct
2238 error when directory does not exist.
2240 2006-02-03 Christopher Faylor <cgf@timesys.com>
2242 * dir.cc (mkdir): Reorganize check for trailing dot to return correct
2243 error when directory exists.
2244 * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Remove special
2245 test for path ending in '.'.
2247 2006-02-03 Corinna Vinschen <corinna@vinschen.de>
2249 * path.cc (suffix_scan::lnk_match): Return true beginning with
2251 (suffix_scan::next): Rearrange code to make .lnk append order slightly
2253 * spawn.cc (exe_suffixes): Try no suffix before .exe suffix to align
2254 evaluation with stat_suffixes.
2255 (dll_suffixes): Ditto.
2257 2006-02-02 Christopher Faylor <cgf@timesys.com>
2259 * cygwin/version.h: Mention CW_SETUP_WINENV in comment for API minor
2262 2006-02-02 Corinna Vinschen <corinna@vinschen.de>
2264 * cygwin.din (updwtmpx): Export.
2265 * syscalls.cc (updwtmpx): New function.
2266 * include/utmpx.h (updwtmpx): Declare.
2267 * include/cygwin/version.h: Bump API minor number to 153.
2269 2006-02-02 Christopher Faylor <cgf@timesys.com>
2271 * external.cc (setup_winenv): New function.
2272 (cygwin_internal): Implement CW_SETUP_WINENV.
2273 * sys/cygwin.h (cygwin_getinfo_types): Define CW_SETUP_WINENV.
2275 2006-02-02 Corinna Vinschen <corinna@vinschen.de>
2277 * security.cc (is_group_member): Fix comment.
2279 2006-02-02 Corinna Vinschen <corinna@vinschen.de>
2281 * security.cc (is_group_member): Use local group info type 1. Test
2282 group for being a global group or a well-known SID before adding it
2283 to the group list. Add comment.
2285 2006-02-01 Corinna Vinschen <corinna@vinschen.de>
2287 * autoload.cc (GetTcpTable): Define.
2288 * fhandler_socket.cc (address_in_use): New function to check if
2289 sockaddr_in address is already in use.
2290 (fhandler_socket::bind): Check if address is alreay in use in case of
2291 SO_REUSEADDR, to circumvent WinSock non-standard behaviour.
2293 2006-02-01 Corinna Vinschen <corinna@vinschen.de>
2295 * spawn.cc (dll_suffixes): Add .exe and "no suffix" to the list.
2297 2006-01-31 Corinna Vinschen <corinna@vinschen.de>
2299 * dlfcn.cc (check_path_access): Call find_exec with FE_DLL option.
2300 * path.h (enum fe_types): Add FE_DLL value.
2301 * spawn.cc (std_suffixes): Remove.
2302 (exe_suffixes): New suffix_info for executing files.
2303 (dll_suffixes): New suffix_info for searching shared libraries.
2304 (perhaps_suffix): Add opt argument. Use dll_suffixes if FE_DLL
2305 option is given, exe_suffixes otherwise.
2306 (find_exec): Propagate opt argument to perhaps_suffix. Drop suffix
2307 check when testing execute permission.
2308 (spawn_guts): Call perhaps_suffix with FE_NADA opt argument.
2310 2006-01-31 Christopher Faylor <cgf@timesys.com>
2312 * spawn.cc (av::fixup): Remove unused argument.
2313 (spawn_guts): Remove capitalization in debugging.
2315 2006-01-31 Corinna Vinschen <corinna@vinschen.de>
2317 * spawn.cc (find_exec): Only return files with execute permission set
2318 if ntsec is on. Don't check execute permission of Windows batch files.
2319 (av::fixup): Handle empty files gracefully. Drop execute permission
2321 * path.cc (suffix_scan::next): Don't skip any suffix on first run.
2323 2006-01-31 Corinna Vinschen <corinna@vinschen.de>
2325 * path.cc (cwdstuff::set): Don't set win32 error, only POSIX errno.
2327 2006-01-31 Corinna Vinschen <corinna@vinschen.de>
2329 * path.cc (cwdstuff::set): When SetCurrentDirectory returns
2330 ERROR_INVALID_FUNCTION, bend it over to ERROR_FILE_NOT_FOUND. Add
2331 comment to explain why.
2333 2006-01-31 Corinna Vinschen <corinna@vinschen.de>
2335 * dir.cc (readdir_worker): Add comment about writing old 32 bit d_ino.
2336 * include/cygwin/version.h: Bump API minor number to 152.
2337 (CYGWIN_VERSION_CHECK_FOR_NEEDS_D_INO): Remove.
2339 2006-01-30 Corinna Vinschen <corinna@vinschen.de>
2341 * fhandler_disk_file.cc (fhandler_disk_file::rewinddir): Simplify
2344 2006-01-30 Corinna Vinschen <corinna@vinschen.de>
2346 * fhandler_disk_file.cc (d_cachepos): Rename from d_pos to distinct
2347 clearly from __d_position. Change throughout.
2348 (fhandler_disk_file::rewinddir): Reset readdir cache on NT.
2350 2006-01-29 Corinna Vinschen <corinna@vinschen.de>
2352 * fhandler_disk_file.cc (readdir_get_ino): Don't follow symlinks.
2354 2006-01-29 Corinna Vinschen <corinna@vinschen.de>
2356 * fhandler.h (class fhandler_socket): Add saw_reuseaddr status flag.
2357 * fhandler_socket.cc (fhandler_socket::bind): Set socket to
2358 SO_EXCLUSIVEADDRUSE if application didn't explicitely set SO_REUSEADDR
2359 socket option, on systems supporting SO_EXCLUSIVEADDRUSE.
2360 * net.cc (cygwin_setsockopt): Set fhandler's saw_reuseaddr status flag
2361 if SO_REUSEADDR socket option has been successsfully set.
2362 * wincap.h (wincaps::has_exclusiveaddruse): New element.
2363 * wincap.cc: Implement above element throughout.
2365 2006-01-28 Corinna Vinschen <corinna@vinschen.de>
2367 * fhandler_disk_file.cc (fhandler_disk_file::mkdir): In case or error,
2368 check for existance explicitely and set errno to EEXIST.
2370 2006-01-28 Corinna Vinschen <corinna@vinschen.de>
2372 * fhandler_disk_file.cc (DIR_NUM_ENTRIES): New define determining
2373 minimum number of dir entries which fit into the readdir cache.
2374 (DIR_BUF_SIZE): Define globally as size of readdir cache.
2375 (struct __DIR_cache): New structure used for readdir caching on NT.
2376 (d_dirname): Accessor for struct __DIR_cache, use throughout.
2379 (fhandler_disk_file::opendir): Allocate __d_dirname to contain readdir
2381 (fhandler_disk_file::readdir): Use buf as pointer into readdir cache.
2382 Implement readdir caching.
2384 2006-01-28 Corinna Vinschen <corinna@vinschen.de>
2386 * include/sys/dirent.h (struct dirent): Revert misguided attempt to
2387 rename __d_unused1 to __d_fd.
2389 2006-01-27 Corinna Vinschen <corinna@vinschen.de>
2391 * autoload.cc (NtQueryDirectoryFile): Define.
2392 * dir.cc (__opendir_with_d_ino): Just call opendir.
2393 (opendir): Remove CYGWIN_VERSION_CHECK_FOR_NEEDS_D_INO handling.
2394 (readdir_worker): Only try generating d_ino if it's 0.
2395 Utilize namehash of directories fhandler. Call readdir_get_ino to
2396 generate d_ino for "..".
2397 (seekdir64): Keep dirent_set_d_ino flag.
2398 * fhandler.h (enum dirent_states): Add dirent_get_d_ino.
2399 (class fhandler_disk_file): Declare new private methods readdir_helper
2401 * fhandler_disk_file.cc (path_conv::hasgood_inode): New method to
2402 evaluate if a filesystem has reliable inode numbers.
2403 (fhandler_base::fstat_by_handle): Accommodate structure member name
2404 change from IndexNumber to FileId.
2405 (fhandler_base::fstat_helper): Call hasgood_inode here.
2406 (fhandler_disk_file::opendir): Call fhaccess only for real files.
2407 Don't append '*' to __d_dirname here, move to readdir_9x. On NT,
2408 open directory handle here. Set dirent_get_d_ino and dirent_set_d_ino
2409 flags according to wincap and filesystem.
2410 (fhandler_disk_file::readdir_helper): New method to implement readdir
2411 postprocessing only once.
2412 (readdir_get_ino_by_handle): New static function.
2413 (readdir_get_ino): New function to centralize inode number evaluation
2414 in case inode number hasn't been returned by NtQueryDirectoryFile.
2415 (fhandler_disk_file::readdir): Move old functionality to readdir_9x.
2416 Call readdir_9x when on 9x/Me. Implement NT specific readdir here.
2417 (fhandler_disk_file::readdir_9x): Move 9x specific readdir here.
2418 (fhandler_disk_file::seekdir): Accommodate new NT readdir method.
2419 (fhandler_disk_file::closedir): Ditto.
2420 (fhandler_cygdrive::fstat): Set d_ino to namehash. Add comment.
2421 (fhandler_cygdrive::opendir): Call get_namehash to prepare later
2422 correct evaluation of d_ino.
2423 (fhandler_cygdrive::readdir): Replace recursion with loop. Evaluate
2424 drive's d_ino by calling readdir_get_ino.
2425 * fhandler_proc.cc (fhandler_proc::readdir): Set dirent_saw_dot and
2426 dirent_saw_dot_dot to avoid seeing . and .. entries twice.
2427 * fhandler_process.cc (fhandler_process::readdir): Ditto.
2428 * fhandler_registry.cc (fhandler_registry::readdir): Ditto.
2429 * ntdll.h (STATUS_INVALID_PARAMETER): New define.
2430 (STATUS_INVALID_LEVEL): New define.
2431 (struct _FILE_INTERNAL_INFORMATION): Rename member IndexNumber to
2432 FileId (as in Nebbitt).
2433 * path.h (path_conv::hasgood_inode): Now implemented in
2434 fhandler_disk_file.cc.
2435 * wincap.h (wincaps::has_fileid_dirinfo): New element.
2436 * wincap.cc: Implement above element throughout.
2437 * winsup.h (readdir_get_ino): Add declaration.
2438 * include/sys/dirent.h (struct dirent): Slightly rename structure
2439 members to accommodate changes.
2440 Remove __USE_EXPENSIVE_CYGWIN_D_INO handling and declaration of
2441 __opendir_with_d_ino.
2443 2006-01-27 Christopher Faylor <cgf@timesys.com>
2445 * spawn.cc (spawn_guts): Fix potential handle leak when failing exec.
2447 2006-01-27 Christopher Faylor <cgf@timesys.com>
2449 * exceptions.cc (inside_kernel): Fix to return true if we can't get the
2450 name of the DLL for the given memory block since we are not in kernel
2453 2006-01-26 Corinna Vinschen <corinna@vinschen.de>
2455 * fhandler.cc (fhandler_base::open): Fix bug in argument order to
2456 InitializeObjectAttributes call.
2458 2006-01-25 Corinna Vinschen <corinna@vinschen.de>
2460 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix test for
2461 dirent_isroot to use the correct boolean operator.
2463 2006-01-25 Christopher Faylor <cgf@timesys.com>
2465 * ntdll.h: (temporarily?) Add more functions for querying directory.
2467 2006-01-24 Christopher Faylor <cgf@timesys.com>
2469 * dir.cc (readdir_worker): Turn off expensive inode calculation.
2471 2006-01-24 Corinna Vinschen <corinna@vinschen.de>
2473 * fhandler_process.cc (fhandler_process::fill_filebuf): Disable
2474 stripping the .exe suffix from the link target in PROCESS_EXE and
2475 PROCESS_EXENAME case.
2476 * path.cc (realpath): Tack on .exe suffix if necessary.
2478 2006-01-24 Corinna Vinschen <corinna@vinschen.de>
2480 * fhandler_disk_file.cc (fhandler_base::fstat_helper): Try harder
2481 to determine remote file systems with reliable inode numbers. Add
2484 2006-01-23 Corinna Vinschen <corinna@vinschen.de>
2486 * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Reset
2487 inheritance for duplicated socket.
2489 2006-01-20 Christopher Faylor <cgf@timesys.com>
2491 * include/cygwin/version.h: Bump API minor number to 151.
2492 * dir.cc (__opendir_with_d_ino): New function.
2493 (opendir): Set flag if we should be calculating inodes.
2494 (readdir_worker): Calculate d_ino by calling stat if the user has asked
2496 (seekdir64): Maintain all persistent flag settings.
2497 * fhandler.h (dirent_states): Add dirent_set_d_ino.
2498 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Reflect changes
2499 to dirent structure.
2500 * fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
2501 * include/sys/dirent.h (struct dirent): Coalesce two similar
2502 structures. Remove all shreds of the apparently highly confusing
2503 references to inodes. Add support for calculating a real inode if
2504 __USE_EXPENSIVE_CYGWIN_D_INO is defined.
2506 2006-01-20 Christopher Faylor <cgf@timesys.com>
2508 * include/sys/dirent.h: Add comments for people who are REALLY confused
2509 about whether they should be using something called __invalid_d_ino or
2512 2006-01-20 Corinna Vinschen <corinna@vinschen.de>
2514 * fhandler_socket.cc (fhandler_socket::prepare): Fix debug output.
2515 (fhandler_socket::release): Add debug output for WSAEventSelect failure.
2516 (fhandler_socket::ioctl): Always cancel WSAEventSelect before switching
2517 to blocking mode. Only set nonblocking flag if ioctlsocket call
2518 succeeded. Only print new socket state if ioctlsocket call succeeded.
2520 2006-01-19 Christopher Faylor <cgf@timesys.com>
2522 * fhandler_disk_file.cc (fhandler_disk_file::opendir): Check posix path
2523 for root rather than windows path.
2525 2006-01-19 Christopher Faylor <cgf@timesys.com>
2527 * dir.cc (readdir_worker): Fill in invalid fields with -1. Accommodate
2528 name change from __ino32 to __invalid_ino32.
2529 * include/sys/dirent.h (__invalid_ino32): Rename from __ino32. Don't
2530 define unused d_type macros.
2532 2006-01-18 Christopher Faylor <cgf@timesys.com>
2534 * heap.cc (heap_init): Remove Sleep.
2536 2006-01-18 Corinna Vinschen <corinna@vinschen.de>
2538 * net.cc (rresvport): Remove extern declaration.
2540 2006-01-18 Corinna Vinschen <corinna@vinschen.de>
2542 * autoload.cc (rresvport): Remove.
2543 * net.cc (last_used_rrecvport): New global shared variable.
2544 (cygwin_rresvport): Implement rresvport without using rresvport from
2547 2006-01-18 Corinna Vinschen <corinna@vinschen.de>
2549 * include/cygwin/socket.h (struct sockaddr_storage): Fix typo in
2550 ss_family member name.
2552 2006-01-16 Christopher Faylor <cgf@timesys.com>
2554 * include/cygwin/version.h: Bump DLL minor version number to 20.
2556 2006-01-13 Corinna Vinschen <corinna@vinschen.de>
2558 * uname.cc (uname): Concatenate a "-WOW64" to utsname's sysname
2559 member to see when running under WOW64.
2561 2006-01-13 Corinna Vinschen <corinna@vinschen.de>
2563 * net.cc (cygwin_setsockopt): Ignore errors when setting IP_TOS on
2564 Windows 2000 and above. Clarify the comment about IP_TOS and move
2565 to the place where the magic happens.
2566 (get_ifconf): Remove unused code.
2567 * wincap.h (wincaps::has_disabled_user_tos_setting): New element.
2568 * wincap.cc: Implement above element throughout.
2570 2006-01-12 Christopher Faylor <cgf@timesys.com>
2572 * fhandler_console.cc (set_console_state_for_spawn): Fix to recognize
2575 2006-01-12 Christopher Faylor <cgf@timesys.com>
2577 * fhandler.h (set_console_state_for_spawn): Whackamole the argument
2579 * spawn.cc (spawn_guts): Ditto, i.e., once again call
2580 set_console_state_for_spawn with an indication of whether we're about
2581 to start a cygwin process.
2582 * fhandler_console.cc (set_console_state_for_spawn): Don't set the
2583 console state if we know we're starting a cygwin process or if we're
2586 2006-01-10 Corinna Vinschen <corinna@vinschen.de>
2588 * dcrt0.cc (dll_crt0_0): Remove call to wincap.init.
2589 * init.cc (dll_entry): Rename is_wow64_proc to wow64_test_stack_marker.
2590 Call wincap.init here before doing anything else. Use wincap.is_wow64
2591 to determine if we're running in a WOW64 emulator.
2592 * mmap.cc (MapViewNT): Don't use AT_ROUND_TO_PAGE in WOW64, it's
2593 apparently not supported.
2594 (mmap64): Don't create mappings beyond EOF, which would need to use
2595 AT_ROUND_TO_PAGE, on WOW64.
2596 * wincap.cc (wincap): Throw into the .cygwin_dll_common section.
2597 (wincapc::init): Determine if running in WOW64 and set wow_64 flag.
2598 * wincap.h (class wincapc): Add wow64 member.
2599 (wincapc::is_wow64): New method.
2601 2006-01-10 Christopher Faylor <cgf@timesys.com>
2603 * fhandler_proc.cc (format_proc_cpuinfo): Avoid leading whitespace in
2606 2006-01-09 Christopher Faylor <cgf@timesys.com>
2608 * spawn.cc (spawn_guts): Reorganize slightly so that 16 bit check is
2609 done prior to check for command.com/cmd.com. Don't bother setting
2610 CREATE_SUSPENDED flag for a MS-DOS process since it doesn't work
2611 anyway. Avoid calling remember() when the child process has already
2613 (av::fixup): Explicitly set cygexec flag to false on a 16 bit process.
2615 2006-01-09 Corinna Vinschen <corinna@vinschen.de>
2617 * include/getopt.h (getopt_long_only): Declare.
2619 2006-01-09 Eric Blake <ebb9@byu.net>
2621 * cygwin.din: Export getsubopt.
2622 * include/cygwin/version.h: Bump API minor version.
2624 2006-01-08 Christopher Faylor <cgf@timesys.com>
2626 * fhandler_tty.cc (fhandler_tty_slave::dup): Don't assign a controlling
2627 terminal to a process when duped. Linux doesn't do this, so we won't
2630 2006-01-08 Christopher Faylor <cgf@timesys.com>
2632 * environ.cc (spenvs[]): windir -> WINDIR.
2634 2006-01-07 Christopher Faylor <cgf@timesys.com>
2636 * fhandler_console.cc (fhandler_console::need_invisible): Remove
2639 2006-01-07 Christopher Faylor <cgf@timesys.com>
2641 * fhandler.h (set_console_state_for_spawn): Eliminate argument from
2643 * fhandler.cc (set_console_state_for_spawn): Eliminate argument from
2644 definition. Always check for invisible console.
2645 (fhandler_console::need_invisible): Don't do anything if the windows
2646 station is already not visible.
2647 * spawn.cc (spawn_guts): Accommodate change of argument to
2648 set_console_state_for_spawn.
2650 2006-01-05 Christopher Faylor <cgf@timesys.com>
2652 * sigproc.cc (no_signals_available): Use existence of signal thread
2653 handle to figure out if we can actually send signals rather than
2654 relying on my_sendsig.
2655 (hwait_sig): Make static.
2656 (sigproc_init): Don't set my_sendsig to anything special. Use new
2657 global static hwait_sig.
2658 (wait_sig): Set hwait_sig to NULL when we are exiting.
2660 2006-01-05 Christopher Faylor <cgf@timesys.com>
2662 * include/getopt.h: Accommodate recent unfortunate newlib changes.
2664 2006-01-05 Christopher Faylor <cgf@timesys.com>
2666 * cygtls.cc (_cygtls::remove): Don't output debugging info if this
2667 isn't a cygwin thread.
2668 * sigproc.cc (sigproc_init): Move clearing of sync_startup here to
2669 lessen the likelihood of trying to deal with non-cygwin threads in
2672 * fhandler_console: Fix set_console_state_for_spawn comment.
2674 2006-01-05 Igor Peshansky <pechtcha@cs.nyu.edu>
2676 * spawn.cc (spawn_guts): Invert the argument to
2677 set_console_state_for_spawn.
2679 2006-01-04 Christopher Faylor <cgf@timesys.com>
2681 * fhandler_console.cc (fhandler_console::need_invisible): Only try to
2682 open "CygwinInvisible" windows station if opening of default station
2683 fails. Use CloseWindowStation to close window station handle.
2685 2006-01-04 Christopher Faylor <cgf@timesys.com>
2687 * fhandler_console.cc (fhandler_console::need_invisible): Open up the
2688 security of the newly created windows station.
2690 2006-01-04 Eric Blake <ebb9@byu.net>
2692 * path.cc (dot_special_chars): Add ", <, >, and |.
2694 2006-01-03 Christopher Faylor <cgf@timesys.com>
2696 * fhandler_console.cc (beep): Use MB_OK which is documented as using
2697 the default bell rather than -1 which seems to behave differently on
2698 different versions of Windows.
2700 2006-01-03 Christopher Faylor <cgf@timesys.com>
2702 * fhandler_process.cc (fhandler_process::readdir): Add missing argument
2705 * fhandler_console.cc (fhandler_console::need_invisible): Use made-up
2706 name for windows station rather than asking Windows to create one for
2709 * spawn.cc (spawn_guts): Don't mess with console if we're detaching.
2711 2006-01-03 Christopher Faylor <cgf@timesys.com>
2713 * dir.cc (readdir_worker): Minor code cleanup.
2715 * fhandler_console.cc (beep): Use a more Windows-generic wav file if
2716 the beep is missing. Use a more foolproof way to find out whether we
2717 should be recreating the missing key.
2719 * registry.h (reg_key::_disposition): New field.
2720 (reg_key::created): New function.
2721 * registry.cc (reg_key::reg_key): Set _disposition to zero by default.
2722 (reg_key::build_key): Fill in _disposition field.
2724 2006-01-03 Eric Blake <ebb9@byu.net>
2726 * dir.cc (readdir_worker): Ensure that saw_dot* flags are updated when
2727 not handling inodes.
2729 2006-01-02 Christopher Faylor <cgf@timesys.com>
2731 * fhandler_console.cc (beep): New function. Restores missing "Default
2732 Beep", if necessary.
2733 (fhandler_console::write_normal): Use beep().
2735 2006-01-02 Christopher Faylor <cgf@timesys.com>
2737 * dcrt0.cc (_dll_crt0): Remove more leftover debugging stuff.
2738 (cygwin_dll_init): Remove unneeded initializations. Call _dll_crt0
2739 rather than dll_crt0_1.
2741 2006-01-02 Corinna Vinschen <corinna@vinschen.de>
2743 * syslog.cc: Include sys/un.h instead of sys/socket.h.
2744 (syslogd_inited): Convert to enum type noting the exact result of
2745 trying to connect to syslog daemon. Use this way throughout.
2746 (connect_syslogd): New static function taking over the task to
2747 connect to syslog socket. Use correct struct sockaddr_un instead of
2749 (try_connect_syslogd): Call connect_syslogd. If write fails on
2750 connection oriented socket, try to reconnect to syslog socket and
2753 2006-01-01 Christopher Faylor <cgf@timesys.com>
2755 * pinfo.cc (pinfo::exit): Swap signal and normal exit value when not
2756 started from a cygwin process - just like the good-old-days of B20.
2758 2006-01-01 Christopher Faylor <cgf@timesys.com>
2760 * strace.cc (strace::write_childpid): Remove debugging output.
2762 2006-01-01 Christopher Faylor <cgf@timesys.com>
2764 * cygtls.cc (_cygtls::remove): Remove left over debugging cruft which
2765 caused this function to always return prematurely.
2767 2006-01-01 Christopher Faylor <cgf@timesys.com>
2769 * exceptions.cc (sigpacket::process): Pass actual reference to signal's
2770 sigaction structure to setup_handler.
2772 2006-01-01 Christopher Faylor <cgf@timesys.com>
2774 * exceptions.cc (_cygtls::interrupt_setup): Implement SA_RESETHAND.
2775 * include/cygwin/signal.h: Define SA_ONESHOT and SA_NOMASK.
2777 * dcrt0.cc (get_cygwin_startup_info): Remove commented out code.
2779 2006-01-01 Corinna Vinschen <corinna@vinschen.de>
2781 * syslog.cc (vklog): Never log kernel messages using the vsyslog