summaryrefslogtreecommitdiffstats
path: root/winsup
Commit message (Collapse)AuthorAgeFilesLines
* * exceptions.cc (INIT_EXCEPTION_HANDLER): Eliminate.Christopher Faylor2001-04-303-94/+100
| | | | | | | | | | | | | | | | | | | | (init_exceptions): Just use init_exception_handler. (open_stackdumpfile): New function. (stack_info::first_time): Eliminate. (stack_info::init): Set up fields to avoid "first_time" consideration. (stack_info::walk): Remove "first_time" consideration. (stackdump): Change arguments to accept initial frame pointer and open stack file flag. (stack): Eliminate. (cygwin_stackdump): Use stackdump() rather than stack(). (try_to_debug): Remove all synchronization logic. Just keep looping in exception handler until debugger notices us. Return 1 if successfully started debugger. (handle_exceptions): Just return if we know that we're debugging. Reorganize to avoid creating a stackdump file if we are starting a debugger. Return from exception handler if debugger started successfully. (sig_handle): Create a stackdump only if debugger wasn't started. * winsup.h (try_to_debug): Add an argument.
* * path.cc (symlink_info::check): Remove extra arguments, move functionalityChristopher Faylor2001-04-302-46/+51
| | | | | | | | back to path_conv::check. Clear symlink bit from pflags argument before detecting if this is a symlink. (path_conv::check): Convert posix path here instead of symlink_info::check. Only grab volflags when using ntsec. (symlink_info::check_case): Just replace appropriate part of input path.
* minor formatting changes.Christopher Faylor2001-04-292-6/+6
|
* * passwd.cc (ttymnam): New function.Christopher Faylor2001-04-292-7/+24
| | | | (main): Use ttynam() to report name of tty.
* Throughout, change 'tty_attached' to 'real_tty_attached', for clarity.Christopher Faylor2001-04-2814-229/+281
| | | | | | | | | | | | | | | | | | | | | | | | | | | Throughout, change 'OutputStopped' to 'output_stopped', for consistency. * dtable.cc (stdio_init): Set controlling tty if not set by stdio opens. * exceptions.cc (ctrl_c_handler): Avoid special pgid checking if no tty is associated with the process. (Suggested by Tim Baker <dbaker@direct.ca>) * external.cc (fillout_pinfo): Return actual tty number for ctty. * fhandler_console.cc (get_tty_stuff): Set ctty when shared memory is allocated. Accept flags input from open(). (set_console_ctty): New function. (fhandler_console::open): Pass flags to get_tty_stuff and rely on this function to set the ctty, if appropriate. * fhandler_termios.cc (fhandler_termios::set_ctty): Move to tty_min class. * fhandler_tty.cc (fhandler_tty_slave::open): Use tc field to access set_ctty(). * tty.h (TTY_CONSOLE): Move to include/sys/cygwin.h. (tty_min): Add set_ctty class here. * include/sys/cygwin.h (TTY_CONSOLE): New home here. * path.cc (symlink_info): Make contents an actual buffer. Pass more flags to case_check. (path_conv::check): Reorganize to do parsing based on posix path rather than native path. (symlink_info::check): Expect posix path as input. Translate to native path here. Accept path_conv flags. Stop parsing if not a symlink regardless of whether previous path was a symlink.
* * thread.cc (thread_init_wrapper): Use _REENT_INIT to initialize the reentChristopher Faylor2001-04-275-11/+18
| | | | | | | structure of newlib. * sigproc.h (sig_send): Add exception parameter to sig_send. * sigproc.cc (sig_send): Ditto. Use it when setting frame info. * exceptions.cc (handle_exceptions): Use exception flag when calling sig_send.
* * winsup.api/mmaptest04.c: Take care for binmode explicitely.Corinna Vinschen2001-04-272-2/+10
|
* * tty.cc (tty::make_pipes): Set to_slave pipe mode to nonblocking.Egor Duda2001-04-273-4/+36
| | | | | * fhandler_tty.cc (fhandler_pty_master::accept_input): If pipe buffer is full, give slave a chance to read data.
* * security.cc (alloc_sd): Add unrelated ACCESS_ALLOWED_ACE behindCorinna Vinschen2001-04-262-8/+11
| | | | the `everyone' ACE.
* * sigproc.h [sigthread]: Add exception field.Christopher Faylor2001-04-254-3/+16
| | | | | | | [sigframe::~sigframe]: Clear exception field. [sigframe::set]: Set exception field from caller. * sigproc.cc (sig_send): Set exception field when frame pointer is passed in. * exceptions.cc (interrupt_on_return): Always treat exception as interruptible.
* * cygwin.din: Export asctime_r, ctime_r, gmtime_r, localtime_rEgor Duda2001-04-253-1/+15
| | | | * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 39
* * include/cygwin/version.h: Bump minor version number.Christopher Faylor2001-04-253-2/+7
| | | | * childinfo.h: Bump child structure magic number.
* * uinfo.cc (internal_getlogin): Return pointer to struct passwd.Corinna Vinschen2001-04-253-6/+12
| | | | | (uinfo_init): Accommodate the above change. * syscalls.cc (seteuid): Ditto.
* * autoload.cc: Add LoadDLLfunc statements for SetTokenInformation@16.Corinna Vinschen2001-04-2513-153/+276
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * cygheap.cc: Include security.h. * grp.cc (internal_getgrent): New function. (getgroups): Rearranged using `internal_getgrent' and the new `cygsid' class. * passwd.cc (internal_getpwent): New function. * sec_acl.cc: Use new `cygsid' class throughout. (acl_access): Use `internal_getgrent' instead of `getgrent'. * sec_helper.cc: Use new `cygsid' class throughout. (get_id_from_sid): Use `internal_getgrent' instead of `getgrent'. Use `internal_getpwent' instead of `getpwent'. * security.cc: Use new `cygsid' class throughout. * security.h: Move `MAX_SID_LEN' from winsup.h to here. Add extern declarations for `internal_getgrent' and `internal_getpwent'. (class cygsid): New class. * shared.cc (sec_user): Use new `cygsid' class. * syscalls.cc (seteuid): Try to set owner to user and primary group to current group in impersonation token before performing impersonation. (setegid): Try to set primary group in process token to the new group if ntsec is on. * uinfo.cc (internal_getlogin): Use new `cygsid' class. Try to set owner to user and primary group to current group in process token if the process has been started from a non cygwin process. (uinfo_init): Set primary group only if the process has been started from a non cygwin process. * winsup.h: Move define for `MAX_SID_LEN' to security.h.
* * fhandler_dsp.cc: Improved handling of 8 bit playback modes.Corinna Vinschen2001-04-252-3/+30
| | | | Put in mock support for SNDCTL_DSP_SETFRAGMENT.
* * lib/Makefile.in: Install libraries in /usr/lib/w32api when building forChristopher Faylor2001-04-252-10/+19
| | | | cygwin.
* * passwd.cc (getpwnam_r): Add pw_passwd handling as well.Corinna Vinschen2001-04-242-2/+13
| | | | (getpwuid_r): Ditto.
* * passwd.cc (getpwnam_r): Use correct offsets into buffer.Corinna Vinschen2001-04-242-6/+18
| | | | | Copy pw_gecos field as well. (getpwuid_r): Ditto.
* * include/winsock2.h: Protect one *more* newlib defines when compiling cygwin.Christopher Faylor2001-04-242-2/+7
|
* * dlmalloc.c: New file. Port of Doug Lea's mallocEgor Duda2001-04-2410-56/+4062
| | | | | | | | | | | | * dlmalloc.h: Ditto. * Makefile.in: Add support for MALLOC_DEBUG * config.h.in: Ditto. * winsup.h: Ditto. * configure.in: Add --enable-malloc-debugging option. * configure: Regenerate. * debug.h: Include declarations for debugging malloc. * tty.cc (grantpt): Fix definition. (unlockpt): Ditto.
* * include/winsock2.h: Protect some more newlib defines when compiling cygwinChristopher Faylor2001-04-242-1/+6
|
* Remove trailing underscore from fhandler_base and friends, throughout.Christopher Faylor2001-04-2413-66/+113
| | | | | | | | | | | | | | | | | | | | | | * fhandler.h (fhandler_base::set_open_status): New method. Stores original open status. (fhandler_base::get_open_status): New method. Retrieves original open status. (fhandler_base::reset_to_open_binmode): New method. * fhandler.cc (fhandler_base::open): Save open status. (fhandler_base::init): Ditto. * fhandler_clipboard.cc (fhandler_clipboard::open): Ditto. * fhandler_console.cc (fhandler_console::open): Ditto. * fhandler_dsp.cc (fhandler_dsp::open): Ditto. * fhandler_dev_mem.cc (fhandler_dev_mem::open): Ditto. * fhandler_dev_random.cc (fhandler_dev_random::open): Ditto. * fhandler_serial.cc (fhandler_serial::open): Ditto. * fhandler_tty_slave.cc (fhandler_tty_slave::open): Ditto. * fhandler_tty_master.cc (fhandler_tty_master::open): Ditto. * fhandler_dev_zero.cc (fhandler_dev_zero::open): Ditto. * syscalls.cc (setmode): Rework so that 0 mode value causes reversion to open state. * fhandler_tty_slave.cc (fhandler_tty_slave::read): Use correct multiplier when converting from deciseconds to milliseconds.
* * fhandler.h (fhandler_base::clear_r_binary): New method.Christopher Faylor2001-04-233-2/+18
| | | | | | (fhandler_base::clear_w_binary): New method. * syscalls.cc (setmode): Accept 0 as mode value. Resets text/binary behavior for fd to default.
* * include/winsock.h: Protect some more newlib defines when compiling cygwin.Christopher Faylor2001-04-232-1/+5
|
* * net.cc [errmap]: Add '0' condition.Christopher Faylor2001-04-233-2/+8
| | | | (find_winsock_errno): Don't translate no error to EPERM.
* spacing changes.Christopher Faylor2001-04-231-269/+270
|
* * include/cygwin/version.h: Bump Cygwin version and API version.Christopher Faylor2001-04-232-3/+8
|
* Mon Apr 23 9:27:00 2001 Robert Collins <rbtcollins@hotmail.com>Robert Collins2001-04-222-5/+9
| | | | * thread.cc (MTinterface::Init): Always initialise per process variables.
* * features.h: Reinstate as wrapper for sys/features.h.Christopher Faylor2001-04-222-0/+20
|
* * security.cc (alloc_sd): Reformat comment.Corinna Vinschen2001-04-223-8/+9
| | | | * shared.cc: Drop function declarations already in security.h.
* * shortcut.c (check_shortcut): Close input file handle before returning.Christopher Faylor2001-04-223-22/+31
| | | | | | * path.cc (check_sysfile): Ditto. (symlink_info::check): Rely on opened file handle being closed by symlink checking routines. Set ext_tacked_on when .lnk is detected.
* * thread.cc (MTinterface::Init): Remove accidentally checked in code.Christopher Faylor2001-04-212-2/+4
|
* Sun Apr 22 20:22:00 2001 Robert Collins <rbtcollins@hotmail.com>Robert Collins2001-04-214-37/+276
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * passwd.cc (getpwuid): Check for thread cancellation. (getpwuid_r): Ditto. (getpwname): Ditto. (getpwnam_r): Ditto. * thread.h (pthread_mutex): New constructors for pshared operation. (MTinterface): Associative array for pshared mutex's. * thread.cc (MTinterface::Init): Initailize pshared mutex array. (pthread_cond::BroadCast): Implementation notes. (pthread_cond::TimedWait): Remove use of SignalObjectAndWait on non-NT systems. (pthread_mutex::pthread_mutex(unsigned short)): New function. (pthread_mutex::pthread_mutex (pthread_mutex_t *, pthread_mutexattr *)):New function. (pthread_mutex::pthread_mutex(pthread_mutexattr *)): Fail on pshared mutex's. (__pthread_mutex_getpshared): New function. (__pthread_join): Check for thread cancellation. (__pthread_cond_timedwait): Support pshared mutex's. (__pthread_cond_wait): Ditto. (__pthread_condattr_setpshared): Error on PROCESS_SHARED requests. (__pthread_mutex_init): Support pshared mutex's. (__pthread_mutex_getprioceiling): Ditto. (__pthread_mutex_lock): Ditto. (__pthread_mutex_trylock): Ditto. (__pthread_mutex_unlock): Ditto. (__pthread_mutex_destroy): Ditto. (__pthread_mutex_setprioceiling): Ditto. (__pthread_mutexattr_setpshared): Support PTHREAD_PROCESS_PSHARED requests.
* * cygwin.din: Add *scanf and *scan_r functions.Christopher Faylor2001-04-202-0/+22
|
* * security.cc (set_process_privileges): Swap out.Corinna Vinschen2001-04-204-41/+50
| | | | | | | * sec_helper.cc (set_process_privilege): Rename from `set_process_privileges'. Takes the privilege to enable or disable as parameter now. * security.h: Add prototype for `set_process_privileges'.
* * path.cc (path_conv::check): Always initialize member variables.Christopher Faylor2001-04-202-5/+11
|
* * include/sys/file.h: More cleanup for X_OK.Christopher Faylor2001-04-202-4/+6
|
* * include/sys/file.h: Move X_OK protection earlier.Christopher Faylor2001-04-203-3/+15
| | | | * dtable.cc (dtable::vfork_child_fixup): Avoid closing already closed handles.
* * grp.cc (getgroups): Change so that SIDs get compared insteadCorinna Vinschen2001-04-202-6/+13
| | | | of strings to SIDs.
* * Makefile.in: Add object files `sec_helper.cc' and `sec_acl.cc'.Corinna Vinschen2001-04-207-1463/+1575
| | | | | | | | | | | | | | | * security.cc: Swap out several functions. * sec_acl.cc: New file. Move Sun compatibel ACL functions from `security.cc' to here. * sec_helper.cc: New file. Move security helper functions from `security.cc' to here. * security.h: Changed to accomodate the above changes. * grp.cc: Replace `group_in_memory_p' by `group_state'. Eliminate group_sem throughout. (enum grp_state): New enumeration type. (read_etc_group): Make race safe. * security.cc: Eliminate group_sem throughout.
* * dumper.cc (dumper::init_core_dump): Set architecture field in dumpEgor Duda2001-04-192-0/+11
| | | | header.
* * winsup.api/mmaptest02.c: New test.Corinna Vinschen2001-04-194-0/+418
| | | | | * winsup.api/mmaptest03.c: Ditto. * winsup.api/mmaptest04.c: Ditto.
* * mmap.cc (mmap): Drop usage of the same memory area if the sameCorinna Vinschen2001-04-192-3/+8
| | | | region of the same file is mapped twice.
* * Makefile.in: Add -U_WIN32 to CFLAGS compile line to avoid inappropriateChristopher Faylor2001-04-192-2/+7
| | | | Windows-isms.
* * configure.in: Add bz2lib.Christopher Faylor2001-04-183-29/+24
|
* Throughout, change fdtab references to cygheap->fdtab.Christopher Faylor2001-04-1839-230/+400
| | | | | | | | | | | | | | | | | | | | | | | * child_info.h (cygheap_exec_info): Eliminate special fdtab stuff. * spawn.cc (spawn_guts): Ditto. * cygheap.cc (cygheap_init): Initialize fdtab, if appropriate. * cygheap.h (CYGHEAPSIZE): Include size of init_cygheap. (_cmalloc_entry): Include fdtab here. * dtable.h (dtable): Declare/define new methods. * dtable.cc (dtable::vfork_child_fixup): New method. (dtable::fixup_after_exec): Remove unneeded extra arguments. * dcrt0.cc (dll_crt0_1): Ditto. * environ.cc (getwinenv): Use case sensitive comparison. (winenv): Make a copy of environment cache to avoid realloc problems when duplicate environment variables exist in the environment. (From Egor Duda) * net.cc (cygwin_socket): Revert Apr 14 change. * include/sys/file.h: Protect against previous X_OK definition. * passwd.cc: Eliminate passwd_sem throughout. * security.cc: Ditto. * cygwin.din: Export New functions. * passwd.cc (read_etc_passwd): Make race safe. (getpwuid_r): New function. (getpwnam_r): New function.
* *** empty log message ***Christopher Faylor2001-04-1850-0/+51841
|
* * grp.cc (getgroups): Avoid crash if passwd field if /etc/group isCorinna Vinschen2001-04-182-1/+7
| | | | empty.
* * path.h (path_conv::add_ext_from_sym): Declare.Christopher Faylor2001-04-173-4/+8
| | | | * path.cc (path_conv::add_ext_from_sym): Convert to pure inline method.
* * path.cc (windows_device_names): Add missing NULL element.Corinna Vinschen2001-04-172-1/+5
|