Commit Graph

334 Commits

Author SHA1 Message Date
Christopher Faylor 644eb6fe96 * Makefile.in: Remove "make check" support. It is now in winsup/Makefile.in. 2000-09-03 04:01:56 +00:00
Christopher Faylor 312a668a22 Remove everything 2000-09-03 03:42:01 +00:00
Christopher Faylor 05a7c4f7a9 Remove README 2000-09-03 03:41:19 +00:00
Christopher Faylor 7c5ef07168 remove everything and move it up a level. 2000-09-03 03:40:29 +00:00
Christopher Faylor 0ef7862533 * sigproc.cc (mychild): New function.
(proc_subproc): Use mychild() to determine if a specific pid is valid for
wait()ing.
2000-09-02 01:19:58 +00:00
Christopher Faylor 837528aa51 * sigproc.cc (sigproc_init): Create wait_sig_inited without auto-reset to avoid
potential races.
(init_child_info): Avoid unneeded test.
2000-09-01 21:04:34 +00:00
Christopher Faylor 488c7683e3 * sigproc.cc (proc_info): Rename proc_exists which takes a pid to "pid_exists".
* shared.h: Split out "child_info" stuff into a new header file and use where
necessary.  Declare pid_exists.
* child_info.h: New file.
2000-09-01 20:54:22 +00:00
Christopher Faylor 83a27d401a * errno.cc (set_errno_from_win_error): Actually use arguments to strace_printf. 2000-08-31 20:07:53 +00:00
DJ Delorie e873a0c7f3 * times.cc (gettimeofday): use GetSystemTimeAsFileTime to avoid a
conversion
(FACTOR): correct value
(genf): set milliseconds to zero, DOW to 4.
2000-08-30 22:37:24 +00:00
DJ Delorie 4f2aac14aa * grp.cc (getgroups): fail with EINVAL if array is not large
enough to hold all supplementary group IDs.
2000-08-29 18:59:26 +00:00
Christopher Faylor d824bcf985 * signal.cc (_raise): New function.
* exceptions.cc (unused_sig_wrapper): Remove _raise.
* sigproc.h (class sigframe): Default frames to skip to zero or suffer from
exuberant optimization.
* fhandler_tty.cc (fhandler_tty::write): Set appropriate errno when WriteFile
to pipe fails.
2000-08-29 02:06:49 +00:00
Christopher Faylor fde520bf6c * pinfo.h (pinfo): Un-inline release.
* pinfo.cc (pinfo::release): Move here from pinfo.h.
* sigproc.cc (proc_terminate): Remove bogus 'pinfo child' which caused strange
destruction of random regions of memory when destructor was invoked.
2000-08-26 03:48:37 +00:00
Christopher Faylor 3c2c374555 * dcrt0.cc (dll_crt0_1): Move set_os_type.
(_dll_crt0): To here.
(cygwin_dll_init): And here.
* external.cc (fillout_pinfo): Use more foolproof method for scanning for pids.
* pinfo.cc (set_myself): Eliminate myself_identity.init.
* sigproc.cc (wait_sig): Do it here instead to reduce the amount of time where
there could potentially be two processes with the same pid.
* spawn.cc (spawn_guts): Eliminate duplicate initialization.
* include/sys/cygwin.h: Mark unused PID_* elements.
2000-08-26 01:36:20 +00:00
Corinna Vinschen cd59f61488 * exec.cc (_execve): Change definition according to declaration in
newlib/libc/include/sys/unistd.h.
2000-08-25 19:52:04 +00:00
Christopher Faylor 239b06b864 * external.cc (cygwin_internal): Add CW_INIT_EXCEPTIONS to allow cygwin
exception handling on threads not created by cygwin.
* sigproc.cc (proc_terminate): Don't release pinfo structs since we are
exiting.
* include/sys/cygwin.h: Add CW_INIT_EXCEPTIONS.
2000-08-25 02:27:42 +00:00
Christopher Faylor de43b06d7b * ps.cc (main): Always print a cygwin process using cygwin paths. 2000-08-24 22:04:29 +00:00
Christopher Faylor a3cfd73ac9 * select.cc (cygwin_select): Correct logic for "always_ready" fds or when there
is no wait specified.
* syslog.cc (pass_handler::set_message): Zero the buffer prior to setting it.
2000-08-24 21:19:14 +00:00
Christopher Faylor be8924c43b Change attribution. 2000-08-24 19:07:29 +00:00
Christopher Faylor 78b8497ba3 * include/cygwin/core_dump.h: New file, contains structures used in cygwin core
core files.
* include/sys/procfs.h: New file, needed to autoconfigure cygwin core dumps
support in bfd.
2000-08-24 18:39:27 +00:00
Christopher Faylor 5a41f96dbb * environ.cc (parse_thing): nobinmode should force O_TEXT.
(regopt): Use correct path to find LOCAL_MACHINE registry options.
* fhandler.cc (fhandler_base::open): Set binary mode only when binmode ==
O_BINARY.
* pipe.cc (pipe): Pipe handling should rely on binmode not _fmode now that the
two are different.
2000-08-24 17:54:43 +00:00
Christopher Faylor 123469a0e9 * include/sys/cygwin.h (strace_printf_wrap): Force printing when
_STRACE_SYSTEM.
(strace_printf_wrap1): Ditto.
2000-08-24 17:23:35 +00:00
Christopher Faylor d1be315740 * debug.h: Allow some debug defines for use in header files. 2000-08-24 16:33:03 +00:00
Christopher Faylor f5589e4118 * dcrt0.cc (dll_crt0_1): Move exception list and constructor stuff earlier in
the process.  Use new second argument to set_myself.
(cygwin_dll_init): Initialize exception list and constructor stuff here.
(_dll_crt0): And here.  Also, deal with inherited pinfo shared memory region
from parent.
* pinfo.cc (set_myself): Accept a second argument signifying the a shared
memory region, passed from an execing parent.
(pinfo_init): Ditto.
* pinfo.h: Ditto.
* shared.h (child_info): Add a handle field to pass to child.
* spawn.cc (spawn_guts): Create a shared handle to pass to an execed child.
* winsup.h: Remove extraneous declaration.
2000-08-24 04:07:50 +00:00
Christopher Faylor e1cf4ae80c Revert previous erroneous checkin. 2000-08-23 14:56:28 +00:00
Christopher Faylor c19e7ba723 * include/sys/cygwin.h: Protect class definitions. 2000-08-23 14:53:25 +00:00
Christopher Faylor e136f5c0e0 * path.cc (symlink_info::check): Clear error on each iteration of extension
check.
2000-08-22 17:59:53 +00:00
Christopher Faylor 6d75cb08b3 * Makefile.in: Don't include '.d' file if there are none generated yet. 2000-08-22 15:25:25 +00:00
Christopher Faylor d6483e830f * include/sys/cygwin.h: Declare some thread classes.
* include/mntent.h: Avoid declaring functions.
2000-08-22 15:12:29 +00:00
Christopher Faylor bccd5e0d85 * winsup.h: Eliminate inclusion of most of the cygwin .h files. Use .h files
only in sources which require them.
* Makefile.in: Generate dependencies with -MD option.
2000-08-22 05:10:20 +00:00
Christopher Faylor 9e2baf8dfa * cygerrno.h: New file. Use this throughout whenever errno manipulation is
required.
* errno.cc: Use DWORD to hold Windows errors.
(geterrno_from_win_error): New function.
(seterrno_from_win_error): Use geterrno_from_win_error to convert supplied
windows error (suggested by Corinna Vinschen).
* path.cc (symlink_info): Add error element.
* path.cc (path_conv::check): Remove errno setting.  Use new symlink_info errno
element to set path_conv error, where appropriate.
(symlink_info::check): Set error element rather than attempting to manipulate
errno.  Add more checks for trailing / and /..  even though they are currently
useless.  Avoid setting EINVAL.
* path.cc (normalize_posix_path): Correct check for trailing /.
2000-08-22 03:58:47 +00:00
Christopher Faylor 6b85369f82 Update copyright. 2000-08-21 18:27:38 +00:00
DJ Delorie d3bff3131f * include/cygwin/cygwin_dll.h (DECLARE_CYGWIN_DLL): hinstance,
not handle. (reverse of previous diff)
2000-08-21 18:15:50 +00:00
DJ Delorie 20ffb3ee16 * include/cygwin/cygwin_dll.h (DECLARE_CYGWIN_DLL): handle,
not hinstance.
2000-08-21 17:47:52 +00:00
Christopher Faylor 6052f47178 * Makefile.in: hinfo.o -> dtable.o. 2000-08-18 20:01:04 +00:00
Christopher Faylor dc999f678d hinfo -> dtable 2000-08-18 19:51:02 +00:00
Corinna Vinschen 83eda97dff * dtable.cc (dtable::dup2): Extend fdtab if newfd is out of current
allocated bounds.
2000-08-18 18:14:08 +00:00
Christopher Faylor e48a8ed6ec * mkvers.sh: Properly trap exit removal of temp file. Remove debugging
statement.
2000-08-12 05:48:51 +00:00
Christopher Faylor 84cf3d22e3 Correct order in include files. 2000-08-12 05:47:12 +00:00
Christopher Faylor b2007749a8 * poll.cc: Make winsup.h the first include file, re 2000-08-02 change. 2000-08-12 05:39:41 +00:00
Christopher Faylor e2ebe11776 * winsup.h: Split out dtable definitions into separate header file.
* dtable.h: New file.
* sigproc.h: Eliminate pinfo.h usage here.  Use it in source files that need
it.
2000-08-12 05:35:42 +00:00
Christopher Faylor 3ee92b51d6 * Makefile.in: Use dtable.o rather than hinfo.o. 2000-08-12 05:09:27 +00:00
Christopher Faylor 9015e0fb8c Rename hinfo -> dtable. Name the former dtable array 'fdtab'. 2000-08-12 04:48:44 +00:00
Corinna Vinschen 427b6d036e * poll.cc: Allow any descriptor and any number of descriptors.
Allocate fd_set struct sdynamically.
2000-08-11 20:34:24 +00:00
Christopher Faylor bbda7ca078 Fix premature use of fdtab. 2000-08-11 13:49:42 +00:00
Corinna Vinschen e82d75cc2b * poll.cc: Add bounds checking for file descriptors. Return POLLNVAL
if fd is invalid. Return POLLERR for each valid fd if cygwin_select
        returned with error.
        include/sys/poll.h: Change POLLERR comment according to above change.
