From 8dca9e230217cc6f4ded94e5fa0ab3f63df941b9 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 18 Aug 2002 05:49:26 +0000 Subject: * perthread.h (vfork_save): Add ctty, sid, pgid, exitval fields. (vfork_save::restore_pid): New method. (vfork_save::restore_exit): New method. * fork.cc (vfork): Save ctty, sid, pgid and restore them when returning to "parent". Use exitval field if exiting but never created a new process. * syscalls.cc (setsid): Detect when in "vfork" and force an actual fork so that pid will be allocated (UGLY!). (getsid): New function. * dcrt0.cc (do_exit): Use vfork_save::restore_exit method for returning from a vfork. * spawn.cc (spawnve): Use vfork_save::{restore_pid,restore_exit} methods for returning from vfork. * cygwin.din: Export getsid. * include/cygwin/version.h: Bump api minor number. * malloc.cc: #ifdef sYSTRIm for when MORECORE_CANNOT_TRIM is true. --- winsup/cygwin/malloc.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/malloc.cc') diff --git a/winsup/cygwin/malloc.cc b/winsup/cygwin/malloc.cc index 440716529..02832bb99 100644 --- a/winsup/cygwin/malloc.cc +++ b/winsup/cygwin/malloc.cc @@ -3294,7 +3294,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av; - +#ifndef MORECORE_CANNOT_TRIM /* sYSTRIm is an inverse of sorts to sYSMALLOc. It gives memory back to the system (via negative arguments to sbrk) if there is unused @@ -3360,6 +3360,7 @@ static int sYSTRIm(pad, av) size_t pad; mstate av; } return 0; } +#endif /*MORECORE_CANNOT_TRIM*/ /* ------------------------------ malloc ------------------------------ -- cgit v1.2.3