summaryrefslogtreecommitdiff
path: root/threadproc
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-033-18/+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
* Clean up a style issue; apr_get_os_error() is much cleaner.wrowe2003-06-181-1/+1
| | | | | | | | | Note that the result from WaitFor{*}() calls is a rather special case, since it has other interesting details. These were not touched since they are clearer as-is. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64542 13f79535-47bb-0310-9956-ffa450edef68
* Win32: WAIT_ABANDONED should be treated as a success. WAIT_FAILED (the onlystoddard2003-06-181-5/+5
| | | | | | | | other possible return code) should call GetLastError, canonicalize it then return that as apr_status git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64540 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
* OS/2: when parsing #! line, adjust for the fact that apr_file_gets() nobjh2003-03-311-2/+7
| | | | | | | longer removes CR characters. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64464 13f79535-47bb-0310-9956-ffa450edef68
* Default spawned threads to detached so we avoid hanging on a waitpid() callbnicholes2003-03-101-1/+1
| | | | | | | since NetWare doesn't yet have a way to kill a spawned NLM. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64418 13f79535-47bb-0310-9956-ffa450edef68
* Default the current directory in the proc_attr structure since the NetWare OSbnicholes2003-03-041-0/+2
| | | | | | | doesn't have a process shell that handles it. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64395 13f79535-47bb-0310-9956-ffa450edef68
* As near as I can tell, Win32 will now correspond to Unix in terms of thewrowe2003-02-272-4/+15
| | | | | | | availability and lifetime of the hproc process handle. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64388 13f79535-47bb-0310-9956-ffa450edef68
* Once we apr_proc_kill on Unix, we don't expect to be able to recover anwrowe2003-02-251-1/+2
| | | | | | | | | | | | exit code (in fact we waitpid on darwin to clear the zombies, which seems like behavior we would need on other bsd-derived platforms as well.) So we don't expect to be able to on Win32 either; this patch simply reinforces that notion by return APR_EPROC_UNKNOWN when we encounter an apr_proc_t that was already kill()ed or waitpid()ed. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64383 13f79535-47bb-0310-9956-ffa450edef68
* Our exit codes are ugly, this should help some of them and tell us whatwrowe2003-02-241-6/+28
| | | | | | | | | | | sort of exit occurred. Declare apr_proc_wait_all_procs() unimplemented, and further fix the code not to shut down the ->hproc which we need to recover the error in the otherchild logic. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64381 13f79535-47bb-0310-9956-ffa450edef68
* We don't guard against NULL args.wrowe2003-02-241-7/+0
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64375 13f79535-47bb-0310-9956-ffa450edef68
* Enable APR_PROGRAM_ENV as a command typebnicholes2003-02-111-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64348 13f79535-47bb-0310-9956-ffa450edef68
* Implemented apr_proc_wait and apr_wait_all_procs for NetWarebnicholes2003-02-111-33/+59
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64345 13f79535-47bb-0310-9956-ffa450edef68
* add apr_procattr_error_check_set() for telling apr_proc_create() totrawick2003-02-075-0/+63
| | | | | | | | 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-065-0/+50
| | | | | | | | | | 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
* Eliminate open_nt_process_pipe and give apr_create_nt_pipe a very similarwrowe2003-01-241-40/+19
| | | | | | | | | | blocking argument. Fixes mixed blocking modes for the child stdin pipe and creates full blocking pipes with apr_file_pipe_create, just as on Unix. Corrects the bug introduced in file_io/win32/pipe.c rev 1.46 - as process std handles should never be created async (nonblocking, or overlapped.) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64313 13f79535-47bb-0310-9956-ffa450edef68
* Always load the NLM detached so that we don't have to wait for it to cleanbnicholes2003-01-141-2/+5
| | | | | | | up when it terminates. Also check for the correct return value for procve() git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64297 13f79535-47bb-0310-9956-ffa450edef68
* rename apr_arch_fileio.h to apr_arch_file_io.h for consistencythommay2003-01-076-6/+6
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64275 13f79535-47bb-0310-9956-ffa450edef68
* Namespace protection for include/arch/ header filesthommay2003-01-0620-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0122-22/+22
| | | | | | | No functional changes git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64251 13f79535-47bb-0310-9956-ffa450edef68
* Make sure that the path to the current working directory and to the spawnedbnicholes2002-12-201-5/+13
| | | | | | | NLM is fully qualified. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64200 13f79535-47bb-0310-9956-ffa450edef68
* Close a bug identified by Juergen Heckel that we would crash whenwrowe2002-12-091-5/+20
| | | | | | | | | | | | | | | | | | | mod_ssl called apr_os_thread_current() against the 'main' thread we had not created. Also address the possibility that the pool scope is bad for a given apr_thread_t and do *not* dereference the ->td member for apr_os_thread_current(). This patch causes us to 'waste' a system handle for every thread that *apr* does not create, that apr_os_thread_current() is called within. In 99% of situations that is a single handle for the main thread. But there is the possibility of an application creating dozens of it's own threads outside of apr, each of which then call apr_os_thread_current(). The scenario appears so abstract and the complications of this code so obnoxious that this patch has chosen not to address the possibility. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64133 13f79535-47bb-0310-9956-ffa450edef68
* As pointed out by Marcel Mann <Marcel.Mann@dbaudio.com>, we werewrowe2002-11-251-1/+16
| | | | | | | | | | returning 0xfffffffe (the pseudo-handle) for the current thread. Stash the real apr_thread_t and recover it for apr_os_thread_current(). We were also missing thread_compare so I dropped that in while I was at it. The test is simple with the above behavior. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64085 13f79535-47bb-0310-9956-ffa450edef68
* Switched from processve() to procve() API.bnicholes2002-11-071-4/+4
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64003 13f79535-47bb-0310-9956-ffa450edef68
* Excerpt from MSVC help;ianh2002-08-221-1/+6
| | | | | | | | | | | | | | | | | | | "Like the Win32 ExitThread API, _endthreadex does not close the thread handle. Therefore, when you use _beginthreadex and _endthreadex, you must close the thread handle by calling the Win32 CloseHandle API." SUZUKI Rintaro <suzuki@ariel-networks.com> wrote the patch. Thanks. - INOUE Seiichiro <inoue@ariel-networks.com> PR: Obtained from: SUZUKI Rintaro <suzuki@ariel-networks.com> Submitted by: INOUE Seiichiro <inoue@ariel-networks.com> Reviewed by: Will Rowe git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63827 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
* Implemented the thread_once API's on NetWarebnicholes2002-07-191-2/+6
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63712 13f79535-47bb-0310-9956-ffa450edef68
* Correct Rob's recent patch to handle both NT and 9x, and skip wastingwrowe2002-07-181-15/+27
| | | | | | | | these cycles if we aren't toggling USESTDHANDLES or have a handle to fill-in-the-blanks. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63707 13f79535-47bb-0310-9956-ffa450edef68
* The HANDLE members in the STARTUPINFO struct used in the call toianh2002-07-181-0/+4
| | | | | | | | | | | CreateProcess() aren't currently initialized properly... Obtained from: Rob Sacoaccio <robs@fastcgi.com> Reviewed by: Ian Holsman git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63706 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
* Changed the return values of the apr_*_inherit_(un)set functions frombrane2002-07-051-30/+6
| | | | | | | | | | | void to apr_status_t. The deprecated versios, apr_*_(un)set_inherit, are still void, so that we don't inadvertently break code that uses them. Updated all uses of apr_file_inherit_set in threadproc/win32/proc.c, and replaced make_handle_private with apr_file_inherit_unset. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63576 13f79535-47bb-0310-9956-ffa450edef68
* NEVER roll back more than one patch at a time. Reverting commit 1.78wrowe2002-07-031-81/+56
| | | | | | | | | which reverted 1.76 plus 1.77 ... this code is now restored to 1.77. This code should now behave as expected, since the include/arch/win32 flavor of inherit.h now makes handles inheritable. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63557 13f79535-47bb-0310-9956-ffa450edef68
* Reverting the 1.76 and 1.77 changes, because they didn't work.brane2002-07-021-56/+81
| | | | | | | | The child handles weren't properly inheritable, and redirected command output got lost in the bit bucket. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63552 13f79535-47bb-0310-9956-ffa450edef68
* Fat Fingers. And inherit_set has no return value. Code compiles on win32wrowe2002-07-011-15/+15
| | | | | | | once again, sorry about that. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63545 13f79535-47bb-0310-9956-ffa450edef68
* Unix, NW and OS2 folks, please look at this change and consider similarwrowe2002-07-011-81/+56
| | | | | | | | | | | patches. It seems like extreme overkill to create a pipe when we are only setting up a log fd for output, and similar cases. We waste an entire pipe resource just to attach (pipe) to a logfile? That seems goofy. We now have both _dup and _dup2, so we should take advantage of them. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63544 13f79535-47bb-0310-9956-ffa450edef68
* Use apr_ischar() ... especially within apr itself!wrowe2002-06-231-1/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63515 13f79535-47bb-0310-9956-ffa450edef68
* Check the detached flag and spawn the NLM appropriately.bnicholes2002-06-101-3/+4
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63487 13f79535-47bb-0310-9956-ffa450edef68
* Some simple fn renames ... by the book [deprecated entry points retained]wrowe2002-06-083-4/+21
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63472 13f79535-47bb-0310-9956-ffa450edef68