2000-08-11 12:51:47 +00:00
Christopher Faylor 7b972f5da5 * syslog.cc (syslog): Use a less malloc-intensive method for allocating the
buffer.  Also fix a buffer overrun.
2000-08-11 01:56:05 +00:00
Christopher Faylor b5ae313ab5 * winsup.h: Change strchr inline for strange gcc problem.
* select.cc (select_stuff::wait): Bounds check w4 array.
2000-08-10 19:33:54 +00:00
Christopher Faylor b58f5598cb * dir.cc (readdir): Ensure that errno is *only* set when we've run out of
filenames.
* fhandler.cc (fhandler_disk_file::fstat): Use modern method for saving errno,
making it effective for the whole function.
2000-08-10 19:20:11 +00:00
Christopher Faylor 0072fdab86 * select.cc (allocfd_set): Zero allocated fd_set.
(cygwin_select): Move fd_set copying logic from ::wait to here.  Use common
return through sell.poll.
(select_stuff::wait): Just return success or failure and let caller fill in
fd_set.
* pinfo.h (pinfo): Eliminate self-referential pointer to sidbuf since pinfo
structure exists at random locations now.
* fork.cc (fork): Use 'use_psid' element to control when the psid is relevant.
* shared.cc (sec_user): Ditto.
* spawn.cc (spawn_guts): Ditto.
* uinfo.cc (internal_getlogin): Ditto.
* syscall.cc (seteuid): Ditto.  Set use_psid element.
2000-08-09 02:33:47 +00:00
DJ Delorie c51a2a8ba4 * fhandler_serial.cc (tcsendbreak): "sleeptime" argument to usleep()
must be in units of microseconds, not milliseconds.
2000-08-08 20:46:47 +00:00