summaryrefslogtreecommitdiff
path: root/threadproc/unix
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of tabs.ben2003-11-061-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64733 13f79535-47bb-0310-9956-ffa450edef68
* Endianness and APR types for random.ben2003-11-051-0/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64728 13f79535-47bb-0310-9956-ffa450edef68
* Really fix the build again.jorton2003-11-051-2/+0
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64722 13f79535-47bb-0310-9956-ffa450edef68
* Make sure randomness is different after a fork.ben2003-11-031-0/+3
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64716 13f79535-47bb-0310-9956-ffa450edef68
* * include/arch/unix/apr_arch_threadproc.h: Store a pthread_attr_tjorton2003-09-291-13/+9
| | | | | | | | | | | | structure in apr_threadattr_t, rather than a pointer to one. * threadproc/unix/thread.c (apr_threadattr_create): Use a single palloc call, omit ENOMEM handling. (apr_threadattr_detach_set, apr_threadattr_detach_get, apr_thread_create): Adjust use of ->attr appropriately. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64663 13f79535-47bb-0310-9956-ffa450edef68
* axe these deprecated functions:trawick2003-09-031-6/+0
| | | | | | | | | | | | | | | | apr_allocator_get_mutex apr_allocator_get_owner apr_allocator_set_max_free apr_allocator_set_mutex apr_allocator_set_owner apr_pool_get_abort apr_pool_get_parent apr_pool_set_abort apr_pool_sub_make apr_signal_get_description git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64606 13f79535-47bb-0310-9956-ffa450edef68
* Fix previous commit: HAVE_DECL_* is always defined, to 0 or 1.jorton2003-07-141-1/+1
| | | | | | | Submitted by: Max Bowsher <maxb@ukf.net> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64569 13f79535-47bb-0310-9956-ffa450edef68
* Pick up the result of the AC_DECL_SYS_SIGLIST macro correctly withjorton2003-07-071-4/+5
| | | | | | | recent versions of autoconf. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64562 13f79535-47bb-0310-9956-ffa450edef68
* For apr_proc_detach(APR_PROC_DETACH_FOREGROUND), don't treattrawick2003-06-021-1/+5
| | | | | | | | | | a setsid() failure as fatal, as the usual cause is that the caller is already a process group leader. PR: 18519 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64524 13f79535-47bb-0310-9956-ffa450edef68
* (apr_proc_wait): Handle interrupted waitpid(2) calls by callingthommay2003-05-081-1/+5
| | | | | | | | | | | it repeatedly until it succeeds or fails with errno other than EINTR. This hides this UNIX-specific behavior from APR clients. Submitted by: Eric Gillespie <epg@pretzelnet.org> Reviewed by: Thom May git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64501 13f79535-47bb-0310-9956-ffa450edef68
* apr_proc_create() on Unix: Make the APR_SHELLCMD mode worktrawick2003-04-211-8/+36
| | | | | | | | | | | | | | when there is more than one program argument passed in. It worked before (and still does) if the app somehow knows to pass in a single arg which is a string containing the program name and all args, such as when calling system(). Now it works if the app passes the program arguments normally, such as when using other modes of apr_proc_create(). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64490 13f79535-47bb-0310-9956-ffa450edef68
* add apr_procattr_error_check_set() for telling apr_proc_create() totrawick2003-02-071-0/+33
| | | | | | | | try to anticipate any errors that might occur after fork() (no-op everywhere but Unix) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64341 13f79535-47bb-0310-9956-ffa450edef68
* Allow apr_proc_create() to call an app-provided error reportingtrawick2003-02-061-0/+21
| | | | | | | | | | function when apr_proc_create() fails in the new child process after fork(). The app-provided error reporting function will only be called on platforms where apr_proc_create() first calls fork() to create the new process. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64330 13f79535-47bb-0310-9956-ffa450edef68
* Fix a bug in apr_proc_create() that could cause a new child processtrawick2003-02-041-1/+1
| | | | | | | to run the parent's code if setrlimit() fails. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64328 13f79535-47bb-0310-9956-ffa450edef68
* Namespace protection for include/arch/ header filesthommay2003-01-065-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aix/dso.h -> -> aix/apr_arch_dso.h beos/dso.h -> beos/apr_arch_dso.h beos/proc_mutex.h -> beos/apr_arch_proc_mutex.h beos/thread_cond.h -> beos/apr_arch_thread_cond.h beos/thread_mutex.h -> beos/apr_arch_thread_mutex.h beos/threadproc.h -> beos/apr_arch_threadproc.h beos/thread_rwlock.h -> beos/apr_arch_thread_rwlock.h netware/dso.h -> -> netware/apr_arch_dso.h netware/fileio.h -> -> netware/apr_arch_fileio.h netware/global_mutex.h -> netware/apr_arch_global_mutex.h netware/internal_time.h -> netware/apr_arch_internal_time.h netware/networkio.h -> netware/apr_arch_networkio.h netware/pre_nw.h -> netware/apr_arch_pre_nw.h netware/proc_mutex.h -> netware/apr_arch_proc_mutex.h netware/thread_cond.h -> netware/apr_arch_thread_cond.h netware/thread_mutex.h -> netware/apr_arch_thread_mutex.h netware/threadproc.h -> netware/apr_arch_threadproc.h netware/thread_rwlock.h -> netware/apr_arch_thread_rwlock.h os2/dso.h -> os2/apr_arch_dso.h os2/fileio.h -> os2/apr_arch_fileio.h os2/networkio.h -> os2/apr_arch_networkio.h os2/os2calls.h -> os2/apr_arch_os2calls.h os2/proc_mutex.h -> os2/apr_arch_proc_mutex.h os2/thread_cond.h -> os2/apr_arch_thread_cond.h os2/thread_mutex.h -> os2/apr_arch_thread_mutex.h os2/threadproc.h -> os2/apr_arch_threadproc.h os2/thread_rwlock.h -> os2/apr_arch_thread_rwlock.h os390/dso.h -> os390/apr_arch_dso.h unix/dso.h -> unix/apr_arch_dso.h unix/fileio.h -> unix/apr_arch_fileio.h unix/global_mutex.h -> unix/apr_arch_global_mutex.h unix/inherit.h -> unix/apr_arch_inherit.h unix/internal_time.h -> unix/apr_arch_internal_time.h unix/misc.h -> unix/apr_arch_misc.h unix/networkio.h -> unix/apr_arch_networkio.h unix/proc_mutex.h -> unix/apr_arch_proc_mutex.h unix/shm.h -> unix/apr_arch_shm.h unix/thread_cond.h -> unix/apr_arch_thread_cond.h unix/thread_mutex.h -> unix/apr_arch_thread_mutex.h unix/threadproc.h -> unix/apr_arch_threadproc.h unix/thread_rwlock.h -> unix/apr_arch_thread_rwlock.h win32/atime.h -> win32/apr_arch_atime.h win32/dso.h -> win32/apr_arch_dso.h win32/fileio.h -> win32/apr_arch_fileio.h win32/inherit.h -> win32/apr_arch_inherit.h win32/misc.h -> win32/apr_arch_misc.h win32/networkio.h -> win32/apr_arch_networkio.h win32/proc_mutex.h -> win32/apr_arch_proc_mutex.h win32/thread_cond.h -> win32/apr_arch_thread_cond.h win32/thread_mutex.h -> win32/apr_arch_thread_mutex.h win32/threadproc.h -> win32/apr_arch_threadproc.h win32/thread_rwlock.h -> win32/apr_arch_thread_rwlock.h win32/utf8.h -> win32/apr_arch_utf8.h git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64271 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright notices to 2003.thommay2003-01-015-5/+5
| | | | | | | No functional changes git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64251 13f79535-47bb-0310-9956-ffa450edef68
* In apr_signal_thread() remove synchronous signals from the masktrawick2002-08-081-0/+3
| | | | | | | | | | | | | | | | passed to sigwait(). It is never valid for them to be there. Some platforms silently ignore them, some return EINVAL, some don't process it as desired. One problem was found with an old Apache 2.0.30 build on AIX. sig_coredump() wasn't getting called when a plug-in generated SIGABRT. Removing SIGABRT from the signal mask passed to sigwait() by the main worker thread fixed the problem. After reviewing sigwait() documentation it was clear that none of the synchronous signals should be in the mask passed to sigwait(). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63802 13f79535-47bb-0310-9956-ffa450edef68
* * httpd-2.0/srclib/apr/threadproc/unix/signals.ckfogel2002-07-231-1/+1
| | | | | | | (store_desc): Make the backslash quote a newline, not a space. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63725 13f79535-47bb-0310-9956-ffa450edef68
* The old macro was blowing up on some platforms that weren't using gcc.rbb2002-07-231-2/+8
| | | | | | | | Specifically, True64 with the cc compiler. This resolves that problem by using a cleaner macro. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63724 13f79535-47bb-0310-9956-ffa450edef68
* added support for changing the limit on file descriptors per processbrianp2002-07-091-0/+15
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63591 13f79535-47bb-0310-9956-ffa450edef68
* Some simple fn renames ... by the book [deprecated entry points retained]wrowe2002-06-081-2/+8
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63472 13f79535-47bb-0310-9956-ffa450edef68
* Darwin/Mac OS X: There is apparently no convenient way to keep deceasedtrawick2002-05-221-0/+20
| | | | | | | | | | | children from waiting until the parent reaps status, so when the APR app doesn't care about such status we need to have a handler driven and call one of the wait functions. PR: 9168 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63423 13f79535-47bb-0310-9956-ffa450edef68
* Address PR 8963wrowe2002-05-101-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63382 13f79535-47bb-0310-9956-ffa450edef68
* Remove APR_WANT_SIGNAL from apr_want.h because code must includefielding2002-04-301-3/+0
| | | | | | | | | apr_signal.h in order to get consistent definitions. In general, apr_want.h is a bad idea and should be replaced with topic-specific header files. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63317 13f79535-47bb-0310-9956-ffa450edef68
* Add .deps to cvsignore since APR may now generate .deps files.jerenkrantz2002-04-221-0/+1
| | | | | | | (somehow CVS ignored updating these on the last commit.) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63287 13f79535-47bb-0310-9956-ffa450edef68
* Allow VPATH builds to properly generate build dependencies. This requiresjerenkrantz2002-04-221-0/+2
| | | | | | | | | | | | srcdir to always be available in a Makefile, so we need to stop adding this only when we use VPATH. Change the dependency generation to use .deps instead of appending to the Makefile. This makes us consistent with the dependency style of httpd-2.0. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63286 13f79535-47bb-0310-9956-ffa450edef68
* Tru64: Stop leaving zombies in APR apps like mod_cgid whichtrawick2002-04-191-0/+10
| | | | | | | | | | tell APR to ignore SIGCHLD. Submitted by: Dave Hill <David.D.Hill@Compaq.com> Reviewed by: Jeff Trawick git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63282 13f79535-47bb-0310-9956-ffa450edef68
* AIX: Fix breakage with 64-bit builds on versions of AIX priortrawick2002-04-111-4/+5
| | | | | | | | | | to 5L. The 64-bit definitions for sigset_t changed between 4.X and 5L. PR: 7957 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63248 13f79535-47bb-0310-9956-ffa450edef68
* apr_proc_detach():trawick2002-04-081-10/+5
| | | | | | | | | stop working so hard to figure out the process group id; we don't use that information (logic was inherited from Apache 1.3, which does use the information) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63229 13f79535-47bb-0310-9956-ffa450edef68
* add a comment distinguishing between SIGUSR2 and the synchronoustrawick2002-03-201-0/+8
| | | | | | | signals which we absolutely must avoid blocking git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63170 13f79535-47bb-0310-9956-ffa450edef68
* don't mask SIGUSR2.ianh2002-03-201-0/+3
| | | | | | | | | | | some debuggers (purify) use it PR: Obtained from: Submitted by: Reviewed by: git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63168 13f79535-47bb-0310-9956-ffa450edef68
* Style Police writes some more tickets...striker2002-03-193-80/+158
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63159 13f79535-47bb-0310-9956-ffa450edef68
* Rename all the "cntxt" members of the thread and proc structures tostriker2002-03-193-45/+45
| | | | | | | "pool". git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63158 13f79535-47bb-0310-9956-ffa450edef68
* Update our copyright for this year.fielding2002-03-135-5/+5
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63117 13f79535-47bb-0310-9956-ffa450edef68
* Change apr_proc_detach to take a parameter that can enable/disable automaticaaron2002-02-212-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | forking (aka, to "daemonize"). Detailed explanation: If we are only interested in detaching from the controlling terminal, then we are only interested in creating a new process group (or creating a new session, which implicitly creates a new process group). In order to do so, we must _NOT_ already be a process group leader. The only way to ensure that is true, we normally will call fork() and allow the parent to exit, ensuring that the child is at least a child of a process group leader (and not one itself). Doing this by default prevents some process-watching tools from working with Apache. Therefore, when calling apr_proc_detach with APR_PROC_DETACH_FOREGROUND, the caller is taking responsibility for _NOT_ being a process group leader, which is guaranteed by such process management tools. [A similiar patch was originally submitted Jos and later modifed by Aaron.] Obtained from: Jos Backus <josb@cncdsl.com> Submitted by: Aaron Bannert git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63044 13f79535-47bb-0310-9956-ffa450edef68
* Add a couple new command types to process creation:gstein2002-01-281-1/+14
| | | | | | | | | | | | | | | | | | APR_PROGRAM_ENV: start the program using the caller's environment APR_PROGRAM_PATH: search PATH for the program, use caller's env (the normal APR_PROGRAM isolates the env and does not use PATH) The BeOS, OS/2, and Win32 implementations are incomplete. These two new forms just default back to APR_PROGRAM for now. (although BeOS doesn't even distinguish between APR_SHELLCMD and APR_PROGRAM!) On Unix and Netware, these map into execv() and execvp() calls. Also clarified some doc for the enums in apr_thread_proc.h a bit. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62840 13f79535-47bb-0310-9956-ffa450edef68
* Fix leakage with fds with respect to pipes. dup2() should close the oldjerenkrantz2002-01-251-6/+6
| | | | | | | file descriptor and this new one will be closed when we clean up the pipe. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62829 13f79535-47bb-0310-9956-ffa450edef68
* Change from APR_HAVE_SETSID to HAVE_SETSID as the configure script onlyjerenkrantz2001-12-281-1/+1
| | | | | | | | | | | | sets HAVE_SETSID. We will now call setsid() on platforms that have it. Two reasons for changing it here: - This is a private define. ISTR APR_ macros should only be for defines that will be exported via apr.h. This define lives in apr_private.h. - We're using HAVE_WAITPID a few lines down. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62672 13f79535-47bb-0310-9956-ffa450edef68
* Convert apr_thread_exit(..., apr_status_t *retval) toaaron2001-12-271-3/+4
| | | | | | | | | | | apr_thread_exit(..., apr_status_t retval) so that status values can actually be returned back to apr_thread_join. This patch converts all platforms to store the returned status in the platform-specific opaque thread structure. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62670 13f79535-47bb-0310-9956-ffa450edef68
* add some more commentary about a work-around for an AIX problemtrawick2001-11-301-0/+5
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62583 13f79535-47bb-0310-9956-ffa450edef68
* re-implement an AIX-specific workaround for a sigwait() bug totrawick2001-11-291-2/+17
| | | | | | | work with 32-bit or 64-bit builds git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62581 13f79535-47bb-0310-9956-ffa450edef68
* Fix apr_setup_signal_thread() to grab the right error code fromtrawick2001-11-161-1/+3
| | | | | | | | | | | a sigprocmask() failure. This only affects platforms that use sigprocmask() in lieu of pthread_sigmask(). sigprocmask() reports error codes via errno, not via the return code. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62517 13f79535-47bb-0310-9956-ffa450edef68
* Fix apr_setup_signal_thread() so that threads don't blocktrawick2001-11-121-1/+48
| | | | | | | | | | | | | synchronous signals (e.g., SIGSEGV). It is a programming error to do so, and some platforms (e.g., Solaris, AIX) don't call any registered signal handler when such signals are blocked. Thanks are due to Dick Dunbar <RLDunbar@pacbell.net>, who pointed this out to me in the context of debugging a threaded module for Apache 1.3. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62509 13f79535-47bb-0310-9956-ffa450edef68
* Fix some file cleanup problems in apr_proc_create() which couldtrawick2001-11-111-4/+19
| | | | | | | | result in the pipes for stdin/stdout/stderr being closed immediately. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62497 13f79535-47bb-0310-9956-ffa450edef68
* back out previous change so that mod_cgid works again; addtrawick2001-10-271-3/+11
| | | | | | | | | | comment with a litte information about the problem with file cleanup conflicting with our pipe setup Submitted by: Justin Erenkrantz git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62466 13f79535-47bb-0310-9956-ffa450edef68
* apr_proc_create():trawick2001-10-261-2/+6
| | | | | | | | | | do exec cleanup before duping pipes to fds 0-2; otherwise, any files cleaned up with those fds will hose our pipes; typical symptom is APR_EOF in the parent when trying to read child output git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62465 13f79535-47bb-0310-9956-ffa450edef68
* Fix the reporting for child processes that die. This removesrbb2001-10-231-10/+29
| | | | | | | | | all of the non-portable W* macros from Apache. Submitted by: Jeff Trawick and Ryan Bloom git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62455 13f79535-47bb-0310-9956-ffa450edef68
* Simplify apr_proc_wait_all_procs and consolidate apr_proc_wait.jerenkrantz2001-09-211-24/+21
| | | | | | | | | | | | | (I had a similar version in my tree. Kevin's wins out because of the WIF macros. Are there any platforms that don't have this? The Solaris man page seems to indicate that they must be called, so it seems correct. Please check on your favorite platform.) Submitted by: Kevin Pilch-Bisson <kevin@pilch-bisson.net> Reviewed by: Justin Erenkrantz git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62358 13f79535-47bb-0310-9956-ffa450edef68
* Return the exit code from apr_proc_wait(). This is a combination of a patchgstein2001-09-201-5/+6
| | | | | | | | | | | from Justin and Bill, plus a few additional tweaks. Submitted by: Justin Erenkrantz <jerenkrantz@ebuilt.com>, Bill Tutt <billtut@microsoft.com> Reviewed by: Greg Stein git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62350 13f79535-47bb-0310-9956-ffa450edef68
* On platforms that have sigsuspend (such as Darwin) but not apr_sigwait,jerenkrantz2001-09-071-0/+2
| | | | | | | we don't need sig_func declared. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62293 13f79535-47bb-0310-9956-ffa450edef68