newlib/winsup/CVSChangeLogs.old/cygwin/ChangeLog-1997

2801 lines
117 KiB
Plaintext

Wed Dec 31 15:00:32 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* hinfo.cc (hinfo_vec::find_unused_handle): correct
previous patch -- need to fix up vec[i].h pointers
Wed Dec 31 14:13:22 1997 Ian Lance Taylor <ian@cygnus.com>
* regexp/Makefile.in (tooldir): New variable.
(install): Install regexp.h.
Tue Dec 30 19:52:46 1997 Ian Lance Taylor <ian@cygnus.com>
* net.cc (inet_netof): New function.
(inet_makeaddr): New function.
* cygwin.din: Export inet_netof and inet_makeaddr.
Tue Dec 23 17:45:07 1997 Ian Lance Taylor <ian@cygnus.com>
* path.cc (current_directory_name): New static variable.
(current_directory_posix_name): New static variable.
(getcwd_inner): Cache the directory name.
(chdir): Move here from syscalls.cc. Clear directory cache
variables.
* syscalls.cc (chdir): Remove; now in path.cc.
* environ.cc (setenv): Add cast to avoid warning.
* security.cc (get_file_attribute): Make file parameter a pointer
to const char.
(set_file_attribute): Likewise.
* winsup.c (get_file_attribute): Update declaration.
(set_file_attribute): Likewise.
* path.cc (path_conv): Don't pass the root directory to
symlink_check_one.
Mon Dec 22 16:34:40 1997 Ian Lance Taylor <ian@cygnus.com>
* path.cc (realpath): Use path_conv to resolve symlinks.
* path.cc (path_conv::path_conv): Rewrite completely to convert to
win32 path first and then check for symlinks element by element.
(symlink_check_one): New static function based on old
symlink_check_worker, but without path conversion.
(path_prefix_p): Move definition before all uses.
(skip_n_slashes, symlink_expand, symlink_follow): Remove.
(symlink_check_worker, symlink_check): Remove.
(readlink): Rewrite to use new symlink_check_one.
(unmixedcaseify, mixedcaseify): Comment out.
* path.h (symlink_check, symlink_follow): Don't declare.
* fhandler.cc (open): Don't pass O_NOSYMLINK to path_conv. Set
errno from path_conv if it fails.
* dirsearch.cc (opendir): Check errors from path_conv, and set
errno appropriately.
* times.cc (utimes): Likewise.
* syscalls.cc (_unlink, _link, mkdir, rmdir, chdir): Likewise.
(chmod, _rename): Likewise.
(_stat_worker): Don't just pass nofollow to _open, but base
whether to pass O_NOSYMLINK on whether nofollow is set.
(lstat): Pass 1, not O_NOSYMLINK, to _stat_worker.
* strerror.cc (strerror): Add ELOOP.
Thu Dec 18 12:30:47 1997 Ian Lance Taylor <ian@cygnus.com>
* fhandler.h (class fhandler_base): Remove inline definitions of
tcflush, tcsendbreak, tcdrain, tcflow, tcsetattr, tcgetattr,
tcsetpgrp, and tcgetpgrp, so that we can set proper errno values.
(class fhandler_tty): Add pgrp_ field, and virtual tcgetpgrp and
tcsetpgrp functions.
* fhandler.cc (fhandler_base::tcflush): New function.
(fhandler_base::tcsendbreak): New function.
(fhandler_base::tcdrain): New function.
(fhandler_base::tcflow): New function.
(fhandler_base::tcsetattr): New function.
(fhandler_base::tcgetattr): New function.
(fhandler_base::tcsetpgrp): New function.
(fhandler_base::tcgetpgrp): New function.
(fhandler_tty::fhandler_tty): Initialize pgrp_.
* tty.cc (tcsetpgrp): Set errno correctly on failure.
* include/sys/termios.h (CBAUD): Change to 037.
(B57600, B115200): Change to values that can fit in a speed_t.
* spawn.cc (spawn_guts): Set errno correctly if we can't find the
executable.
Mon Dec 15 16:40:07 1997 Geoffrey Noer <noer@cygnus.com>
patch from msnyder@cygnus.com (Michael Snyder):
* heap.cc (_sbrk): handle situation where newalloc < incr
Mon Dec 15 16:40:07 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
Allow Cygwin32 to terminate process even when in a blocking
winsock call.
* exceptions.cc (call_handler): call to WSACancelBlockingCall()
removed.
(sighandle): call WSACleanup() before exiting the process to
cancel blocking winsock calls.
* include/mywinsock.h: add proto for WSACleanup().
Mon Dec 15 16:40:07 1997 Geoffrey Noer <noer@cygnus.com>
* Makefile.in: compile .cc files with -fno-exceptions to
decrease dll size and increase execution speed a little.
Mon Dec 15 16:40:07 1997 Geoffrey Noer <noer@cygnus.com>
patch from cgf@bbc.com (Chris Faylor):
* tty.cc (do_input): Detect CTRL-T as a special case when
STRACE_CACHE is active. Dumps the strace cache to disk.
* console.cc (fhandler_console::read): Detect CTRL-T as a special
case when STRACE_CACHE is active. Dumps the strace cache to disk.
Sat Dec 13 15:12:53 1997 Ian Lance Taylor <ian@cygnus.com>
* fork.cc: Include <malloc.h>.
(cygwin_fork_helper1): Call __malloc_copy after copying the stack
and heap to the child.
Thu Dec 11 15:14:40 1997 Geoffrey Noer <noer@cygnus.com>
patch from cgf@bbc.com (Chris Faylor):
* sigproc.cc (proc_subproc): Remove over-enthusiastic test for
process handling readiness or proc_wait will loop attempting to
handle a dying subprocess when signal handlers are not ready.
* fork.cc (cygwin_fork_helper1): Reorganize to ensure that a
forked process is capable of receiving signals when fork()
returns.
Wed Dec 10 15:43:37 1997 Ian Lance Taylor <ian@cygnus.com>
* include/sys/termios.h (IXANY): Correct value.
(PARMRK): Define again.
Wed Dec 10 00:05:23 1997 Geoffrey Noer <noer@cygnus.com>
patch from cgf@bbc.com (Chris Faylor):
* dcrt0.cc (dll_crt0_1): Move start time initialization to a more
logical place (pinfo_init).
(do_exit): Reorganize to attempt to solve races when a cygwin
process occupies two windows pids (i.e., an execed process).
* exceptions.cc (lock_cs): Fix erroneous WFSO logic.
(sighandle): Use new method for determining if process was
initiated via fork.
(events_terminate): Do not close pinfo_mutex. Allow automatic
close by ExitProcess to lengthen the time that the pinfo structure
is locked, minimizing races between an exiting child and a
potentially exiting parent.
* hinfo.cc (hmap_init): Use new method for determining if process
was initiated via fork.
(hinfo_vec::de_linearize_fd_array): Fix a typo in a comment.
* pinfo.cc (clearout): Remove this function. Handled in
allocate_pid.
(pinfo_init): Move start_time setting here from dll_crt0_1.
Remove call to init_self in favor of adding three additional lines
of code.
(pinfo_list::operator []): Implement a very simple hashing
scheme for pid lookup.
(lpfu): New routine controlled by DEBUGGING conditional. When
DEBUGGING is activated, lpfu returns more information about the
state of a timed out pinfo_mutex.
(pinfo_list::get_empty_pinfo): Remove function. Move
functionality to allocate_pid.
(allocate_pid): Implement a (very) simple hashing scheme for
finding an available pid. Take advantage of reorganized pinfo
structure to zero all pertinent fields with one memset.
(pinfo::record_death_nolock): Don't bothering zeroing
inconsequential stuff.
(pinfo::record_death): Leave pinfo_mutex locked with the
understanding that this function will be called just prior to
exiting the process. This minimizes a race between a child which
is exiting at nearly the same time as its parent.
* sigproc.cc: Reformat function calls.
(sigproc_init): Clear new PID_INITIALIZING flag to indicate that
a (possibly execed) process is now capable of receiving signals.
(sig_send): Be more defensive in determining if a signal can be
sent to myself or suffer problems with execed processes.
(sigproc_terminate): Wait for sig_proc to exit to ensure that
all pending signals have been handled. Use new 'proc_terminate'
function to terminate the subprocess handling thread.
(allow_sig_dispatch): Don't bother blocking signals if signal
handling isn't active in this process yet.
(block_sig_dispatch): Don't bother blocking signals if signal
handling isn't active in this process yet.
(sig_proc): Use sig_loop_wait variable to control wait time for
signal semaphores. Uncouples this wait from wait_subproc.
Perform signal cleanup here on thread termination.
(proc_exists): More accurate tests to determine if a process
really exists.
(proc_register): Remove this function in favor of a macro.
(proc_subproc): More stringent test for being "ready" to process
subprocesses. Add more common initialization to PROC_ADDCHILD.
Remove PROC_EXIT in favor of a separate function.
(proc_terminate): New function. Replaces PROC_EXIT functionality
in proc_subproc. Terminates subproc handler thread.
(stopped_or_terminated): use lock_pinfo_for_update when modifying
child stopsig status or suffer a race.
(wait_subproc): Save sig_proc thread handle away for
synchronization when exiting. Set up 'i_am_alive' mutex inherited
by childen. Child's inability to lock this mutex means that the
parent is still alive and processing children. Use proc_loop_wait
to control WFMO. Clean up events queue on thread exit.
(zap_subproc): Clear out pinfo structure for a child.
* sigproc.h: Remove PROC_EXIT constant. Remove obsolete
proc_register declaration.
(alive_parent): New macro to determine if a parent is still alive.
* spawn.cc (spawn_guts): Fix a comment typo. Use proc_terminate
to terminate all subprocess handling prior to an exec. Use new
method for determining if this process was started via a fork.
Attempt to clean up races between execed process, its parent, and
the execed child.
* winsup.h (pinfo): Add a new handle indicating that a parent is
alive. This should be a foolproof way of determining if a parent
has gone away so that a child will know whether to remove itself
from the pinfo table.
Reorganize the structure in such a way that items to be zeroed
are grouped together at the beginning for more efficient zeroing
in allocate_pid.
Add a new PID_* constant.
New lock_pinfo_for_update macro for use when debugging cygwin.
Wed Dec 10 00:05:23 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
Change the way to inherit fd table on spawn/exec calls.
Use STARTUPINFO structure to pass an fd table to a child process
instead of shared memory area. This is undocumented, but is used
by MSVC runtime. The desktop inheritance code added again,
otherwise user32.dll will fail to initialize after sexec calls.
* pinfo.cc (pinfo_init): delinearize fd array from STARTUPINFO
structure instead of call to copy_shared_fd_table.
* shared.cc (create_shared_fd_mapping_name): remove
(create/copy_shared_fd_table): remove
* spawn.cc (spawn_guts): use lp(cb)Reserved2 fields of STARTUPINFO
to pass fd table to a child. Remove call to
create_shared_fd_table. Inherit window station/desktop on sexec
calls.
* winsup.h: remove prototypes for create/copy_shared_fd_table.
Fri Dec 5 18:57:42 1997 Geoffrey Noer <noer@cygnus.com>
patch from cgf@bbc.com (Chris Faylor):
* kill.cc (main): Report error if kill() fails. Minor reformat.
* ps.cc (main): Only use month/day in start time when starting
time is > 24 hours in the past, not when it occurs yesterday.
Fri Dec 5 15:54:41 1997 Geoffrey Noer <noer@cygnus.com>
* fcntl.cc (_fcntl): reformat
* fhandler.cc (fhandler_tty::open): new, need special open for
ttys. In addition to calling fhandler_base::open, check
flags to handle blocking vs. non-blocking I/O. Should
initialize tty to standard state (9600 bits/sec - 8 - 1 with
no flow control) but this code needs more work still. Ifdef
out for now.
(fhandler_tty::tcsendbreak): new
(fhandler_tty::tcdrain): new
(fhandler_tty::tcflow): new
(fhandler_tty::tcsetattr): add support for action arg. Use
a DCB struct to hold the values we will set. First call
GetCommState to get the current state, then reassign values
based on the contents of the termios struct. Handle the
case where t->c_ospeed is set to B0, otherwise set state.BaudRate.
Set all the other DCB struct values appropriately, based on
the contents of the termios struct.
(fhandler_tty::tcgetattr): do the inverse of tcsetattr.
Call GetCommState to get the current state and use this to set
the appropriate termios struct values.
* termios.cc: reformat
(tcsendbreak): implement -- add duration arg,
call fhandler tcsendbreak as appropriate
(tcdrain): implement -- call fhandler tcdrain as appropriate
(tcflow): implement -- call fhandler tcflow as appropriate
* fhandler.h: add new tc* protos
* include/sys/termios.h: correct values of iflag bits,
define CRTSXOFF and CRTSCTS, CBAUD, B57600 and B115200.
Add protos for tc* functions.
Wed Nov 26 17:06:17 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* spawn.cc (perhaps_suffix): resolve symlinks to .exes.
Mon Nov 24 17:10:49 1997 Geoffrey Noer <noer@cygnus.com>
* cygwin.din: remove crypt
* syscalls.cc (crypt): remove crypt stub
Sun Nov 23 17:34:42 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* spawn.cc (spawn_guts): save the path of the script itself,
use the saved path while building the command line to execute.
Thu Nov 20 22:58:23 1997 Geoffrey Noer <noer@cygnus.com>
* stubs.cc: delete file, move unimplemented stubs to the
files in which they would normally belong.
* grp.cc (setgrent): implement (was in stubs.cc)
* syscalls.cc: move regfree, mknod, setgid, set(e)uid, sync,
crypt, and PPC __chkstk/_alloca/dll_entry stubs here from stubs.cc
(sync): just return zero for now instead of -1
(crypt): return -1 instead of 0
Thu Nov 20 22:41:57 1997 Geoffrey Noer <noer@cygnus.com>
patch from cgf@bbc.com (Chris Faylor):
* spawn.cc (spawn_guts): A premature close of the spawned filehandle
was possible when reparenting an exited process. Fix this.
* dcrt0.cc (do_exit): Only do minimal cleanup if "pid focus"
has moved to another windows process or the other process will
become confused.
patch from sos@prospect.com.ru (Sergey Okhapkin):
* sigproc.cc (getsem): set errno to EPERM if existing semaphore
cannot be opened.
(wait_subproc): allow access to signal semaphores to process's
owner only except for SIGCHLD (needed for SIGCHLD delivery after
sexecXX calls).
Thu Nov 20 00:52:58 1997 Geoffrey Noer <noer@cygnus.com>
patch from cgf@bbc.com (Chris Faylor):
* syscalls.cc (hash_path_name): Ignore trailing backslash when
calculating pathname hash.
* hinfo.cc (hinfo_vec::de_linearize_fd_array): Set use_tty
if /dev/ttyn is detected in the shared_fd_table. Before this
change, executing "set CYGWIN_TTY=1", "bash", "unset CYGWIN_TTY",
"/bin/pwd" would result in pwd printing nothing because
the de_linearize code would use the wrong fhandler_xxx when
reading from the buffer inherited from the parent process.
* cygwin.din: Add new ctermid function for export.
* syscalls.cc (ctermid): New function
* exceptions.cc (call_handler): If called during a P_OVERLAY
spawn, merely set appropriate flags and return. The spawn
code will then clean up and exit.
* sigproc.cc (proc_exists): Reorganize to better detect defunct
processes. Don't clean up pinfo if process has a parent since the
parent should clean up eventually.
* spawn.cc: New global exec_exit. Set by signal handler to
value which should be used on exit from aborted spawn.
(spawn_guts): Try harder to let the child terminate (if it is
going to) before exiting on a signal. Remove obsolete code.
patch from sos@prospect.com.ru (Sergey Okhapkin):
* exec.cc (file_exists): Removed
* spawn.cc (spawn_guts): call perhaps_suffix to convert filename
to win32 form and to check file existance; prog variable
removed, all references changed to real_path variable.
Do not inherit parent's window station/desktop on sexecXX calls.
They are no longer needed with the new signal handling.
(_spawnve): extra file existance check removed
* winsup.h: file_exists prototype removed
Wed Nov 19 16:23:47 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* cygwin.din: add missing exports for random -- initstate
and setstate (accessed by gawk among others?)
Tue Nov 18 22:27:10 1997 Geoffrey Noer <noer@cygnus.com>
* Makefile.in: Add spaces after colons in rules for make
Mon Nov 17 22:35:25 1997 Geoffrey Noer <noer@cygnus.com>
patch from proven@cygnus.com (Chris Provenzano):
* Makefile.in: set SHELL = @SHELL@, set VPATH to only @srcdir@.
Remove mingw from directories to build for now, adapt rules
for building sysdef files without fancy VPATH
* configure: regenerate
* config/i386/makefrag: add rules to build setjmp/longjmp
* regexp/Makefile.in: set SHELL = @SHELL@
* regexp/configure: regenerate
* utils/Makefile.in: set SHELL = @SHELL@
* utils/configure: regenerate
Mon Nov 17 18:36:50 1997 Geoffrey Noer <noer@rtl.cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* fhandler.cc (fhandler_disk_file::open): calls to symlink_XXX
replaced with path_conv class calls.
* path.cc (path_conv::path_conv): comments added, O_NOSYMLINK case
added.
* path.h (class path_conv): symlink_p, exec_p - new class members.
* spawn.cc (spawn_guts): call path_conv instead of symlink_follow.
Sun Nov 16 15:54:27 1997 Geoffrey Noer <noer@rtl.cygnus.com>
patch from cgf@bbc.com (Chris Faylor):
* dcrt0.cc (do_exit): Use new pinfo element in debug statement.
* pinfo.cc (pinfo_init): Eliminate use of "PID" environment
variable in favor of scanning the process table for a
SpawnedProcessId field matching current windows process id.
Should speed up spawned process startup slightly. Delay setting
of dwProcessId until process is capable of processing signals
since this field is used to build signal semaphores.
* signal.cc (kill_worker): Perform a `proc_exists' on the pid
in question if signal == 0. This will verify that the process
actually exists and was not abnormally terminated.
* sigproc.cc (sigproc_init): Initialize dwProcessId field after
signal processing has been initialized.
(sigproc_terminate): Remove events[0] close.
(getsem): Use GetCurrentProcessId to find the windows pid since
this dwProcessId field is not yet set up. Use proc_exists to
determine if error should be printed on OpenSemaphore error.
(proc_exists): New function. Makes more exhaustive test of
process existence. Determines if process died without going
through normal shutdown.
(wait_subproc): Close wakeup event only on thread exit.
* spawn.cc: Remove pExeced. Use new field in pinfo.
(spawn_guts): Initialize dwSpawnedProcessId field.
* utils/ps.cc (main): Perform a kill(pid, 0) on any pids that
appear to be active. This will clear out pids that have died
abnormally. 'ps -f' bypasses this.
* winsup.h (class pinfo): Add dwSpawnedProcessId field.
Sun Nov 16 15:54:27 1997 Geoffrey Noer <noer@rtl.cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* pinfo.cc ((pinfo_init): use dwProcessId for execed/spawned
check, set subproc_ready event only if the process is exec'ed.
* spawn.cc (spawn_guts): initialize hProcess and dwProcessId
fields of pinfo on exec, keep progname field on spawn.
Sun Nov 16 15:54:27 1997 Geoffrey Noer <noer@rtl.cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* dcrt0.cc: remove commented out code
* spawn.cc: fix misapplied patch problem
Sun Nov 16 15:54:27 1997 Geoffrey Noer <noer@cygnus.com>
patch from cgf@bbc.com (Chris Faylor):
* fhandler.cc (fhandler_dev_null::open): Open Windows 'nul'
device rather than "faking" a real open.
(fhandler_dev_null::close): delete.
(fhandler_dev_null::fstat): delete.
(fhandler_dev_null::ioctl): delete.
(fhandler_dev_null::read): delete.
(fhandler_dev_null::write): delete.
(fhandler_dev_null::lseek): delete.
(fhandler_dev_null::dup): delete.
* fhandler.h (class fhandler_base): delete above methods from
class.
* hinfo.cc (hinfo_vec::build_fhandler): Use new fhandler_dev_null
class which opens 'nul' device. Treat /dev/null similarly to
other Windows devices. This allows redirection of /dev/null to
non-cygwin processes.
Sun Nov 16 15:54:27 1997 Geoffrey Noer <noer@cygnus.com>
patch from cgf@bbc.com (Chris Faylor):
* dcrt0.cc (do_exit): Use EXIT_* flags to determine how exit
should proceed. Honor new EXIT_NOCLOSEALL to avoid
close_all_files.
* exceptions.cc (__cygwin32_exception_handler): Use new
EXIT_SIGNAL define to indicate exiting due to signal.
* signal.cc (sigprocmask): Slightly more defensive check against
being called prior to complete cygwin setup.
(_raise): Defensive check to guard against being called prior to
complete cygwin setup.
* sigproc.cc (stopped_or_terminated): Use new EXIT_SIGNAL define
to detect exiting due to signal.
* sigproc.h: Define flags to be used during exit process as
EXIT_*.
* spawn.cc (spawn_guts): Use EXIT_* constants to control how
do_exit proceeds after _P_OVERLAY.
Sun Nov 16 15:54:27 1997 Geoffrey Noer <noer@cygnus.com>
* sysconf.cc (sysconf): return 1048576 for ARG_MAX until
we figure out the right value (_POSIX_ARG_MAX is only 4K
which is too small).
Sun Nov 16 15:54:27 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* dcrt0.cc (dll_crt0_1): call winsock_init if neccesary.
* fhandler.cc ((fhandler_socket::fhandler_socket): moved to net.cc
* fhandler.h (class fhandler_socket): destructor prototype added.
* fork.cc (cygwin_fork_helper1): set PID_SOCKETS_USED in the
child's pinfo if parent has open socket descriptors; call
winsock_init in child code if necessary.
* net.cc: static variable winsock_init_p removed;
number_of_sockets is new global variable containing number of
opened sockets.
(winsock_init): made global, save "winsock inited" flag in process
state field.
(cygwin32_winsock calls): condition for winsock initialisation
changed
(fhandler_socket::fhandler_socket): new, moved from fhandler.cc;
increment number_of_sockets on constructor call.
(fhandler_socket::~fhandler_socket): new. Decrement
number_of_sockets on destructor call, check for negative value.
(fhandler_socket::ioctl): check for winsock initialisation added.
* spawn.cc (spawn_guts): handle PID_SOCKETS_USED in child's pinfo.
* winsup.h: PID_SOCKETS_USED - new enum value; number_of_sockets
and winsock_init() prototypes added.
Wed Nov 12 23:02:34 1997 Geoffrey Noer <noer@cygnus.com>
patch from cgf@bbc.com (Chris Faylor):
* exceptions.cc: Substitute do_exit for _exit as appropriate.
do_exit allows full 32 bits of exit value. The upper 16 bits
are used for special cygwin operations.
* winsup.h: Change definition of do_exit to allow calling from
signal handler.
* dcrt0.cc (do_exit): Change to allow calling from signal handler
in place of _exit. This is necessary to ensure that only cygwin
internal applications can exit with the upper order 16 bits set
to non-zero.
Wed Nov 12 23:02:34 1997 Geoffrey Noer <noer@cygnus.com>
patch from cgf@bbc.com (Chris Faylor):
* dcrt0.cc (do_exit): New function. Subsumes functionality of
_exit but takes a DWORD argument. Changed to avoid some shutdown
activities when called with REPARENTING bit set in argument. Also
explicitly kills any executing non-cygwin subprocess from a
spawn(P_OVERLAY)...
(_exit): Use do_exit for exiting. Ensure that only low order 1
bits of status are used or confusion will result if exiting with
some higher order bits set.
* exceptions.cc (set_process_mask): Reflect new method for
sig_send to send signals to self.
(handle_sigsuspend): Reflect new method for sig_send to send
signals to self.
* fork.cc: A handle name was changed in the pinfo structure to
be more reflective of its use. Change forkee_stopped to
subproc_ready everywhere.
* pinfo.cc (pinfo::clearout): Change forkee_stopped to
subproc_ready.
(pinfo_init): Use PID_EXECED flag to determine if this process has
been execed. If so, signal the remaining stub in the process
which invoked us so that the stub can terminate and let us take
over as this pid.
* sigproc.cc (sig_send): Change method for determining if sending
signals to myself. A NULL pointer means communicate with my
signal handler. This is necessary to allow communication with
our own signal processors after reparenting an execed process.
Also, add an additional test to detect if a process goes away in
the middle of attempting to send it a signal.
(allow_sig_dispatch): Reflect new method for sig_send to send
signals to self.
(getsem): Use dwProcessId in names for signal semaphores. Allows
communicating with both parts of a process that is temporarily
"split in two" while execing.
(sig_proc): Avoid printing an error if WAIT_FAILED and exiting
anyway. Process requests even if loop_wait == 0.
(proc_subproc): Defensive check for manipulating processes prior
to initialization or after terminating sigproc.
Use different check for subprocesses that have been reparented.
Hopefully this will eliminate WFSO, error 6 problems.
(wait_subproc): Only exit when loop_wait == 0 and not dealing with
a process.
* spawn.cc: Set up two global variables, used on exit when
execing a non-cygwin process: hExeced - handle of non-cygwin
process which is being waited for by a stub, pExeced - windows pid
of the process.
(spawn_guts): Reorganize to always (temporarily) wait for the new
process when P_OVERLAY. If a cygwin process is invoked, then the
wait will return when an event is signalled and the new process
will be "reparented" in the ppid. If a non-cygwin process is
invoked, wait until the process exits or a signal is received
which terminates the process. In this case, the do_exit function
will terminate the non-cygwin process.
* winsup.h: Rename forkee_stopped to subproc_ready since this
event now has a dual role which is better defined by this new
name. Add a new flag (PID_EXECED) for process_state. Define a
new function `do_exit' which operates similarly to _exit
but takes > 16 quantities with the high order bit signifying
different exit actions.
Mon Nov 10 17:11:08 1997 Geoffrey Noer <noer@cygnus.com>
* include/utime.h: remove (moved to newlib/libc/sys/cygwin32/sys)
so as not to conflict with the one in newlib/libc/include.
Mon Nov 10 15:11:42 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* exceptions.cc (__cygwin32_exception_handler): exit with
"core dumped" exit code after writing "core" file.
Mon Nov 10 15:11:42 1997 Geoffrey Noer <noer@cygnus.com>
patch from cgf@bbc.com (Chris Faylor):
* console.cc: Add convenience macros and structures for handling
scrolling.
(fhandler_console::fillin_info): New function to fill in the `info'
struct.
(fhandler_console::scroll_screen): Change to scroll only the visible
portion of the screen. Honor scroll regions more stringently.
(fhandler_console::open): Use new fillin_info function.
(fhandler_console::ioctl): Use new fillin_info function which
automatically calculates screen size.
(fhandler_console::clear_screen): Use new fillin_info function.
Only clear visible portion of screen.
(fhandler_console::cursor_set): Add a flag to indicate whether
cursor positioning is absolute within buffer or is screen relative.
Use new fillin_info function to get screen information.
(fhandler_console::cursor_rel): Use new fillin_info function.
Change for new cursor_set parameter.
(fhandler_console::cursor_get): Use new fillin_info function.
(fhandler_console::char_command): Use new fillin_info function
where appropriate. Change for new cursor set parameter where
appropriate. Scroll only visible portion of screen when required.
* fhandler.h (class fhandler_console): Add fillin_info, change
cursor_set to reflect additional argument.
Mon Nov 10 15:11:42 1997 Geoffrey Noer <noer@cygnus.com>
patch from cgf@bbc.com (Chris Faylor):
* dcrt0.cc (dll_crt0_1): Register process start time.
* fork.cc (cygwin_fork_helper1): Register process start time.
* utils/ps.cc (main): Report process start time.
(start_time): New function to format time similarly to UNIX ps.
A time from today shows as HH:MM, times from previous days just
show the month and day.
* winsup.h (class pinfo): Add start_time field.
Mon Nov 10 11:54:27 1997 Ian Lance Taylor <ian@cygnus.com>
* include/Windows32/Defines.h (TIME_ZONE_ID_INVALID): Define.
* times.cc (gettimeofday): The error return from
GetTimeZoneInformation is TIME_ZONE_ID_INVALID, not
TIME_ZONE_ID_UNKNOWN.
Sun Nov 9 17:08:30 1997 Geoffrey Noer <noer@cygnus.com>
patch from cgf@bbc.com (Chris Faylor):
* Makefile.in: add ../libiberty/strsignal.o
* cygwin.din: add exports for strsignal, strtosigno
* utils/kill.cc: changes to allow accepting signal name
as argument
Sun Nov 9 17:08:30 1997 Geoffrey Noer <noer@cygnus.com>
* include/limits.h: define PATH_MAX here instead of
include/sys/param.h, define _POSIX_NGROUPS_MAX as 0 not 1
(system invariant value, not implementation-specific)
* include/sys/param.h: remove PATH_MAX, change NOFILE from 64
to 8192, delete PATHSIZE, remove safety wrapper around
MAXHOSTNAMELEN, add comments
* sysconf.cc (sysconf): return NGROUPS_MAX not zero,
return _POSIX_SAVED_IDS not zero. Return _POSIX_CHILD_MAX
not 4096. Return _POSIX_CHILD_MAX, not 8.
patch from sos@prospect.com.ru (Sergey Okhapkin):
* winsup.h: add proto for setdtablesize, define NOFILE_INIT
and NOFILE_INCR
* hinfo.cc (hmap_init, hinfo_vec::find_unused_handle): change to
support virtually unlimited numbers of fds. Remove setdtablesize
proto
* syscalls.cc: initialize dtable_size to NOFILE_INIT instead of
NOFILE
Thu Nov 6 13:14:09 1997 Geoffrey Noer <noer@cygnus.com>
* exceptions.cc (__cygwin32_exception_handler): don't
print "In cygwin32_except_handler" for exceptions Cygwin32
isn't going to handle. Print "(progname PID) Exception: <type>"
to console. Redirect all detailed information including the
stack trace to <progname>.core. This should reduce confusion
about what's causing the exception (a lot of people would see "In
cygwin32..." and think the problem was in Cygwin32 when most of
the time it was in some other program).
* syscalls.cc: add fixme
* times.cc: add fixme
Wed Nov 5 19:23:10 1997 Geoffrey Noer <noer@cygnus.com>
patch from cgf@bbc.com (Chris Faylor):
* Makefile.in: force .c.os and .cc.os to be built in same
directories as source
Wed Nov 5 19:23:10 1997 Geoffrey Noer <noer@cygnus.com>
* drct0.cc (dll_crt0_1): stop initializing winsock on process
startup since that slows down startup time of all processes, even
ones that don't end up making Winsock calls.
* fork.cc (cygwin_fork_helper1): don't need to call uinfo_init
or socket_checkinit after fork -- the appropriate functions will
do the necessary initialization if they are ever called.
* net.cc: init winsock_init_p to zero and make it static
(all exported functions): call winsock_init before making
any WinSock calls since this no longer happens in dcrt0.cc
startup code. Only do this if !winsock_init_p.
(winsock_init): checkinit renamed. Now just inits winsock
without checking whether it has been already initialized.
Make it static.
* uinfo.cc (uinfo_init): after we call getpwnam, we know
the passwd file has been read in so don't check initialization
of it. However, we do need to read_etc_group() if group_in_memory
isn't set.
* passwd.cc: rename global i variable to pw_pos, rename
passwd_in_memory to passwd_in_memory_p to match net.cc scheme.
Add comments.
(read_etc_passwd): make static
(various): make sure to read_etc_passwd() if passwd_in_memory
isn't set
* grp.cc: add comments, rename idx global to grp_pos,
rename group_in_memory to group_in_memory_p to match net.cc
scheme, group_in_memory_p no longer static (needs to be accessed
by uinfo_init)
* winsup.h: remove proto for socket_checkinit since that's
renamed and static within net.cc
Tue Nov 4 01:02:20 1997 Geoffrey Noer <noer@cygnus.com>
patch from cgf@bbc.com (Chris Faylor):
* signal.cc (sigprocmask): Newer versions of gcc will call
sigprocmask when a builtin constructor is activated. If this
happens prior to the setup of u->self, then a NULL dereference
will occur. Guard against this.
Mon Nov 3 17:00:45 1997 Geoffrey Noer <noer@cygnus.com>
patch from cgf@bbc.com (Chris Faylor):
* hinfo.cc (hinfo_vec::build_fhandler): Open a console for
/dev/tty when !use_tty.
Thu Oct 30 10:28:15 1997 Tom Tromey <tromey@cygnus.com>
* include/mapi.h: New file.
* sysdef/i386/mapi32.def (MAPISendMail@20): New export.
Thu Oct 30 15:08:13 1997 Geoffrey Noer <noer@cygnus.com>
* times.cc: add comments listing standards funcs are defined in
(dump_filetime): remove unused local func
* net.cc (fail): remove local func, replace one reference with
equivalent debug_printf, add standards comments, reformat a little
(fhandler_socket::close): simplify handling of res
(fhandler_socket::fstat): set ENOSYS (unimplemented)
* stubs.cc: set ENOSYS in unimplemented funcs
* uname.cc: add standards comment
* ntea.cc: reformat
Wed Oct 29 22:43:57 1997 Geoffrey Noer <noer@cygnus.com>
* times.cc (settimeofday): set ENOSYS instead of EPERM
since ENOSYS maps to "Function not implemented" which is the
case here.
* syscalls.cc (seterrno): on failure, set EACCES instead of EPERM
which is better for the unknown error case
Fri Oct 24 01:24:07 1997 Geoffrey Noer <noer@cygnus.com>
patch from green@cygnus.com (Anthony Green):
* dcrt0.cc: new host_dependent_constants object with a global
instance of it which allows constants that are different in Win 95
and NT to be saved here instead of having forks in the code and
having to check the OS type each time. Add two constants for
fhandler, one for sharing attributes and one for upper word value
for locking files.
(dll_crt0_1): call host_dependent init function
* fhandler.cc (fhandler_base::open): use above object for
setting shared attributes
(fhandler_disk_file::lock): get upper word for locking from
host_dependent_constants
* winsup.h: define host_dependent_constants class and add extern
for global instance of it
Wed Oct 22 02:27:53 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* cygwin.din: Export getenv, putenv, setenv and unsetenv instead
of cygwin32_ wrappers
* dcrt0.cc: External variable environ removed
(dll_crt0_1): strip executable's path on console title if
environment variable CYGWIN_TITLE set to "strip", references to
environ removed.
* environ.cc: New file. Code derived from newlib sources.
* exec.cc: include stdlib.h
(execl, execv): new (derived from newlib sources).
(sexecve): reference to environ removed.
(sexecvpe): call getenv instead of cygwin32_getenv.
* grp.cc: new static variable group_in_memory
(read_etc_group): skip blank lines
(getgrgid, getgrnam, getgrent): call read_etc_group when necessary.
* misc.cc (cygwin32_getenv/putenv/setenv/unsetenv): remove
wrappers.
* passwd.cc: new static variable passwd_in_memory
(read_etc_passwd): skip blank lines
(search_for, getpwent): call read_etc_passwd when necessary.
(setpwent): fixed incorrect initialization of i var.
* pinfo.cc (pinfo_init): initialize uid with illegal value to
force read of /etc/passwd and /etc/group.
* spawn.cc: call getenv instead cygwin32_getenv
(spawn_guts): force read of /etc/passwd and /etc/group on sexec
calls.
* uinfo.cc (uinfo_init): read /etc/passwd and /etc/group only if
uid is undefined.
* winsup.h: remove protos for environ, cygwin32_getenv,
cygwin32_putenv
Wed Oct 22 02:08:54 1997 Geoffrey Noer <noer@cygnus.com>
* utils/aclocal.m4: new file. Define autoconf macros for
determining whether we're compiling for the cygwin32 environment
or not and determine the executable suffix
* utils/configure.in: call AM_CYGWIN32 and AM_EXEEXT
* utils/configure: regenerate
* utils/Makefile.in: add $(exeext) after executable names so
programs will be built with the .exe suffix
Wed Oct 22 00:50:27 1997 Geoffrey Noer <noer@cygnus.com>
Now that it is possible to use gdb using a stable
cygwin.dll to debug a program using a newer, potentially buggy
cygwin.dll, the strace mechanism will probably end up being
used more and more for debugging timing/race-condition bugs that
aren't easily exposed in a gdb session. The following changes
make the strace facility better for debugging timing issues by
storing the last few commands in a buffer instead of writing
to disk each function call.
patch from cgf@bbc.com (Chris Faylor):
* dcrt0.cc (dll_crt0_1): Change to strace_init call to take
an argument (for planned future registry changes).
(_exit): Call strace_dump when appropriate. Add a debugging
printf.
* include/sys/strace.h: Add _STRACE_CACHE, _STRACE_EXITDUMP,
strace_dump ().
* strace.c (strace_init): Allow hexadecimal, octal setting of
strace flags in environment variable. Handle new cache option.
(strace_printf): Display number of seconds from last message.
Handle _STRACE_CACHE.
(strace_dump): New function. Dump cached messages to disk.
Wed Oct 22 00:08:40 1997 Geoffrey Noer <noer@cygnus.com>
* cygwin.din: export socket calls without cygwin32_ prefix
* net.cc: remove unused herror function in favor of
cygwin32_herror which is exported as herror
* include/netdb.h: we are now exporting the socket calls without
the cygwin32_ prefix so we don't need the nasty remapping in
header files
* include/arpa/inet.h: ditto
* include/sys/socket.h: ditto
* select.cc (select): make extern C
Tue Oct 21 22:52:29 1997 Geoffrey Noer <noer@cygnus.com>
patch from cgf@bbc.com (Chris Faylor):
* sigproc.cc (sigproc_terminate): Fix flawed attempt to signal
any processes waiting for signal notification success when the
process receiving the signal is terminating.
(wait_subproc): Report on errors when opening the
sync_proc_subproc mutex. Move initialization of events[0]
"wakeup" signal prior to wait_subproc_inited or risk a (miniscule)
chance for a reference to a NULL handle.
* strace.cc (ta[]): Change WM_ASYNCIO entry to reflect previous
changes to WM_ASYNCIO constant.
Tue Oct 21 14:30:14 1997 Geoffrey Noer <noer@cygnus.com>
patch from cgf@bbc.com (Chris Faylor):
* sigproc.cc (proc_subproc): fix minor error output problem
Mon Oct 20 20:19:02 1997 Geoffrey Noer <noer@cygnus.com>
* Makefile.in: change DLL_NAME to cygwin97r2.dll
Mon Oct 20 20:16:47 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* window.cc (alarm): When there is a previous alarm() request
with less than one second remaining, then the return from a call
to alarm() is supposed to return 1.
Mon Oct 20 20:16:47 1997 Geoffrey Noer <noer@cygnus.com>
patch from cgf@bbc.com (Chris Faylor):
* Makefile.in: Add sigproc.o target. Add sigproc.h dependency
where appropriate. Add -s to intermediate ld of cygwin.dll to
speed up the process of building the .dll.
* dcrt0.cc: Add new sigproc.h include.
(dll_crt0_1): Replace window_init with sigproc_init for
initialization of signal/sub process handling. Change to use new
process_state field in pinfo.
(_exit): Remove spurious debugging statement. Terminate sigproc
processing. Remove signal blocking obviated by previous signal
termination. Remove SIGCHLD notification of parent as it is now
handled automatically in the parent.
(api_fatal): Terminate sigproc processing.
* exceptions.cc: Add new sigproc.h include. Change name of
ourhThread.
(ctrl_c_handler): Change to static as this is no longer called
outside of this module.
(lock_cs): Change to a function which will optionally grab new
signal dispatch mutex. Don't wait forever for cs mutex.
(unlock_cs): Change to a function which will optionally release
new signal dispatch mutex.
(init_exceptions): Detect errors from SetConsoleCtrlHandler.
Initialize new sig_dispatch mutex. This mutex is used to
control dispatching to a function on signal receipt.
(sig_dispatch_pending): New function. Called from signal
processing thread to dispatch pending signals.
(set_process_mask): Block signal dispatch during setting of new
mask, if possible. Contact signal thread to dispatch pending
signals.
(handle_sigsuspend): New function. Attempts to implement a
sigsuspend which will not lose signal notification. Called from
sigsuspend.
(call_handler): Use sigproc_printf where appropriate.
(ctrl_c_handler): Use _raise to invoke the correct signal.
(sighandle): New function. Subsumes most of ctrl_c_handler.
Change to mark as suspended signals which would dispatch for which
the sig_dispatch mutex is unavailable. Use sigproc_printf where
appropriate.
(events_init): Remove application_stopped mutex made obsolete by
new sigproc handling.
(events_terminate): Remove application_stopped mutex made
obsolete by new sigproc handling.
* fork.cc: Add new sigproc.h include.
(cygwin_fork_helper1): Use process_state field in pinfo (replaces
inuse_p). Call proc_register to add a new subproc to sigproc
handling. Call sigproc_init for new subprocess. Remove obsolete
window_init.
* heap.cc (_sbrk): Use process_state field in pinfo (replaces
split_heap_p).
* hinfo.cc (hmap_init): Use process_state field in pinfo (replaces
cygwin_parent_p).
* include/sys/strace.h: Add tracing for signal/subprocesses.
* init.cc: Add new sigproc.h include. Add waitq_storage global
for new sigproc handling.
(dll_entry): Add initialization, destruction of structures needed
by new sigproc handling.
* net.cc (fhandler_socket::ioctl): Use gethwnd() function to find
hwnd of hidden window.
* pinfo.cc: Add new sigproc.h include.
(pinfo::clearout): Use process_state field in pinfo (replaces
split_heap_p). Explicitly initialize various handles to NULL.
(pinfo_init): Use process_state field in pinfo (replaces
cygwin_parent_p).
(pinfo_list::operator): Use process_state field in pinfo (replaces
inuse_p).
(pinfo_list::alocate_pid): Initialize process_state field.
(pinfo::init_self): Remove obsolete initialization of hProcess.
(pinfo::record_death_nolock): Changes for new sigproc handling.
(pinfo::record_death): Move bulk of this code to sigproc.cc.
(pinfo::terminate): Remove function made obsolete by sigproc
handling.
(pinfo::init_from_exec): Use process_state field (replaces
inuse_p).
* signal.cc: Add new sigproc.h include.
(kill_worker): Call new sig_send function to send signals to
cygwin processes.
(_kill): Use process_state field in pinfo (replaces inuse_p).
(sigsuspend): Call handle_sigsuspend in exceptions.cc to handle
sigsuspend in a non-raceable way.
* sigproc.cc: New signal/subprocess handling module. Replaces
SendMessage method for signals with a method using semaphores.
Also detects changes in the state of child processes.
* sigproc.h: New header file defining constants and functions for
signal/subprocess handling.
* spawn.cc: Add new sigproc.h include. Clean up trailing spaces.
(spawn_guts): Reorganize to use new sigproc handling.
Use new pinfo process_state field (replaces inuse_p).
* syscalls.cc (_read): Use new pinfo process_state field (replaces
inuse_p).
(_write): ditto.
* tty.cc (tty_init): Use new pinfo process_state field (replaces
cygwin_parent_p).
* utils/ps.cc (main): Use new pinfo process_state field (replaces
inuse_p). Detect "zombie" processes similarly to UNIX ps.
* wait.cc: Add required includes.
(wait_found): Function obsoleted by new sigproc handling.
(wait4): Reorganize to use new sigproc handling.
* window.cc: Changes for new sigproc handling.
(WndProc): Remove SIGNAL handling obsoleted by new sigproc
handling. Use static window handle since the field has been
removed from pinfo. Use _raise where appropriate to send signals.
(Winmain): Replace global window handle with static since the
field has been removed from pinfo.
(window_init): Remove obsolete function.
(gethwnd): New function to allocate hidden window on demand rather
than at startup.
(window_terminate): Kill hidden window only if allocated.
(setitimer): Use gethwnd function to retrieve hidden window
handle.
* winsup.h: Remove stuff made obsolete by sigproc handling. Move
some constants to new sigproc.h header file. Remove inuse_p,
cygin_parent_p, split_heap_p. Replace with a single process_state
field. Define bit fields for process_state in an enum for easier
debugging.
Mon Oct 20 19:17:33 1997 Geoffrey Noer <noer@cygnus.com>
* sysdef/i386/winserve.def: remove ancient version of cygwin.din
* include/sgtty.h: remove since Cygwin32's tty handling doesn't
support bsd syntax/semantics
* include/sys/termios.h: change winsize struct to include
ws_xpixel and ws_ypixel members
* cygwin.din: remove export of ScreenCols, ScreenGetCursor,
ScreenRows, ScreenSetCursor, get_pid__5pinfo, getkey, _getkey,
kbhit, _kbhit, __small_printf = small_printf__FPCce
* key.cc: remove. Similar functionality exists in ncurses
which can be compiled for Cygwin32
* console.cc (ScreenCols, ScreenGetCursor, ScreenSetCursor,
ScreenRows): delete and delete SCREEN_ROWS/COLS defines
* pold.c: remove old pipe-related code that's no longer used
* include/regex.h: remove, it's not a part of cygwin.dll
* syscalls.cc: started to add comments including standards
information
(truncate): new
(ftruncate): length is an off_t, not a size_t. Add missing
return value to debug printf
* syscalls.h: ftruncate length is an off_t, add proto for truncate
patch from cgf@bbc.com (Chris Faylor):
* console.cc (fhandler_console::write): Recognize '@' as a valid
character to follow a '\e[' sequence or get 'Bad escape' errors.
Wed Oct 15 18:44:25 1997 Geoffrey Noer <noer@cygnus.com>
* cygwin.din: restore __main as an export
Mon Oct 13 18:41:09 1997 Geoffrey Noer <noer@cygnus.com>
* cygwin.din: revert renaming of __assert since that's
actually what it's supposed to be called
* assert.cc: ditto
Fri Oct 10 19:25:49 1997 Tom Tromey <tromey@cygnus.com>
* include/Windows32/Base.h: Moved typedefs of CHAR, SHORT, etc,
before all other uses in file.
Fri Oct 10 17:50:12 1997 Ian Lance Taylor <ian@cygnus.com>
* include/Windows32/Base.h: Only typedef CHAR, SHORT, and LONG if
VOID is not defined
Thu Oct 9 00:46:40 1997 Geoffrey Noer <noer@cygnus.com>
* cygwin.din: remove all libgcc.a exports. They don't
belong here since libgcc.a doesn't really relate to the
purpose of cygwin.dll, and (to make things worse) the contents
change over time.
* assert.cc: rename __assert to __cygwin32_assert
* exceptions.cc: rename __stack_trace to __cygwin32_stack_trace,
__cygwin_except_handler to __cygwin32_except_handler
* version.h: increment major and minor numbers
Tue Oct 7 12:52:25 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* dcrt0.cc (_exit): under Win 95, don't send SIGCHLD
unless special env variable is set. This works around a
problem where exiting a process can hang under Win 95.
Mon Oct 6 23:41:34 1997 Geoffrey Noer <noer@cygnus.com>
* regexp: new directory containing free regexp code by
Henry Spencer. Taken from the most recent release of NetBSD.
Write configure.in and Makefile.in, based on files from
winsup/utils.
* Makefile.in: build regexp directory and include objs in
cygwin.dll.
* stubs.cc: remove all reg* stubs except for regfree which
isn't provided by above code.
Mon Oct 6 13:35:48 1997 Geoffrey Noer <noer@cygnus.com>
* dcrt0.cc: remove asm idata3 terminator, now that ld is fixed
such that this is no longer necessary.
* libccrt0.cc: ditto
Mon Oct 6 13:14:00 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* spawn.cc (spawn_guts): return child's PID on
spawn (_P_NOWAIT,...) instead of child's handle.
(cwait): rewritten as a wrapper to waitpid.
Mon Oct 6 13:02:01 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* net.cc (socketpair): new
* cygwin.din: add socketpair export
Mon Oct 6 13:01:51 1997 Geoffrey Noer <noer@cygnus.com>
patch from cgf@bbc.com (Chris Faylor):
* dcrt0.cc: Remove obsolete call to fork_terminate.
* exceptions.cc: Respace, remove extraneous trailing whitespace.
Change critical section to mutex since there are supposedly
multi-processor problems with critical sections under NT.
Use "lock_cs" and "unlock_cs" macros to lock/unlock critical
regions.
(init_exceptions): Change critical section initialization to mutex
initialization.
(set_process_mask): Use locking macros to control access to
sig_mask.
(ctrl_c_handler): Use lock_cs/unlock_cs to control access.
(events_init): Use standard cygname function to create names for
shareable objects.
(events_init): Close cs mutex.
* fork.cc: Use event flags which are specific to the child being
forked. This prevents one process from prematurely activating
another. It also makes fork slightly more thread-safe.
(fork_init): Remove event initialization.
(fork_terminate): Remove function.
(cygwin_fork_helper1): Initialize events on a per-fork basis.
Events are inherited in child's pinfo structure.
Remove child->hThread initialization as it not needed. Use
pi.hThread where child->hThread is used.
Work around Windows 95 bug where a WaitForSingleObjects will
sometimes return ERROR_INVALID_HANDLE when it is resumed after
a suspend.
* pinfo.cc: Remove references to hThread field whereever it occurs.
* strace.cc: Use standard cygname function to create name for
strace_mutex. Prevents confusion between different .dll versions.
* wait.cc (wait_found): Remove reference to hThread.
* winsup.h (class pinfo): Remove reference to hThread. Add
per-process fork control event handles.
* include/limits.h: Increase NGROUPS_MAX from 0 to 1 to reflect
recent change to getgroups.
Mon Oct 6 11:06:22 1997 Geoffrey Noer <noer@cygnus.com>
Oops. ../libio refers to objdir and is not the same
as $(srcdir)/../libio.
Thu Oct 2 23:12:19 1997 Geoffrey Noer <noer@cygnus.com>
Revert patches to sources applied after Sept 16. Removed
relevant portions of ChangeLog entries. Some of those changes
may reappear later (removing the entries makes this log easier
to understand).
Thu Oct 2 15:34:03 1997 Geoffrey Noer <noer@cygnus.com>
* Makefile.in: remove hardcoding of SHELL to /bin/sh, remove
../libio from INCLUDES since $(srcdir)/../libio is already
included.
* glob/Makefile.in: remove hardcoding of SHELL to /bin/sh
Mon Sep 29 14:06:24 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* cygwin.din: add exports for rcmd, rresvport, rexec
* net.cc (cygwin32_rcmd): new
(cygwin32_rresvport): new
(cygwin32_rexec): new
* include/mywinsock.h: add protos for Winsock calls associated
with functions called by the above.
Mon Sep 29 13:26:24 1997 Geoffrey Noer <noer@cygnus.com>
patch from cgf@bbc.com (Chris Faylor):
* grp.cc (getgrent): Change overlooked comment to reflect new
behavior.
Thu Sep 25 18:35:49 1997 Geoffrey Noer <noer@cygnus.com>
* Makefile.in: remove debugdll defs since the shared memory
overlap problem is solved by the timestamp addition of Sept 23
* version.h: rework explanations of version numbers
Thu Sep 25 16:21:49 1997 Geoffrey Noer <noer@cygnus.com>
* spawn.cc: add missing cast to debug printf
Thu Sep 25 16:14:17 1997 Ian Lance Taylor <ian@cygnus.com>
* path.cc (conv_to_win32_path): Call backslashify on a win32
path.
Tue Sep 23 17:58:17 1997 Geoffrey Noer <noer@cygnus.com>
Fixes for things that were causing compile-time warnings:
* exec.cc (_execve): add missing const to args to match def
of execve in newlib which this calls.
(sexecve): add missing const to def
(sexeclpe): don't need to cast argv in sexecvpe call
(sexecvpe): add missing const to def
* winsup.h: correct _execve proto, add protos for login/logout
* syscalls.h: correct sexecve, sexecvpe protos
* include/Windows32/Base.h: NULL should be defined differently
for C++
* init.cc: respacing
Tue Sep 23 17:05:50 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* dcrt0.cc (dll_crt0_1): don't use alloca for allocating storage
for environment blocks because setenv() uses realloc!
Tue Sep 23 17:05:50 1997 Geoffrey Noer <noer@cygnus.com>
patch from cgf@bbc.com (Chris Faylor):
* Makefile.in (LD_STUFF): Add datestamp.o after DLL_OFILES.
(datestamp.o): New target. datestamp.c is generated whenever .o
files change. It creates a file containing a "date stamp"
which is used by the function "cygname" to create named
shared memory, events, mutexes, and semaphores used by
cygwin.dll. The unique datestamp allows multiple loading of
different cygwin.dll's even when they have incompatible use
of shared memory areas.
* init.cc (dll_entry): Create the name string used by cygname
from the name of the invoking .dll + the datestamp of the
.dll from the auto-generated datestamp.c
* misc.cc (cygname): New function. Creates a standard Cygnus
shared resource name given a prefix, a name (e.g., pinfo_mutex),
and a numeric suffix (e.g., a pid). Replaces custom code in
several files. Uses cygwin_dlldate from datestamp.c to construct
names that are unique for a given cygwin load.
* shared.cc (open_shared_file_map): Use standard cygname function
to create names for sharable objects. Use static handle 'h'
so that it can be closed later by shared_terminate.
(shared_terminate): Guard against calling CloseHandle with a
NULL handle.
(create_shared_fd_mapping_name): Use cygname function to generate
the name for the "fd_map".
Tue Sep 16 23:34:36 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* fcntl.cc (_fcntl): correct errno value (EBADF instead of
EBADFD).
Tue Sep 16 17:22:28 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* include/Windows32/Defines.h: add missing defines needed
for NTEA usage.
* ntea.cc: remove them from here
* syscalls.cc (_link): call CreateFile with FILE_WRITE_ATTRIBUTES
flag instead of GENERIC_WRITE
Tue Sep 16 17:22:28 1997 Geoffrey Noer <noer@cygnus.com>
patch from cgf@bbc.com (Chris Faylor):
* pinfo.cc (pinfo_init): Fix a NULL pointer dereference when PID
environment variable contains garbage.
Thu Sep 11 16:51:40 1997 Geoffrey Noer <noer@cygnus.com>
* syscalls.cc (ftruncate): read file pointer location at
beginning of function and restore it at the end
Thu Sep 11 15:35:10 1997 Ian Lance Taylor <ian@cygnus.com>
* path.cc (backslashify): Don't turn a single trailing slash into
a double trailing slash.
Wed Sep 10 11:40:55 1997 Ian Lance Taylor <ian@cygnus.com>
* include/Windows32/Structures.h: Add PACKED to PRINTDLG.
* include/Windows32/Functions.h: Add STDCALL to a few function
declarations.
Tue Sep 9 02:12:18 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* syscalls.cc (_link): Implement hard links under NT with NTFS
using the backup API. Default to copying the file (what we did
before).
Mon Sep 8 20:19:09 1997 Geoffrey Noer <noer@cygnus.com>
Merge in the following changes:
Thu Aug 21 13:30:12 1997 Ian Lance Taylor <ian@cygnus.com>
* assert.cc: New file.
* Makefile.in (DLL_OFILES): Add assert.o.
(assert.o): New target.
* pinfo.cc (cygwin32_winpid_to_pid): New C function.
* cygwin.din: Add cygwin32_winpid_to_pid.
* include/sys/cygwin.h: Include <sys/types.h>.
(cygwin32_winpid_to_pid): Declare.
* pinfo.cc (pinfo_init): Add debug_printf showing pid and pgid.
Wed Aug 20 13:24:30 1997 Ian Lance Taylor <ian@cygnus.com>
* spawn.cc (env_sort): New static function.
(spawn_guts): Sort the environment before passing it to
CreateProcess.
* exceptions.cc (exit_already): New file static variable.
(__cygwin_exception_handler): If exit_already is set, just
return. If we get an exception we don't recognize, let the next
exception handler handle it. Just ignore the INVALID_HANDLE
exception.
(really_exit): Remove file static exit_already variable; use the
global one.
(events_terminate): Set exit_already.
* include/Windows32/Defines.h (EXCEPTION_INVALID_HANDLE): Define.
(STATUS_INVALID_HANDLE): Define.
* include/Windows32/Functions.h: Declare some shell functions.
Mon Sep 8 17:40:46 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* dcrt0.cc (_exit): Kill the foreground process group on session
leader exit only if job control is in progress.
* exceptions.cc (ctrl_c_handler): protect the code with critical
section. This helps stability under Win 95.
* include/sys/strace.h: add new wm_printf macro
* signal.cc (kill_worker): window message number changed (window
messages WM_USER-WM_USER+0x100 reserved for common controls on
windows95). Debug print added.
* spawn.cc (spawn_guts): removed unneeded flag DETACHED_PROCESS.
* strace.cc: defines for SIGNAL and ASYNCIO messages added.
* tty.cc (create_tty_master): initialize speed fields of termios
structure.
(fhandler_pty_master::open): likewise.
* window.cc (WndProc): debug print added, window message number
changed.
* winsup.h: WM_ASYNCIO number changed.
Mon Sep 8 16:40:46 1997 Geoffrey Noer <noer@cygnus.com>
patch from cgf@bbc.com (Chris Faylor):
* fhandler.h: set_w_binary/set_r_binary now defined to
return void
* grp.cc (getgroups): always return an array of length 1 where
the element is the user's gid.
* pinfo.cc (pinfo_init): verify that we haven't exceeded the
maximum number of processes
(pinfo_list::allocate_pid): ditto
* include/Windows32/Functions.h: add noreturn attrib to ExitProcess
* include/sys/strace.h: change strace defs so strace-related
printfs will automatically add __FUNCTION__: to the beginning,
rename __sys_printf to strace_printf.
* *.cc: remove function names from debug printfs in favor of the
new scheme where they are automatically added, change __sys_printf
references (now strace_printf).
* smallprint.c (__small_vsprintf): new function displayer code
to support the above changes
Wed Sep 3 12:44:45 1997 Geoffrey Noer <noer@cygnus.com>
* Makefile.in: split subdir_do into subdir_dobefore and
subdir_doafter to reflect whether the subdir in question
should be built before or after the top level is built
(e.g. glob needs to be built before libcygwin.a but libcygwin.a
needs to be built before utils).
Thu Aug 28 12:09:39 1997 Geoffrey Noer <noer@cygnus.com>
* configure.in: when setting up EXE_LDFLAGS, correct the
location of crt0.o to ../../newlib since EXE_LDFLAGS is used
by Cygwin32 subdirectories where newlib is two directories up
instead of one.
* configure: regenerate with autoconf
Thu Aug 28 00:13:11 1997 Geoffrey Noer <noer@cygnus.com>
Replace all licensing-related headers in all Cygnus-owned
files. Instead of listing terms at the top of each file, now
we simply refer to:
* CYGWIN32_LICENSE: new file listing Cygwin32 licensing terms
Wed Aug 27 17:40:16 1997 Geoffrey Noer <noer@cygnus.com>
* cygwin.din: export random, srandom
Wed Aug 20 16:56:39 1997 Geoffrey Noer <noer@cygnus.com>
* Makefile.in: remove unused winsock-related build rules
that were commented out, minor comment changes, remove
test.exe build rule.
Wed Aug 20 14:45:17 1997 Geoffrey Noer <noer@cygnus.com>
* Makefile.in: link cygwin.dll with -lm -lgcc -lc -lgcc instead
of -lc -lm -lm -lgcc so lgcc finds abort(). Add definitions that
will eventually be used to build a cygwindebug.dll used by gdb
so gdb can debug a buggy cygwin.dll. Change some variable names
to have underscores in them (DLL_NAME, LIB_NAME, DEF_FILE, etc.).
Comment out text.exe build rule.
Tue Aug 19 20:41:51 1997 Geoffrey Noer <noer@cygnus.com>
* dcrt0.cc: respace, modify some comments slightly
Tue Aug 19 16:17:57 1997 Geoffrey Noer <noer@cygnus.com>
* Makefile.in: include ../libiberty/random.o, stop including
librx since it is LGPL'd code.
* stubs.cc: add stubs for regcomp, regexec, regerror, regfree
* dcrt0.cc (dll_crt0_1): default to not support tty/pty devs,
default to not displaying the running process in the title bar.
Fri Aug 15 18:23:43 1997 Rob Savoye <rob@cygnus.com>
Add mingw directory for the minimalist cygwin environment.
See mingw/ChangeLog for changes specific to that directory
* configure.in: Add mingw to AC_CONFIG_SUBDIR.
* configure: Regenerated from autoconf 2.12 with Cygnus patches.
* Makefile.in: Use subdir_do which uses the value of $SUBDIRS
rather than having seperate target for each directory.
* glob/Makefile.in: Add a phony target for install.
* configure.in: Add mingw to AC_CONFIG_SUBDIR.
Fri Aug 15 01:12:19 1997 Geoffrey Noer <noer@cygnus.com>
* times.cc: add missing extern "C"s around exported functions
Thu Aug 14 17:00:32 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* console.cc (fhandler_console::input_tcsetattr): clear iflag_ and
lflag_ when tty support enabled.
(FakeReadFile): do not interrupt read when tty support enabled.
Do not reset signal_arrived event.
* cygwin.din: add exports - cf(g)set(i)ospeed, login, logout, ttyslot
* dcrt0.cc (_exit): kill orphaned childs with SIGHUP and SIGCONT
on group leader exit, kill foreground process group on session
leader exit.
* dirsearch.cc (closedir): check for FindFirst() was called
* exceptions.cc: include mywinsock.h.
(call_handler): call WSACancelBlockingCall to try to interrupt
blocking winsock call, do PulseEvent() instead of SetEvent().
(ctrl_c_handler): clear pending SIGCONT on stop signals, clear all
pending stop signals on SIGCONT, suspend the thread before resuming
to avoid W95 bug, process pending signals on SIGCONT, add signals to
pending if the process is stopped.
* fcntl.cc (fcntl): some code rearrangement to always do debug printfs
on call exit.
* hinfo.cc: include stdio.h
(hinfo_vec::build_fhandler): always add ttynum to tty's filename
(hinfo_vec::dup2): fix return value initialization and errno setting.
* include/netdb.h: typedef for sig_t removed
* include/sys/termios.h: octal constants changed to hexadecimals
to simplify debugging.
* misc.cc: include unistd.h and utmp.h
(login): new
(logout): new
* pinfo.cc (lock_pinfo_for_update): debug printf added
(pinfo::record_death): mark processes as orphaned on group leader
exit.
* select.cc (cygwin32_select): ResetEvent() removed
* signal.cc: unneeded ResetEvents removed
(_kill): ignore stop signals from a member of orphaned process group,
kill self process the last on group kill.
(sigaction): reset pending SIGCHLD when the disposition is set to
default.
* spawn.cc (spawn_guts): ResetEvent removed
(cwait): do not interrupt the call
* strerror.cc: include stdio.h, reenable disabled cases, remove
duplicated cases, return decimal error value in the default case.
* syscalls.cc (setsid): set process group id to process id when setsid
called.
(setpgid): check for negative pgid
* syslog.cc (syslog): %m macro support added
* termios.cc (cfg(s)eti(o)speed): new fuctions needed to support
NIST PCTS requirements.
* tty.cc: include utmp.h.
(ttyslot): new
(tty_list::terminate): fill in utmp on tty master exit
(tty_list::allocate_tty): check for tty master pocess alive
(create_tty_master): fill in utmp
(do_input): restart tty output on interrupt
(fhandler_tty_slave::fhndler_tty_slave): ttynum logic moved to
build_fhandler.
(fhandler_tty_slave::open): set tty's session id to sid of the calling
process.
(fhandler_tty_slave::write): check for TOSTOP bit
(fhandler_tty_slave::fstat): allow access to tty to everyone
(fhandler_tty_slave::ioctl): check for TOSTOP bit
* tty.h: ttyslot prototype added
* wait.cc (wait4): check for valid value of option argument added
* winsup.h: define PID_ORPHANED, move tty_list array to the end
of shared area.
Thu Aug 14 11:42:59 1997 Ian Lance Taylor <ian@cygnus.com>
* path.cc (slash_unc_prefix_p): Correct check of path[3]. Permit
numbers after the host name.
* include/Windows32/Defines.h: Correct value for SM_CMETRICS,
SM_CXDRAG, SM_CYDRAG, SM_CXEDGE, SM_CYEDGE, SM_CXFIXEDFRAME,
SM_CYFIXEDFRAME, and add SM_MOUSEWHEELPRESENT.
Wed Aug 13 20:11:52 1997 Ian Lance Taylor <ian@cygnus.com>
* fork.cc (cygwin_fork_helper1): If we don't have a console, pass
DETACHED_PROCESS to CreateProcess.
* spawn.cc (spawn_guts): Likewise.
Tue Aug 12 19:51:32 1997 Ian Lance Taylor <ian@cygnus.com>
* include/Windows32/Structures.h (IMAGE_DOS_HEADER): Remove
dos_message and nt_signature fields; they aren't present in the
Windows header file.
Wed Aug 6 16:27:13 1997 Ian Lance Taylor <ian@cygnus.com>
* include/Windows32/Structures.h: Define LPMEASUREITEMSTRUCT as a
pointer to MEASUREITEMSTRUCT.
* syscalls.cc (_stat_worker): In directory case, only set
STD_WBITS in st_mode if FILE_ATTRIBUTE_READONLY is clear.
(access): Remove special case for directory.
* include/Windows32/Defines.h (HKEY_DYN_DATA): Define.
(REG_FULL_RESOURCE_DESCRIPTOR): Define.
(REG_RESOURCE_REQUIREMENTS_LIST): Define.
Mon Aug 4 21:15:05 1997 Andrew Cagney <cagney@b1.cygnus.com>
* glob/Makefile.in: Add include of newlib/libc/sys/cygwin32 to
explicit .c.o rule so that dirent.h is found.
Thu Jul 24 02:14:24 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* cygwin.din: fpathconf, initgroups - new exports
* console.cc: new static variable CONSOLE_SCREEN_BUFFER_INFO info
(fhandler_console::scroll_screen): local variable info removed
(fhandler_console::open): likewise
(fhandler_console::ioctl): likewise
(fhandler_console::clear_screen): likewise
(fhandler_console::cursor_set): likewise
(fhandler_console::cursor_rel): likewise
(fhandler_console::cursor_get): likewise
(fhandler_console::write_normal): fixed scroll region bug, termcap
"cs" entry works now
* dcrt0.cc (dll_crt0_1): set file API to use OEM charset, convert
command line from ANSI to OEM charset.
(_exit): clear stopsig value on process exit
* exceptions.cc (call_handler): add one millisecond delay before
SetEvent()
(ctrl_c_handler): clear pending stop signals on SIGCONT, do not send
SIGCHLD to parent on process resuming; some debug printfs added; do
not call _exit() in a context of signal handling thread (would cause
more harm than good); fixed a bug with SA_NOCLDSTOP flag.
* fhandler.cc (fhandler_base::open): use full win32 path name to
generate inode number namehash instead of unix filename.
* fork.cc (cygwin_fork_helper1): block all signals while child and
parent are in fork() code
* grp.cc (initgroups): new stub added
* include/limits.h: new posix defines added
* include/sys/termios.h: typedef speed_t as unsigned char
* path.cc (mount_info::conv_to_posix_path) bugfix
* pinfo.cc (pinfo_list::operator []): PID_NOT_IN_USE check added
(pinfo::record_death): set child's ppid to 1 on parent exit
* signal.cc (sleep): correct return value if sleep call was
interrupted
(_kill): correct return value if killed pid was not found.
(sigaction): correct return value on handling non-handlable
signals, clear pending ignored signals
(sigsuspend): sigsuspend call should always return -1 and set errno
to EINTR.
* spawn.cc: respace
* syscalls.cc: map ERROR_NO_DATA to EPIPE instead of ENODATA
(isatty): fixed return value
(fpathconf): new
(pathconf): rewritten
(ttyname): fixed return value
* sysconf.cc (sysconf): misc fixes
* termios.cc (tcsendbreak): corrected errno set
(tcdrain): likewise
(tcflush): likewise
(tcflow): likewise
(tcsetattr): likewise
(tcgetattr): likewise
(tcgetpgrp): likewise
(tcsetpgrp): likewise
* tty.cc (fhandler_tty_slave::ioctl): TCGETA/TCSETA support added
* wait.cc (_wait): wait() syscall should do not terminate if
a child is stopped.
(wait4): wait calls should wait childs only; fixed a bug with
nprocinfo count; fixed signal handling.
Thu Jul 24 02:10:25 1997 Geoffrey Noer <noer@cygnus.com>
* uname.cc: uname now outputs Cygwin32_NT or Cygwin32_95
instead of Cygwin32/NT or Cygwin32/95.
Thu Jul 24 02:10:25 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* cygwin.din: sexecve, sexecl, sexecle, sexeclp, sexeclpe,
sexecv, sexecp, sexecvpe - new exports
* exceptions.cc (ctrl_c_handler): do not raise SIGHUP on
CTRL_LOGOFF_EVENT to prevent termination of cygwin application
run as NT service on user logoff, raise SIGHUP instead of SIGQUIT
on system shutdown, clear stopped status in inuse_p on SIGCONT,
set stopped status on stop signals, call _exit() on process
termination in a context of signal thread to terminate while
in a blocking win32 syscall.
* exec.cc: include unistd.h and ctype.h.
(_execve): code moved to sexecve, call sexecve with a NULL hToken
handle.
(sexecve): new, check path, argv[0] and envp to null values,
pass nToken handle to spawn_guts().
(sexecl): new (code derived from spawn family of functions in
spawn.cc)
(sexecle): new
(sexeclp): new
(sexeclpe): new
(sexecv): new
(sexecp): new
(strccopy): new
(sexecvpe): new
* fhandler.cc (fhandler_base::fstat): add STD_RBITS and STD_WBITS
to st_mode of non-file handles.
(fhandler_dev_floppy::open): clear O_TRUNC bit.
(fhandler_dev_tape::open): likewise
* fhandler.h (fhandler_pty_master): new member pktmode (flag to
indicate pty's packet mode)
* fork.cc (cygwin_fork_helper1): call uinfo_init () in a child code
to read /etc/passwd, /etc/group into memory.
* hinfo.cc (hinfo_vec::build_fhandler): check socket names for right
inheritance on exec().
* include/Windows32/Defines.h: fixed a typo in LPSTR_TEXTCALLBACKA
definition
* include/Windows32/Functions.h: added prototype for
ImpersonateLoggedOnUser() API call.
* net.cc (cygwin32_socket): duplicate socket handle as inheritable
to avoid Windows95 socket inheritance bug, close the original socket.
(cygwin32_accept): likewise.
* path.cc (mount_info::conv_to_win32_path): do not add trailing
backslash to UNC device names like "\\.\a:", "\\.\tape0:" etc.
* pinfo.cc (pinfo::record_death_nolock) set PID_WAITING_FOR_PARENT
bit to inuse_p instead of assignment - inuse_p is a bit set now.
(pinfo::record_death): check PID_WAITING_FOR_PARENT bit instead of
comparison.
* select.cc (fd_pipe_map::convert_to_unix_fdset): deal with pipe
errors.
(pipethread): likewise
* shared.cc (create_shared_fd_table): allow any process to access
shared arg, needed for sexec() family implementation
* signal.cc (kill_worker): fixed a typo in debug printf
* spawn.cc (spawn_guts): new hToken argument (security token of
logged on user for sexec() calls implementation), added checks for
zero prog_arg and argv[0], if hToken is not NULL run
CreateProcessAsUser() on the current window station/desktop, or
just CreateProcess() otherwise, close hToken after the process is
created.
(_spawnve): pass NULL hToken to spawn_guts().
* syscalls.cc (_read): set process's read status while in a read call
(_write): set process's write status while in a write call
(stat_worker): if GetFileAttributes() fails, try to call fstat to
support raw devices
* syscalls.h: include windows.h, added sexec() family functions
prototypes.
* sysdef/i386/kernel32.def: ImpersonateLoggedOnUser - new export
* tty.cc: tty attachment logic changed - tty_list::count field
counts now number of tty opens, but not a number of processes,
attached to a tty.
(tty_init): do not call attach_tty() in a exec'ed process
(attach_tty): correct return value if !use_tty.
(tty::init): initialize pgid and hwnd fields.
(tty_list::terminate): clearout tty on master exit.
(tty_list::allocate_tty): fixed a bug in a tty allocation.
(fhandler_tty_master::init): on NT allow any process to open
tty-master process for handle duplication, create synchronisation
events with a world-wide access, initialize winsize structure with
a default values.
(fhandler_tty_slave::open): if a tty doesn't have process group set,
set it to a process group of current process.
(fhandler_tty_slave::write): added missed \n to debug print, tty
write synchronization moved to a more correct place.
(fhandler_tty_slave::read): Sleep time changed for conformance with
other sleeps.
(fhandler_tty_slave::tcsetattr): synchronization added
(fhandler_tty_slave::ioctl): initialize arg.winsize with a tty-stored
value, copy the result of ioctl call to winsize.
(fhandler_pty_master::fstat): small fix
(fhandler_pty_master::open): on NT allow any process to open
pty-master process for handle duplication, initialize winsize
structure with a default values.
(fhandler_pty_master::read): check for pipe errors, changes to support
packet mode
(fhandler_pty_master::ioctl): rewritten, no longer a stub.
(fhandler_pty_master::linearize/de_linearize): save/restore pktmode
value.
* tty.h (class tty): winsize - new member
* utils/ps.cc: show process status just after tty number field
* winsup.h: defines for new bits in inuse_p added, spawn_guts()
prototype changed.
Thu Jul 24 02:10:25 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* Makefile.in: Add tty.o to link and dependency lists, add
tty.h to headers list
* console.cc (fhandler_console::open): save open call flags
(fhandler_console::input_tcsetattr): clear all console modes if
tty support enabled
(FakeReadFile): restart read on signal delivering, changed CTRL
macro to CONTROL to avoid conflict with sys/termios.h, copy as
much as possible chars to output buffer instead of call to
undo_input after every char to prevent timeouts problem.
* cygwin.din: srandom, ptsname, grantpt, unlockpt - new exports.
* dcrt0.cc: include tty.h, new use_tty global variable.
(dll_crt0_1): call events_init() on application startup, set
use_tty to FALSE if CYGWIN_NOTTY environment variable is defined,
do not change console title if CYGWIN_NOTITLE environment
variable set, call tty_init().
(_exit): call tty_terminate(), events_terminate() and others
in the right order. All modifications of console title are
mutexed to allow tty code to obtain console window handle right.
* exceptions.cc (exception_init): initialization of signal_arrived
event moved to events_init().
(call_handler): raise signal arrived event after resuming main
thread.
(__cygwin_exception_handler): raise signal instead of calling
ctrl_c_handler, because exception handler is called in a context
of the thread, caused exception, and SuspendThread in call_handler
blocks itself :-)
(ctrl_c_handler): clear stopsig on SIGCONT delivery, call
ResumeThread until suspend count > 1, notify parent about child's
status changed. Care about handling SIGCONT signal. On stop
signals release vital mutexes used by stopped thread, save
signal number for wait(WUNTRACED) calls, notify parent about child's
status change. Do not stop processes running without job control
(when pgid == 0). Ensure that main thread is unblocked before
call _exit().
(events_init): new
(events_terminate): new
* fcntl.cc (_fcntl): use saved open flags on F_GETFL/F_SETFL instead
of game with access_ variable. Is this variable longer needed?
* fhandler.cc (fhandler_base::linearize/de_linearize): save/restore
openflags_ variable.
(fhandler_base::open): save file open flags.
* fhandler.h (fhandler_base): new openflags_ member, new member
functions get_flags/set_flags, new virtual functions ptsname,
dup_for_fork, tcget(set)pgrp
(fhandler_pipe): remove always_write/except_ready because pipes
are always write ready (not true...) and selectable on read.
new classes fhandler_tty_slave, fhandler_pty_master,
fhandler_tty_master
* fork.cc (cygwin_fork_helper1): inherit control tty number on fork,
call tty_init on child startup.
* hinfo.cc: include stdlib.h and ctype.h.
(hmap_init): take care on exec'ed processes.
(init_std_file_from_handle): open /dev/tty for standard handles if
tty usage enabled.
(build_fhandler): check for tty slave and pty master devices.
* include/exceptions.h: exception handler returns "int" (exception
handling code), not "void".
* include/termios.h: new defines, struct winsize must contain
ws_xpixel and ws_ypixel members (commented now to avoid
incompabilities with existing binaries. Should be uncommented in
next release.
* net.cc (gethostbyaddr): corrected return value
* passwd.cc (parse): remove trailing newline from password
lines (user's shell was reported with trailing newline before).
* pinfo.cc (lock_pinfo_for_update): open mutex code moved to
events_init() in exceptions.cc.
(destroy_pinfo_lock): removed, pinfo_mutex is now closed in
events_terminate() in exceptions.cc.
(init_self): the initial value for pgid must be 0 (no job-controlled
process).
* select.cc: all debug_printf's changed to select_printf.
(fd_pipe_map): new class to implement (polling...) select on pipes.
(pipethread): new
(cygwin32_select): comment out socket only case since generic
code (select on different types of handles) works for sockets too
but is interruptable. The case for always_ready_used is used now
and for polling select (zero timevalue). Changes to support
select on pipes.
* shared.cc (shared_info::initialize): initialize tty table.
* signal.cc (sleep/usleep/sigsuspend/pause): signal_arrived moved
from u area to dll's address space, signal_arrived is manual reset
event now.
(_raise): implemented as kill (self, sig).
(kill_worker): new. Use SendMessage instead of PostMessage to avoid
some timing problems.
* spawn.cc: include tty.h.
(spawn_guts) call close_all_files() on exec, call tty_terminate()
before process exit. Some changes due to moving signal_arrived to
dll's address space.
(_spawnve): inherit control tty number on spawn.
* syscalls.cc (close_all_files): reenabled. The code is ok after
all! The troubles were due to incorrect usage on exec() calls.
(setsid): no longer a stub
(ptsname): new
* termios.cc: all syscall_printf's changed to termios_printf.
(tcget(set)pgrp): rewritten, no longer a stub.
* times.cc (utimes): It looks like Win32 does not allow changing
times of directories, so just return success in this case.
* tty.cc: new file
(tty_init): new
(tty_terminate): new
(attach_tty): new
(detach_tty): new
(tty::init): new
(tty_list::terminate): new
(tty_list::connect_tty): new
(tty_list::free_tty): new
(tty_list::init): new
(tty_list::allocate_tty): new
(fhandler_tty_master::fhandler_tty_master): new
(create_tty_master): new
(fhandler_tty_master::init): new
(doecho): new
(do_input): new
(process_input): new
(do_output): new
(process_output): new
(process_ioctl): new
(fhandler_tty_slave::fhandler_tty_slave): new
(fhandler_tty_slave::open): new
(fhandler_tty_slave::init): new
(fhandler_tty_slave::close): new
(fhandler_tty_slave::write): new
(fhandler_tty_slave::read): new
(fhandler_tty_slave::linearize): new
(fhandler_tty_slave::de_linearize): new
(fhandler_tty_slave::dup): new
(fhandler_tty_slave::dup_for_fork): new
(fhandler_tty_slave::fstat): new
(fhandler_tty_slave::tcgetattr): new
(fhandler_tty_slave::tcsetattr): new
(fhandler_tty_slave::tcflush): new
(fhandler_tty_slave::tcsetpgrp): new
(fhandler_tty_slave::tcgetpgrp): new
(fhandler_tty_slave::send_ioctl_request): new
(fhandler_tty_slave::ioctl): new
(fhandler_pty_master::fhandler_pty_master): new
(fhandler_pty_master::fstat): new
(fhandler_pty_master::open): new
(fhandler_pty_master::close): new
(fhandler_pty_master::write): new
(fhandler_pty_master::read): new
(fhandler_pty_master::tcgetattr): new
(fhandler_pty_master::tcsetattr): new
(fhandler_pty_master::tcflush): new
(fhandler_pty_master::ioctl): new
(fhandler_pty_master::ptsname): new
(fhandler_pty_master::linearize): new
(fhandler_pty_master::de_linearize): new
(fhandler_pty_master::dup_for_fork): new
(grantpt): new
(unlockpt): new
* tty.h: new
* utils/ps.cc: display process's control tty number.
* wait.cc (wait_for_single): removed.
(wait_for_any): all code moved to wait4().
(wait4): rescan process table on child status changes, support for
WUNTRACED flag, avoid time races on child exit, correct return
value on timeout.
* window.cc: misc changes to wait creation of process's hidden
window to avoid race conditions on multiprocessor systems.
* winsup.h: misc changes to support all of the above.
Thu Jul 24 02:10:25 1997 Geoffrey Noer <noer@cygnus.com>
* net.cc (cygwin32_shutdown): New implementation to replace
stub previously present
Tue Jul 22 14:59:22 1997 Geoffrey Noer <noer@cygnus.com>
* cygwin.din: remove random, srandom
* Makefile.in: remove random/srandom-related lines
Tue Jul 22 14:10:32 1997 Ian Lance Taylor <ian@cygnus.com>
* path.cc (realpath): New C function.
* cygwin.din: Export realpath.
* cygwin.din: Export srandom.
Wed Jul 9 12:26:03 1997 Geoffrey Noer <noer@cygnus.com>
* Makefile.in: libiberty random.o ends up in winsup, link
in that obj for now
Tue Jul 8 14:02:41 1997 Ian Lance Taylor <ian@cygnus.com>
* libcmain.cc (main): Pass wShowWindow field from startup info to
WinMain.
Mon Jul 7 17:47:48 1997 Geoffrey Noer <noer@cygnus.com>
* path.cc: respace, reword comments
* times.cc (utimes): add FIXME
Tue Jun 24 18:31:27 1997 Geoffrey Noer <noer@cygnus.com>
* winsup.h: adjust protos to reflect the above, add enum os_type
which contains {winNT, win95, win32s, unknown}
* security.cc (is_nt): Delete
* syscalls.cc (windows_95): Delete
(get_os_type): New local function which returns os_type. Replaces
windows_95() and is_nt().
* fhandler.cc: Reformat. Call get_os_type() instead of
windows_95() and/or is_nt(), reorder so NT cases are first.
* mmap.cc: ditto
* net.cc: ditto
* syscalls.cc: ditto
* syslog.cc: ditto
* uname.cc (uname): call get_os_type to fill new our_os local
variable, check that when filling out utsname struct, default
to i386 when we can't find out the specific Intel processor
variant.
* fhandler.cc (get_file_owner): remove doit variable
(get_file_group): ditto
* mmap.cc: extern "C" individual functions instead of wrapper
around most of file.
* misc.cc: minor reformat
* heap.cc (_sbrk): split a = b = c statement into two to
make code clearer and avoid invalid C++ casting warning during
compile.
* path.cc (symlink_follow): initialize syml_p and exec_p to zero
* select.cc: respace
(selectthread): cast first arg of WINSOCK_FD_SET
* ntea.cc (NTReadEARaw): add missing casts in front of malloc calls
* utils/mount.cc: remove mixed option since that hasn't been
supported for quite some time
Sun Jun 22 17:27:03 1997 Ian Lance Taylor <ian@cygnus.com>
* include/windows.h: If RC_INVOKED is defined, don't include
limits.h, stdarg.h, Structures.h, Functions.h or Sockets.h, and
don't typedef BOOL.
* include/Windows32/Base.h: Don't do any typedefs if RC_INVOKED is
defined.
* include/Windows32/Sockets.h (MAXHOSTNAMELEN): Don't define if
already defined.
* include/sys/param.h (MAXHOSTNAMELEN): Likewise.
Fri Jun 20 11:06:09 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* include/sys/wait.h: correct operator precidence bug
in WIFSIGNALED
Thu Jun 19 12:58:45 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
Handle unblocked pending signals on sig_mask changes
* exceptions.cc (return_handler): renamed to set_process_mask
(set_process_mask): new; use to set process mask instead of direct
u->self->sig_mask manipulations.
* winsup.h: rename return_handler proto to set_process_mask
* signal.cc: throughout file, call set_process_mask() instead of
direct manipulations of u->self->sig_mask.
(pause): new
* cygwin.din: add pause() export
* syscalls.cc (system): correct return value
Wed Jun 18 22:01:56 1997 Geoffrey Noer <noer@cygnus.com>
* Makefile.in: add $(srcdir)/../newlib/libc/sys/cygwin32 to
the list of includes since that's where sys/dirent.h is
supposed to live
* include/sys/dirent.h: moved to newlib/libc/sys/cygwin32/sys
Wed Jun 18 13:56:47 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* signal.cc (sigsuspend): deal with pending unblocked signals
* winsup.h: add proto for return_handler (sigset_t)
Wed Jun 18 02:02:13 1997 Geoffrey Noer <noer@cygnus.com>
respaced console.cc, fhandler.cc, syscalls.cc, pinfo.cc,
fork.cc, spawn.cc
Tue Jun 17 14:57:09 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* cygwin.din: add getpgid, killpg exports, delete duplicate
random export
* fork.cc (cygwin_fork_helper1): inherit pgid and sid on fork
* misc.cc (cygwin32_*env): save environ value in __cygwin_environ
too. Is __cygwin_environ variable really neccessary? Why not
export cygwin.dll's environ variable with "__cygwin_environ" name?
* pinfo.cc (pinfo::init_self): initialize pgid and sid
* signal.cc (kill_worker): new
(_kill): rewritten to support process groups
(killpg): new
* spawn.cc (_spawnwe): inherit pgid and sid on spawn family calls
* stubs.cc (setpgrp, getpgrp): remove stubs
* syscalls.cc (setpgid, getpgid, setpgrp, getpgrp): new
* termios.cc (setpgid): remove stub
* utils/ps.cc (main): add pgid to output, change output
format
* wait.cc (wait_for_any): add intpid argument, arrays ctable and
ptable have now fixed MAXIMUM_WAIT_OBJECTS size to avoid extra
scan of process table, changes for process groups support.
(wait4): misc changes to support process groups
* winsup.h (pinfo class): add new variables pgid, sid.
Define __cygwin_environ.
Mon Jun 16 18:30:21 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* spawn.cc (spawn_guts): set child->hProcess and child->hThread,
CloseHandle on pi.hThread at end of spawn_guts instead of right
after starting the child process,
_P_WAIT needs to be handled separately from _P_OVERLAY
Sun Jun 15 23:51:10 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* cygwin.din: remove setenv/getenv-related exports,
export cygwin32_ equivalents
* exec.cc: check ?
* misc.cc (cygwin32_getenv): new
(cygwin32_putenv): new
cygwin32_setenv): new
(cygwin32_unsetenv): new
* spawn.cc: call cygwin32_getenv instead of getenv,
call spawn with *u->envptr instead of environ
* winsup.h: define **environ as extern, define *cygwin32_getenv
Sun Jun 15 20:51:09 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* Makefile.in: add ../libiberty/random.o to EXTRA_OFILES
* cygwin.din: remove exports of tgetent and _tgetent, added random
* exception.cc (exceptions_init): make OurThread handle
noniherittable, remove unused buf array.
(return_handler): add restmask argument (sig_mask value before
calling signal handler)
(call_handler): save sig_mask in user's stack before calling signal
handler, change PulseEvent() call to SetEvent() -- there were
losses of signal_arrived events if main thread was not in wait
state.
(ctrl_c_handler): add support for SIGIO signal.
* fhandler.cc (fhandler_base::linearize/delinearize):
save/restore async_ flag
(fhandler_base::fhandler_base): clear async_ flag
* fhandler.h: add async_ as new variable in fhandler_base,
add get_async/set_async functions
* misc.cc (tgetent): remove stub
* net.cc (fhandler_socket::write): raise SIGPIPE if write to
disconnected socket.
(cygwin32_accept): check the result of find_unused_handle() before
accept() call, set errno if no more file descriptors available.
(fhandler_socket::ioctl): add support for async I/O on sockets
* pinfo.cc (pinfo::clearout): clear sig_pending mask
* syscalls.cc (readv, writev): rewrite
* window.cc (WndProc): add support for async I/O
* winsup.h: define WM_ASYNCIO
Mon Jun 9 18:51:09 1997 Geoffrey Noer <noer@cygnus.com>
* include/winsock.h: fix protection wrapper name
Fri Jun 6 12:41:09 1997 Ian Lance Taylor <ian@cygnus.com>
* include/Windows32/Defines.h: Define CommonDlgExtendedError
return values (CDERR_*, PDERR_*, CFERR_*, FNERR_*). Define
TEXTMETRIC tmPitchAndFamily values (TMPF_*).
* include/dlgs.h: New file; just includes windows.h.
* include/cderr.h: Likewise.
* libcmain.cc (main): Don't pass the program name to WinMain.
* cygwin.din: Export strlwr and strupr.
* include/winreg.h: New file; just includes windows.h.
* include/winsock.h: New file; just includes windows.h and
Windows32/Sockets.h.
* include/Windows32/Sockets.h: Don't define u_char, et. al. if
_SYS_TYPES_H is defined. Undefine fd_set if it is defined.
* include/Windows32/Functions.h: Define MoveMemory, FillMemory,
and ZeroMemory as macros.
* times.cc (_timezone, _daylight, _tzname): New global variables.
(tzset): New function.
* cygwin.din: Don't set _timezone to timezone. Export tzset and
_tzset. Export _timezone, _daylight, and _tzname.
* dcrt0.cc (__cygwin_environ): New global variable.
(dll_crt0_1): Set __cygwin_environ to environ.
* cygwin.din: Export __cygwin_environ.
Thu Jun 5 17:52:02 1997 Ian Lance Taylor <ian@cygnus.com>
* times.cc (gettimeofday): Check return values and set tz_dsttime
correctly.
Wed Jun 4 00:04:33 1997 Geoffrey Noer <noer@cygnus.com>
* fhandler.cc (fhandler_pipe::lseek): new virtual function
* fhandler.h: add lseek to fhandler_pipe class
Tue Jun 3 19:20:47 1997 Ian Lance Taylor <ian@cygnus.com>
* include/Windows32/Defines.h (IMAGE_DOS_SIGNATURE): Define.
(IMAGE_NT_SIGNATURE): Define.
* include/Windows32/Structures.h (IMAGE_DOS_HEADER): Define.
Tue Jun 3 13:05:26 1997 Geoffrey Noer <noer@cygnus.com>
* console.cc: respace
* fhandler.h: add virtual off_t lseek to fhandler_socket and
fhandler_tty defs, respacing
Mon Jun 3 12:21:20 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* cygwin.din: export wait3, wait4
* dcrt0.cc (_exit): call fill_rusage
* exceptions.cc (ctrl_c_handler): increment rusage_self.ru_nsignals++
* fhandler.cc (fhandler_pipe::fhandler_pipe): new stub
* fhandler.h: add fhandler_pipe class
* hinfo.cc (hinfo_vec::build_fhandler): call
GetNumberOfConsoleInputEvents instead of GetConsoleScreenBufferInfo,
handle fhandler_pipe class
* pinfo.cc: include sys/resource.h,
(pinfo::clearout): erase memory associated with rusage_self
and rusage_children
* resource.cc (getrusage): rewrite
(add_timeval): new helper function
(add_rusage): new helper function
(fill_rusage): new helper function
* shared.cc (create_shared_fd_table): pass file mapping handle to
children letting them close it
* spawn.cc (spawn_guts): call fill_rusage and add_rusage as
appropriate
(cwait): ditto
* times.cc (__to_clock_t): add flag arg which says whether or not
to substract FACTOR from total
(times): also fill in tms_cstime and tms_cutime, add flag arg to
__to_clock_t calls
(totimeval): add extra flag passed on to __to_clock_t
(gettimeofday): add extra flag passed on to totimeval
* wait.cc (wait_for_single): add extra rusage arg, change
wait_found calls to account for extra arg
(wait_for_any): ditto
(_wait): call wait4 instead of waitpid
(wait_found): add rusage arg, deal with it calling add_rusage as
appropriate
(wait_pid): now just calls wait4
(wait4): was wait_pid but adds extra rusage arg and deals with it
(wait3): new, calls wait4
* winsup.h: include sys/resource.h, add rusage_self and
rusage_children to pinfo class, fix totimeval proto, add protos
for fill_rusage and add_rusage
* passwd.cc: include termios.h
(getpass): new
* stubs.cc (getpass): delete old stub
Tue Jun 3 14:51:47 1997 Ian Lance Taylor <ian@cygnus.com>
* times.cc (ftime): New function.
* cygwin.din: Export ftime.
Mon Jun 2 14:34:00 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* include/limits.h: NGROUPS_MAX should be 0
* include/asm/socket.h: add missing additional options
including SO_SNDBUF, SO_RCVBUF, et al
* include/sys/wait.h: include sys/resource.h, add protos for
wait3() and wait4().
Mon Jun 2 15:26:35 1997 Ian Lance Taylor <ian@cygnus.com>
* utils/configure.in: Call AC_PROG_INSTALL.
* utils/configure: Rebuild.
Mon Jun 2 11:44:14 1997 Geoffrey Noer <noer@cygnus.com>
* grp.cc (getgroups): new
* cygwin.din: export getgroups
Fri May 30 16:47:38 1997 Geoffrey Noer <noer@cygnus.com>
* uname.cc (uname): completely rewrite, using more of the
SYSTEM_INFO struct to figure out information (now x86 type is
set correctly in Windows 95.
* version.h: increment CYGWIN_DLL_VERSION_MINOR
* include/Windows32/Structures.h: SYSTEM_INFO struct's first
member is dwOemId, not dwOemID according to MS docs
Fri May 30 16:47:38 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* window.cc: new file
* Makefile.in: add window.cc to lists of source, object files,
and dependencies.
* console.cc: include <stdlib.h>, scroll_screen() added to
fhandler_console class,
add support for default screen attributes,
(open): set default_color on tty open
(linearize/delinearize): pass default_color to the child process
(clear_screen): fix Win95-specific bug, add support for
default_color.
(clear_to_eol): remove
(fhandler_console::fhandler_console): set default_color to
white on black
(char_command): add invisible screen attribute, misc changes
(FakeReadFile): do not convert AltGr-char to ESC-char sequence
to support international keyboards.
* cygwin.din: export setitimer, getitimer
* dcrt0.cc (dll_crt0_1): add call to window_init(), uppercase
environment vars only if started by a win32 process.
(_exit): add call to window_terminate()
* fhandler.cc: add mode argument to open() calls,
(fhandler_base::open): do not check for symlink in path_conv
calls, calls to set/get_file_attribute() instead of NTRead/WriteEA.
(fhandler_base::fstat): use get_file_attribute if possible
(fhandler_disk_file::open): remove unneeded unixattr checks
* fhandler.h: changes to support above.
* fork.cc (cygwin_fork_helper_1): pass umask value to the child,
call window_init() in child
* ntea.cc: enable EA calls, add FILE_FLAG_BACKUP_SEMANTICS
to CreateFile calls to support EA of directories.
* path.cc (symlink): add mode argument to _open call, remove
unneeded stuff
(symlink_check_worker): add checks for "system" attribute and EA.
* security.cc (get/set_file_attribute): new. Calls EA code now,
placeholders for NTFS security support.
* signal.cc (alarm): remove in favor of new implementation in
window.cc
(RemoteThread): remove
(_kill): use window messages to emulate signals on both NT and Win95
* spawn.cc (spawn_guts): call window_terminate on exec()
(cwait): correct return result code
(_spawnve): add umask inheritance, some bug fixes
* syscalls.cc (_open): add mode argument, umask support
(umask): rewritten
(chmod): try to set file attributes, set system bit on symlinks
(stat_worker): fix nlinks of directories, add mode argument
to _open() call.
* syscalls.h: add mode argument to _open() prototype
* winsup.h: changes to support above
Tue May 27 12:22:19 1997 Geoffrey Noer <noer@cygnus.com>
* times.cc (gettimeofday): return 0 on success instead of 1
(utimes): init res to 0
Wed May 21 11:29:24 1997 Geoffrey Noer <noer@cygnus.com>
* include/limits.h: define NGROUPS_MAX
Tue May 20 14:13:59 1997 Geoffrey Noer <noer@cygnus.com>
* passwd.cc: rename function setpwend to setpwent (typo)
* cygwin.din: ditto, also remove name__C9type_info from
exports list.
Wed May 14 17:38:39 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* signal.cc (sleep): call WaitForSingleObject instead of Sleep
(usleep): ditto
Wed May 7 15:34:07 1997 Geoffrey Noer <noer@cygnus.com>
Public gnu-win32 beta 18 release made
Sun May 4 15:34:07 1997 Geoffrey Noer <noer@cygnus.com>
patch from Mikey <jeffdb@netzone.com>:
* console.cc (FakeReadFile): FlushConsoleInputBuffer if
flags & ENABLE_LINE_INPUT and then return ReadFile
Fri May 2 10:53:10 1997 Geoffrey Noer <noer@cygnus.com>
* signal.cc: make exported functions extern "C"
* include/cygwin32/socket.h: replace values assigned to
IP_ definitions with ones suitable for use with WinSock.
* cygwin.din: add exports for sigpending, sigsuspend, remove
exports for __9type_infoPCc and before__9type_infoRC9type_info
* winsup.h: remove signal-related protos from winsup.h in favor
of newlib/libc/include/sys/signal.h
patch from sos@prospect.com.ru (Sergey Okhapkin):
* signal.cc: (sigpending) new
(sigsuspend): new
* utils/termcap: replace with one from Linux
Tue Apr 29 19:03:29 1997 Geoffrey Noer <noer@cygnus.com>
* utils/ps.cc: print Win32 pid as unsigned int so Windows 95
pids don't show up as negative values
Tue Apr 29 17:20:57 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* spawn.cc (spawn_guts): allocate new cygwin PID for a child
created with spawn(!_P_OVERLAY)
Tue Apr 29 13:24:59 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* console.cc: assorted console fixes
* select.cc (fd_socket_map::convert_to_unix_fdset): only
do full debug_printf if used_ valid
* exceptions.cc: correct constants used for checking size of
stack (should be negated)
* fhandler.cc (fhandler_base::open): fix syscall_printf typo
patch from marcus@cathcart.sysc.pdx.edu (Marcus Daniels):
* include/sys/mman.h: define MAP_ANON MAP_ANONYMOUS (typo fix)
Mon Apr 28 15:19:44 1997 Geoffrey Noer <noer@cygnus.com>
* cygwin.din: remove libgcc2.a internal functions
Mon Apr 28 14:57:04 1997 Michael Meissner <meissner@cygnus.com>
* cygwin.din (before__9type_infoRC9type_info): Remove, the
type_info::before(type_info const &) function no longer seems to
exist.
Mon Apr 28 14:19:44 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* console.cc (undo_input): new
(scroll_screen): new
(fhandler_console::output_tcsetattr): fix debug printf
(fhandler_console::input_tcsetattr): no longer call set_w_binary
(fhandler_console::cursor_get): fix base_chars
(fhandler_console::char_command): make savex, savey globals,
add char buf, add code to handle clears better, many other
additions
(fhandler_console::write_normal): assorted fixes
(fhandler_console::write): move screen scroll code to
scroll_screen(), support Reset Linux terminal, Restore cursor
position, Save cursor position, Skip orig_colors
(FakeReadFile): enlarge keytable to include shift/control/alt
values
Command set still missing set pelette, character sets, and
UTF codes.
Mon Apr 28 12:19:44 1997 Geoffrey Noer <noer@cygnus.com>
* fhandler.cc (fhandler_base::open): only include
FILE_SHARE_DELETE in shared when running NT (Win 95 doesn't
support it).
Thu Apr 24 18:57:21 1997 Geoffrey Noer <noer@cygnus.com>
patch from Jeremy Allison <jra@cygnus.com>:
Correct problem caused by setting /dev/null fd to -1 which is
same as INVALID_HANDLE_VALUE.
* fhandler.h: set DEV_NULL_HANDLE_VALUE to -2
* fhandler.cc (fhandler_dev_null::open): set handle to
DEV_NULL_HANDLE_VALUE instead of INVALID_HANDLE_VALUE
* hinfo.cc (hinfo_vec::build_fhandler): add case for
handle == (HANDLE) DEV_NULL_HANDLE_VALUE
Thu Apr 24 15:12:13 1997 Geoffrey Noer <noer@cygnus.com>
* fhandler.cc (fhandler_base::write): catch return of raw_write
and return -1 if it failed
Thu Apr 24 10:42:01 1997 Geoffrey Noer <noer@cygnus.com>
path.cc (symlink): restore chmod call for now since the NTEA code
isn't quite up to the task yet.
patch from sos@prospect.com.ru (Sergey Okhapkin):
* exceptions.cc (ctrl_c_handler): corrections to Apr 18 patch
* fhandler.cc: ditto
* dcrt0.cc (dll_crt0_1): move console title setting code,
set up default signal handlers
* fork.cc (cygwin_fork_helper1): also set child->sigs and
child->sig_mask
* spawn.cc (spawn_guts): if mode _P_OVERLAY, set up child
signal handlers.
Mon Apr 21 22:29:49 1997 Geoffrey Noer <noer@cygnus.com>
* include/Windows32/ASCIIFunctions.h: remove old def of
GetEnvironmentStringsA, add new one based on def from Functions.h
* include/Windows32/Functions.h: define GetEnvironmentStrings as
GetEnvironmentStringsA when not unicode, remove definition of
GetEnvironmentStrings in favor of ones in ASCIIFunctions.h and
UnicodeFunctions.h
* include/Windows32/Defines.h: add missing XTYP_ definitions,
change value of XTYPF_NOBLOCK to 0x0002 from 0x2
* include/Windows32/Sockets.h: comment out redefinitions of
errno.h-type constants since MS doesn't define them and we
have our own in errno.h
Fri Apr 18 10:40:30 1997 Geoffrey Noer <noer@cygnus.com>
* include/Windows32/Structures.h: add typedefs for
LPDLGITEMTEMPLATE, PDLGITEMTEMPLATE.
* include/Windows32/Defines.h: define FW_REGULAR FW_NORMAL
patch from sos@prospect.com.ru (Sergey Okhapkin):
* exceptions.cc (ctrl_c_handler): do not reset signal
handler to SIG_DFL while processing the signal, instead
block the signal while handler executes.
* signal.cc (_raise): fixes related to the above
Thu Apr 17 23:50:50 1997 Geoffrey Noer <noer@cygnus.com>
* path.h: increase path length in mount table to MAX_PATH
in size instad of 30. This will increase cygwin.dll memory
usage by 20K. We need to remove static allocations from
path code.
Thu Apr 17 10:11:50 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* exceptions.cc (ctrl_c_handler): CTRL_CLOSE_EVENT should
generate SIGHUP instead of SIGQUIT
* signal.cc (_raise): rewrite
Wed Apr 16 10:42:46 1997 Geoffrey Noer <noer@cygnus.com>
* version.h: increment CYGWIN_DLL_VERSION_MINOR
* syscalls.cc (system): use spawnvp instead of fork/exec
* ntea.cc: make all functions return false for now; they
were causing an obscene performance hit
patch from sos@prospect.com.ru (Sergey Okhapkin):
* console.cc (FakeReadFile): patch to support EINTR, EIO
* exceptions.cc: add support for return_handler, remove
control-C counter
(return_handler): new
(ctrl_c_handler): handle SIGCHLD, other assorted fixes
* fhandler.cc (fstat): reset errno to 0
* passwd.cc (search_for): correct location of a debug printf
* select.cc: patches to handle signals better, respacing
* signal.cc (_raise): misc fixes
(_kill): call OpenProcess with PROCESS_ALL_ACCESS instead of
PROCESS_TERMINATE
* spawn.cc: more signal fixes
* syscalls.cc: add two new errors to errmap[]
(_stat_worker): fill out buf struct when stating directories
* wait.cc (wait_for_single): use INFINITE instead of large value
for timeouts
(wait_for_any): init nprocinfo to 1, not 0, other small fixes
* winsup.h: add signal_arrived to per_process class, reduce
amount of reserved space, add sig_pending to pinfo class
Tue Apr 15 17:01:34 1997 Geoffrey Noer <noer@cygnus.com>
* utils/mkpasswd.c: change default shell to /bin/sh
patch from sos@prospect.com.ru (Sergey Okhapkin):
* utils/kill.cc: support sending numbered signals using
signal code instead of just calling TerminateProcess
Tue Apr 15 15:24:55 1997 Ian Lance Taylor <ian@cygnus.com>
* utils/Makefile.in (INSTALL): Set to @INSTALL@.
(INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
(INSTALL_DATA): Set to @INSTALL_DATA@.
(INSTALL_XFORM): Remove.
(install): Depend upon installdirs. Use $(program_transform_name)
directly, rather than using $(INSTALL_XFORM).
(installdirs): New target.
Mon Apr 14 16:32:05 1997 Ian Lance Taylor <ian@cygnus.com>
* utils/Makefile.in (INSTALL): Change install.sh to install-sh.
Mon Apr 14 12:33:22 1997 Geoffrey Noer <noer@cygnus.com>
* registry.cc: change key name to "Cygnus Solutions" instead
of "Cygnus Support"
* security.cc: don't include windows.h, already in winsup.h
* Makefile.in: add dependencies section entries for security.cc
and ntea.cc
Fri Apr 11 00:03:49 1997 Geoffrey Noer <noer@cygnus.com>
* dcrt0.cc: add harmless cast to FreeEnvironmentStrings call
* registry.cc: added more presumed-harmless casts
* shared.cc: and another, and respacing
* utils/Makefile.in: don't need to link with -lkernel32 since it's
included automatically
* fhandler.cc: fhandler_console and FakeReadFile moved to
console.cc, stop including sys/stat.h, sys/param.h, sys/types.h,
stdio.h, ctype.h, pwd.h, grp.h, stdlib.h
reordered/respaced code so now we have all of fhandler_base, then
all of fhandler_disk_file, then all of fhandler_tty, etc...
(fhandler_base::ioctl): delete unused switch statement
* console.cc: added fhandler_console and FakeReadFile from
fhandler.cc, add includes necessary for this code
* grp.cc, Makefile.in: fix copyright dates
* ntea.cc: include string.h
Thu Apr 10 22:00:43 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* path.cc (symlink): do NTWriteEA instead of chmod using same
flags
Thu Apr 10 17:36:43 1997 Geoffrey Noer <noer@cygnus.com>
patch from gunther.ebert@ixos-leipzig.de (Gunther Ebert):
* Makefile.in: add libnetapi32.a to DLL_IMPORTS list, build security.o
* fhandler.cc (get_file_owner): new
(get_file_group): new
(fhandler_base::fstat): do another path_conv and check for error,
use get_file_owner and get_file_group to set buf->st_uid and
buf->st_gid
* fhandler.h: add protos for get_file_owner() and get_file_group()
* grp.cc (add_grp_line): new helper function
(read_etc_group): new helper function
(getgrgid): rewritten, no longer a stub
(getgrnam): rewritten, no longer a stub
(endgrent): rewritten, no longer a stub
(getgrent): rewritten, no longer a stub
* include/Windows32/ASCIIFunctions.h, include/Windows32/Base.h,
include/Windows32/Functions.h, include/Windows32/Defines.h,
include/Windows32/Structures.h, include/Windows32/UnicodeFunctions.h:
misc security/uid-related additions
* passwd.cc (add_pwd_line): new
(read_etc_passwd): new
(search_for): rewrite
(setpwend): rewritten, no longer a stub
(getpwent): rewritten, no longer a stub
(endpwent): rewritten, no longer a stub
* security.cc: new file
(get_world_sid): new
(world_full_access): new
(get_id_from_sid): new
(is_nt): new
* stubs.cc (endgrent): remove
(getgrent): remove
* syscalls.cc (rel2abssd): new
(set_process_privileges): new
(chown): now implemented for real for NT, still a stub in Win95
(_stat_worker): use get_file_owner and get_file_group to set
buf->st_uid and buf->st_gid
* uinfo.cc: add protos for read_etc_passwd, read_etc_group
(uinfo_init): call read_etc_passwd(), read_etc_group()
* utils/Makefile.in: build mkpasswd, mkgroup
* utils/mkgroup.c: new, use to make an /etc/group file
* utils/mkpasswd.c: new, use to make an /etc/passwd file
* winsup.h: add protos for is_nt(), get_id_from_sid()
patch from sos@prospect.com.ru (Sergey Okhapkin):
* Makefile.in: build ntea.o
* dcrt0.cc (dll_crt0_1): move console title code here from spawn_guts
* exceptions.cc (ctrl_c_handler): small signal fixes, prepare
things so we can eventually reset the signal handler to SIG_DFL
* fhandler.cc (fhandler_disk_file::open): first check for EA info
about exec/symlink status before doing it the hard way
(fhandler_make_pipe): u->self->hmap.build_fhandler takes extra arg
(fhandler_base::open): make use of NTEA
* fhandler.h: remove init_std_file_from_handle, build_fhandler
protos
* hinfo.cc: include mywinsock.h and sys/socket.h, define
__INSIDE_CYGWIN_NET__, __INSIDE_CYGWIN32__
(hinfo_vec::build_fhandler): takes an additional handle arg,
call GetConsoleScreenBufferInfo with it to see if are
fhandler_console, call GetCommState with it to see if we're
an fhandler_tty, call getpeername with it to see if we wamt
fhandler_socket. Old determining methods still work too.
* path.cc (symlink): chmod file to ((S_IFLNK) | (STD_RBITS) |
(STD_WBITS) | (STD_XBITS)) permissions
* select.cc: include stdio.h
(cygwin32_select): fix typo (missing an &),
assorted fixes for mixed socket/handles case
* shared.cc (create_shared_fd_table): set sa.bInheritHandle to 1
to support reparenting
* signal.cc (_kill): add FIXME, cleanup return codes
* spawn.cc (spawn_guts): remove console title code, add code
to support reparenting of child processes
* syscalls.cc: add new third arg to hmap.build_fhandler calls
(chmod): make use of NTWriteEA
* ntea.cc: new file, NTEA handling routines
* times.cc: fix value of NSPERSEC
(utimes): fix return value
* wait.cc: changes to support reparenting, change INFINITE to
constant 500 to avoid "blocking win32 syscalls and signals"
problem
* winsup.h: add NTReadEA, NTWriteEA protos, define REPARENTING,
fix build_fhandler proto to add new arg, add handles hrProcess and
hrThread
Tue Apr 9 00:25:33 1997 Geoffrey Noer <noer@cygnus.com>
* libcerr.cc: remove fixed size of sys_errlist array, figure out
sys_nerr from the sizeof the array rather than hard coding it.
* shared.cc (open_shared_file_map): add typecast
* signal.cc (_kill): SIGKILL should avoid exception handler
* fork.cc (cygwin_fork_helper1): don't call ExitProcess with a
negative arg on recreate_mmaps_after_fork failure
* include/Windows32/Defines.h: define VER_PLATFORM_WIN32_WINDOWS
patch from sos@prospect.com.ru (Sergey Okhapkin):
* dcrt0.cc: move reent_data from private address space to cygwin.dll
* fork.cc: copy parent's reent_data to the child
* cygwin.din: export reent_data
* winsup.h: add as public struct _reent reent_save to pinfo class
another patch from sos@prospect.com.ru (Sergey Okhapkin):
* winsup.h: add ctrl_c_handler prototype
* exceptions.cc (init_exceptions): don't use u->self->hThread
since for a spawned process, this contains thread id of parent
Win32 process, not the child's. Instead use GetCurrent* funcs
to get thread handle.
(ctrl_c_handler): add more signal support, especially for kill
* signal.cc (_kill): more signal support, using CreateRemoteThread
under NT. Win95 only supports SIGKILL since it doesn't have this
call.
* syscalls.cc (windows_95): first version check should be an &
of 0x80000000 instead of 0x8000000
(close_all_files): hmap[i] doesn't always exist, for now comment
out code
patch from marcus@sysc.pdx.edu (Marcus Daniels):
* path.cc (skip_n_slashes): new local function
(symlink_check_worker): new local function, used to be symlink_check
(symlink_check): calls symlink_check_worker and returns
whether path is a symlink or not.
(symlink_expand): new local function, expand a symlink into
a file or directory path using symlink_check_worker
(path_conv::path_conv): takes extra follow_mode arg
(symlink_follow): call symlink_expand
* fhandler.cc, syscalls.cc: fix path_conv references
* path.h: fix path_conv prototype
Mon Mar 24 19:44:28 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* select.cc: fix Feb 19 patch to select
* syscalls.cc: add statfs() and fstatfs() calls
* include/sys/vfs.h: new header file to support these
* cygwin.din: add them to dll export list
Tue Mar 18 18:10:24 1997 Geoffrey Noer <noer@cygnus.com>
* dcrt0.cc: change idata3 asm section to have five null fields
instead of eight to conform to how MS does this section.
Sun Mar 9 13:10:55 1997 Geoffrey Noer <noer@cygnus.com>
* include/sys/resource.h: add missing struct members to rusage struct
* resource.cc: added setting of missing fields, mostly to 0 until
we investigate how to set correct values.
Wed Feb 19 17:44:06 1997 Jeremy Allison <jra@cygnus.com>
* select.cc: Added fixes from sos@prospect.com.ru (Sergey Okhapkin)
to implement blocking select on sockets/handles. This isn't
the way I finally want to do this, but I won't get chance
to do the re-write for a month or two so...
* include/Windows32/Defines.h: Added defines for NT ACL
stuff.
Tue Feb 18 12:28:11 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* fhandler.cc: support reverse index escapes in console code
Fri Feb 14 18:55:01 1997 Jeremy Allison <jra@cygnus.com>
* path.cc: Fixed normalize_posix_path() so that double slashes
are removed, except for those starting a UNC path. The command
ls .///////FILE_IN_DIRECTORY works now.
Thu Feb 13 14:06:04 1997 Geoffrey Noer <noer@cygnus.com>
* path.cc: remove SLASH_P define and
* winsup.h: define it here instead
patch from scottk@utig.ig.utexas.edu (Scott Kempf):
dirsearch.cc (opendir): fix problem with accessing "/"
Mon Feb 10 13:57:11 1997 Geoffrey Noer <noer@cygnus.com>
patch from sos@prospect.com.ru (Sergey Okhapkin):
* misc.cc: replace nice () stub with Win32 implementation
* spawn.cc
* fork.cc: use priority returned by GetPriorityClass
Wed Feb 5 16:56:23 1997 Geoffrey Noer <noer@cygnus.com>
* fhandler.cc, syscalls.cc: minor reformat
patch from sos@prospect.com.ru (Sergey Okhapkin):
* spawn.cc: set console title to reflect what's running
* winsup.h: TITLESIZE define added
Mon Feb 3 16:53:10 1997 Geoffrey Noer <noer@cygnus.com>
* fhandler.h: fix typo
* fhandler.cc: check_execable_p should only take one arg now
Mon Feb 3 16:16:39 1997 Jeremy Allison <jra@cygnus.com>
* fhandler.cc: Removed open_helper, turned it into
fhandler_base::open and added fhandler_disk_file::open. More
correct C++.
fhandler_disk_file: Moved check_execable_p into fhandler_disk_file.
tty ports are now closed correctly.
* fhandler.h: Changes to support the above.
Fri Jan 31 19:14:34 1997 Geoffrey Noer <noer@cygnus.com>
* fhandler.cc (fhandler_base::open_helper): new function
containing the common open() code. symlink and executable
status defaults to 0.
(fhandler_tty::open): new function that calls
fhandler_base::open_helper
(fhandler_base::open): remove common code now in open_helper,
leaving symlink checking and executable checking
* fhandler.h: changes for the above, open_helper is protected
Thu Jan 30 15:23:15 1997 Geoffrey Noer <noer@cygnus.com>
* hinfo.cc: also treat com3 and com4 as special files
* spawn.cc (spawn_guts): check return of WaitForSingleObject
in _P_WAIT case, some reformatting
Tue Jan 28 10:46:16 1997 Jeremy Allison <jra@cygnus.com>
* net.cc: Added errors "WSAEINVAL", "WSAEFAULT" as these
can be returned for net calls.
* fhandler.cc: Added FILE_SHARE_DELETE to open share modes.
Much closer to POSIX on NT now (ignored on '95).
Fri Jan 17 13:32:26 1997 Geoffrey Noer <noer@cygnus.com>
* configure.in:
* utils/configure.in: define LIB_AC_PROG_CC to get around
autoconf 1.12 problem. Invoke it instead of AC_PROG_CC.
* configure:
* utils/configure: regenerate
Thu Jan 16 12:35:41 1997 Geoffrey Noer <noer@cygnus.com>
* mmap.cc: added missing copyright notice
Tue Jan 14 12:51:12 1997 Jeremy Allison <jra@cygnus.com>
* cygwin.din: Added get_osfhandle, cwait and all the
spawn functions.
* exec.cc: Added include of process.h. Changed call to
spawn_guts to add extra parameter.
* libcerr.cc: Added extra error messages. Ensured
messages start at zero.
* spawn.cc: Changed spawn_guts to do wait and nowait
calls. Added all spawn functions.
* syscalls.cc: Added get_osfhandle.
* winsup.h: Removed incorrect spawn definitions,
corrected prototypes for spawn_guts and file_exists
calls.
* include/io.h: New file. Added for get_osfhandle.
Thu Jan 9 14:20:01 1997 Jeremy Allison <jra@cygnus.com>
* exceptions.h: Moved from winsup to winsup/include.
* include/mywinsock.h: Added getprotobynumber and
getservbyport.
* Makefile.in: Moved exceptions.h dependency.
* cygwin.din: Added cygwin32_getprotobynumber and
cygwin32_getservbyport.
* net.cc: Added cygwin32_getprotobynumber and
cygwin32_getservbyport.
Wed Jan 8 14:15:35 1997 Jeremy Allison <jra@cygnus.com>
* fhandler.cc: Fix from Scott Kempf (scottk@rimu.ig.utexas.edu)
to ensure creation_disposition is set correctly in open.
Fri Jan 3 12:10:22 1997 Jeremy Allison <jra@cygnus.com>
* fork.cc: Added parameter to recreate_mmaps_after_fork
in child, and added set_child_mmap_ptr() call in parent.
Needed as cygwin.dll statics are not copied accros a fork.
* mmap.cc: Added parameter to recreate_mmaps_after_fork,
added set_child_mmap_ptr() call.
* winsup.h: Added mmap_ptr to pinfo struct. Removed obsolete
comments.
* Makefile.in: Added -I../libio, needed to rebuild source
using STL. Also added -nostdinc++ on recommendation of
Mike Stump (mrs@cygnus.com).
Thu Jan 2 17:23:10 1997 Jeremy Allison <jra@cygnus.com>
* dcrt0.cc: Added a call to initialize winsock on app
init.
* fork.cc: Added call so child initializes winsock before
returning from the fork. This makes many network daemons
run correctly that did not before (apache soon...).
* net.cc: Removed calls to checkinit, this is now done on
app startup. Renamed checkinit to socket_checkinit and
removed static scope.
* winsup.h: Added prototype for socket_checkinit().
Thu Jan 2 12:25:06 1997 Jeremy Allison <jra@cygnus.com>
* dcrt0.cc (api_fatal): Check that u and u->self are
not zero before indirecting through them.
* fork.cc: Changed security descriptor for fork
mutexes to allow access by all.
* pinfo.cc: Changed security descriptor for shared
area to allow access by all.
* shared.cc: Added get_null_sd() call to return
security descriptor allowing access by all. Needed
when a cygwin32 service is running and also interactive
cygwin32 apps by the current logged in user.
* winsup.h: Added prototype for get_null_sd().