summaryrefslogtreecommitdiff
path: root/threadproc
Commit message (Collapse)AuthorAgeFilesLines
* 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
* More CE porting, now we enter the strange stuff. I disagree with thewrowe2002-06-041-3/+42
| | | | | | | | | | | | special casing on the inherited bit, but I'm committing for further comment ... the rest of this is just CE exceptions. There are no pipes on WinCE 3.0. Submitted by: Mladen Turk <mturk@mappingsoft.com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63466 13f79535-47bb-0310-9956-ffa450edef68
* Reimplemented apr_proc_create() on NetWare to use the new processve()bnicholes2002-05-291-130/+23
| | | | | | | function rather than the NXVmSpawn() stuff. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63439 13f79535-47bb-0310-9956-ffa450edef68
* Implement apr_thread_yield() on OS/2.bjh2002-05-221-0/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63427 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-302-6/+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
* It's just a jump to the left... and a step to the right...wrowe2002-04-291-1/+1
| | | | | | | | Some things are easier to follow when you leave them in the natural order of things. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63314 13f79535-47bb-0310-9956-ffa450edef68
* Add .deps to cvsignore since APR may now generate .deps files.jerenkrantz2002-04-223-0/+3
| | | | | | | (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-223-0/+6
| | | | | | | | | | | | 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
* Significant overhaul to respect all four flavors of APR_PROCESS, _ENV,wrowe2002-04-131-22/+54
| | | | | | | _PATH, and APR_SHELLCMD git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63261 13f79535-47bb-0310-9956-ffa450edef68
* Still working on the spawning process and wiring up the pipes. Changedbnicholes2002-04-111-16/+27
| | | | | | | apr_proc_create so that the parent side of the pipes are opened first. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63250 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
* Force the spawned NLM into the same address spacebnicholes2002-04-041-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63220 13f79535-47bb-0310-9956-ffa450edef68
* Stub in the warning and observations.wrowe2002-03-221-0/+5
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63180 13f79535-47bb-0310-9956-ffa450edef68
* This appears correct, but I need at least three more pairs of eyes thatwrowe2002-03-221-34/+116
| | | | | | | | | the cmd.exe path is secure before I'd remove my -1 on beta. The command.com path gets even more tangled - I don't have the focus for that this morning. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63179 13f79535-47bb-0310-9956-ffa450edef68
* Now fix my typos ... teach me to trust my typing at midnight withoutwrowe2002-03-211-6/+10
| | | | | | | compiling at least once. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63173 13f79535-47bb-0310-9956-ffa450edef68
* Fix several bugs in proc.c, especially around command.com whichwrowe2002-03-211-8/+31
| | | | | | | behaves differently than cmd.exe with respect to the /c command arg. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63172 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-1915-231/+231
| | | | | | | "pool". git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63158 13f79535-47bb-0310-9956-ffa450edef68
* The apr_get_os_proc accessor is no longer supported [better or worse].wrowe2002-03-161-11/+0
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63141 13f79535-47bb-0310-9956-ffa450edef68
* Changed the way environment variables are handle on NetWare whilebnicholes2002-03-141-3/+11
| | | | | | | spawning an external NLM git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63124 13f79535-47bb-0310-9956-ffa450edef68
* Update our copyright for this year.fielding2002-03-1322-22/+22
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63117 13f79535-47bb-0310-9956-ffa450edef68
* Second cut at fork/exec and pipe functionality on NetWare. Still a work inbnicholes2002-03-051-18/+57
| | | | | | | progress. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63083 13f79535-47bb-0310-9956-ffa450edef68
* Oh ... yea, there is a reason I never committed this months-old codewrowe2002-03-011-7/+2
| | | | | | | | | | | | to CVS - reverting to 1.63. Although the theory is right - we could end up in a case of d:\ or \\unc\path\ where stripping off the trailing slash of a root will introduce erratic behavior or fail entirely. Needs to be conditional on not-a-root-path, and I don't have time to hack that tonight. Better to leave working code in CVS. [sorry] git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63074 13f79535-47bb-0310-9956-ffa450edef68
* Another test to 'flunk'. If the path is backslashed-terminated, wewrowe2002-03-011-2/+7
| | | | | | | | don't know how applications might react. Convention is no trailing backslash on Win32 cwd paths - so strip it back off when it occurs. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63073 13f79535-47bb-0310-9956-ffa450edef68
* Change apr_proc_detach to take a parameter that can enable/disable automaticaaron2002-02-214-16/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | 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