summaryrefslogtreecommitdiff
path: root/threadproc
Commit message (Collapse)AuthorAgeFilesLines
* Fixed type; fixed comments.fuankg2014-07-161-4/+4
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@1611061 13f79535-47bb-0310-9956-ffa450edef68
* definAtelyrjung2013-10-031-1/+1
| | | | | | | | Backport of r1213382 from trunk resp. r1528818 from 1.5.x. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@1528819 13f79535-47bb-0310-9956-ffa450edef68
* Followup on r1481264: use already existingrjung2013-05-111-1/+1
| | | | | | | | | | | platform independent macro instead of pthread define. Backport of r1481265 from trunk resp. r1481266 from 1.5.x. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@1481267 13f79535-47bb-0310-9956-ffa450edef68
* Use correct pthread constant.rjung2013-05-111-1/+1
| | | | | | | | Backport of r1481262 from trunk resp. r1481263 from 1.5.x. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@1481264 13f79535-47bb-0310-9956-ffa450edef68
* Backport r1198860, small fix to apr_proc_fork() to make behavior sctemme2011-11-071-7/+3
| | | | | | | | of child random entropy mix-in in apr_random_after_fork() more in line with expectation. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@1198861 13f79535-47bb-0310-9956-ffa450edef68
* Backport r979891/r1183724:sf2011-10-153-9/+9
| | | | | | | | | | | | | Fix various issues found by cppcheck - error handling issues - use of uninitialized data - null pointer dereference - unused variables - memory/fd leaks - broken code in threadproc/beos/proc.c git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@1183728 13f79535-47bb-0310-9956-ffa450edef68
* Backport r1183685:sf2011-10-151-3/+6
| | | | | | | | | | | | Don't close any of the new stdin/stdout/stderr FDs in the child if it already has the correct FD. PR: 51995 Submitted by: Dan Ports <drkp csail mit edu>] git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@1183708 13f79535-47bb-0310-9956-ffa450edef68
* merge trunk revs 1083169, 1083177, 1083178, 1083183, and 1083227trawick2011-03-212-2/+3
| | | | | | | | | | to resolve some gcc warnings and dead code on Windows (the testlfsabi change from r1083183 is omitted, as the testcases aren't in this branch) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@1083870 13f79535-47bb-0310-9956-ffa450edef68
* Fixed NetWare prototype warnings.fuankg2011-03-102-5/+4
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@1080082 13f79535-47bb-0310-9956-ffa450edef68
* Fixed compilation when APR_HAVE_STRUCT_RLIMIT=0.fuankg2011-03-102-4/+21
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@1080074 13f79535-47bb-0310-9956-ffa450edef68
* Axed C++ comments and tabs.fuankg2011-02-181-27/+26
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@1071969 13f79535-47bb-0310-9956-ffa450edef68
* Merge r783722 from trunk:rpluem2009-06-113-3/+3
| | | | | | | | | | | | * We need to disable inheritance in the case of success like in the cases for stdout and stdin. Fixes the same issue fixed for unix in r783398 Submitted by: rpluem Reviewed by: rpluem git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@783725 13f79535-47bb-0310-9956-ffa450edef68
* Merge r783398 from trunk:rpluem2009-06-101-1/+1
| | | | | | | | | | | * We need to disable inheritance in the case of success like in the cases for stdout and stdin. Submitted by: rpluem Reviewed by: rpluem git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@783399 13f79535-47bb-0310-9956-ffa450edef68
* Clear up this wording a bitwrowe2008-11-231-2/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@720054 13f79535-47bb-0310-9956-ffa450edef68
* mplement apr_proc_wait_all_procs for windowsmturk2008-04-171-15/+126
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@649208 13f79535-47bb-0310-9956-ffa450edef68
* Check for bogus (negative) signal numbersmartin2008-02-011-2/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@617375 13f79535-47bb-0310-9956-ffa450edef68
* Simplify handling of z/OS pthread API nuances. Beyond thetrawick2007-11-192-13/+17
| | | | | | | | | | | | | simplification, it fixes a compile error in the call to pthread_yield() on z/OS. Submitted by: David Jones I modified it slightly to use AC_DEFINE() as suggested by jorton. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@596402 13f79535-47bb-0310-9956-ffa450edef68
* Fix mismatch, using child_err when dealing with stdout.bjh2007-10-311-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@590849 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Fix condition for restoring std handles after spawning a process.bjh2007-10-311-6/+15
| | | | | | | | We still need to restore the std handles if "no file" (filedes == -1) is passed to the child. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@590848 13f79535-47bb-0310-9956-ffa450edef68
* Fix build breakage due to syntax errors in threadproc/os2/proc.c.bjh2007-10-301-9/+10
| | | | | | | | I haven't yet verified that the code works but this is a step in the right direction. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@590037 13f79535-47bb-0310-9956-ffa450edef68
* Fix up a few netware'isms and missing brackets left over from the refactoring.bnicholes2007-10-161-6/+10
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@585260 13f79535-47bb-0310-9956-ffa450edef68
* Backport the std handling improvements to Netware, OS2, BeOS.wrowe2007-10-153-285/+384
| | | | | | | | | | | | | | | | | | | | | These may need massaging and do need review by their respective communities. Note that someone from the OS2 community needs to ping me with resolving the missing apr_arch_inherit.h mess; this should be very easy to translate into DosSetFHState(handle, OPEN_FLAGS_NOINHERIT); bits, but to more thoroughly resolve the issue, we should take it a step further and consider the NT implementation which toggles inheritance on only for handles as they hit proc_create, so that you don't have cross-process handle leakage into the wrong processes. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@584928 13f79535-47bb-0310-9956-ffa450edef68
* Here's my recommendation; upon opening the pipes, always set the parent-endwrowe2007-10-141-15/+18
| | | | | | | | | | | | of the pipe to uninherited. Let it be closed upon cleanup_for_exec. The later dup2() for the parent pipe does not automagically become inherited again, and later dup()'s are never inherited by default. There's no longer an explicit need to close the parent-end in proc_create git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@584570 13f79535-47bb-0310-9956-ffa450edef68
* apr_file_dup() varies from dup2 by not setting the child handle aswrowe2007-10-141-12/+30
| | | | | | | | | | | | | | | inherited. Solve this by setting the duplicated handle to inherit. once finished with the fork(), now that we don't waste pipe creation resources on a single handle, watch out for closing the parent handle inside the child. in fact I believe that toggling parent_* handles apr_file_inherit_unset way back in apr_procattr_io_set / apr_procattr_child_*_set would be more efficient; comments? git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@584569 13f79535-47bb-0310-9956-ffa450edef68
* Solve two potential problems with one shot.wrowe2007-10-141-77/+66
| | | | | | | | | | | | | | | | | | First; we absolutely do NOT want to waste our time creating a pipe, when the caller has their own file descriptors all set up to give to the child process (and use itself). We can also presume a single ended pipe is about as interesting as the sound of one hand clapping. Create the pipe only when we don't already have any child/parent pipes set up, and when the caller passes no files for us to use. Otherwise, we simply dup for our own use rather than dup2. Second; we absolutely cannot dup2 into the static 'no_file' special fd, so we'll guard against this and also dup, instead, for this case. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@584500 13f79535-47bb-0310-9956-ffa450edef68
* With the correction of setting ->timeout = 0 way up in thewrowe2007-10-141-55/+9
| | | | | | | | apr_file_pipe_create_ex() for win32, many lines are redundant. Thanks to Eric for picking up on this mess in the first place! git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@584496 13f79535-47bb-0310-9956-ffa450edef68
* * Remove unnecessary assignment of pool attribute.rpluem2007-10-135-5/+0
| | | | | | | | Submitted by: Lucian Adrian Grijincu <lucian.grijincu gmail.com> Reviewed by: rpluem git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@584411 13f79535-47bb-0310-9956-ffa450edef68
* apr_procattr_io_set() on Windows: Set pipe handles non-blocking astrawick2007-10-101-3/+51
| | | | | | | | | | | appropriate based on the input parameters. PR: 43522 Submitted by: Eric Covener <covener gmail.com> Reviewed by: trawick git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@583421 13f79535-47bb-0310-9956-ffa450edef68
* Close the standard handle in the child, *when* we tagged it with fd -1wrowe2007-10-011-3/+3
| | | | | | | | | | (we aren't trying to close our child_fd's here). Submitted by: David Glasser <glasser@davidglasser.net> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@581089 13f79535-47bb-0310-9956-ffa450edef68
* Had inverted the logic for closing the handles in the parent, thanks to glasserwrowe2007-10-011-6/+6
| | | | | | | for pointing this out to me on #irc. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@581042 13f79535-47bb-0310-9956-ffa450edef68
* Thanks for catching the unbalanced parens, jerenkrantz.wrowe2007-09-291-3/+3
| | | | | | These can be reduced further and still remain legible. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@580632 13f79535-47bb-0310-9956-ffa450edef68
* Fix compile errors introduced in r580486 due to missing ()s.jerenkrantz2007-09-291-6/+6
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@580591 13f79535-47bb-0310-9956-ffa450edef68
* Undo the 'fix' to the unix flaw. Yes, there still are flaws;wrowe2007-09-281-36/+12
| | | | | | | | | | if we use apr_procattr_stderr_set() it will not close out the previous handle parked there by _io_set(). But it also does not attempt to touch the _io_set() no_file STATIC apr_file_t's so there is nothing to otherwise fix here immediately. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@580515 13f79535-47bb-0310-9956-ffa450edef68
* Introduce APR_NO_FILE as an option for any of the three stdio streamswrowe2007-09-281-21/+68
| | | | | | | | | | | | to cause the specified streams to be closed to the child process, when the caller has chosen that flag via apr_procattr_io_set(). ALSO; solve a serious flaw where we attempted to dup2 to a non existant file if the user had not already called apr_procattr_io_set()! The Unix implementation. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@580486 13f79535-47bb-0310-9956-ffa450edef68
* Introduce APR_NO_FILE as an option for any of the three stdio streamswrowe2007-09-281-22/+44
| | | | | | | | | | to cause the specified streams to be closed to the child process, when the caller has chosen that flag via apr_procattr_io_set(). This is the nonportable flavor targeting 1.2.12; unix 1.3.0 specific commit to follow. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@580484 13f79535-47bb-0310-9956-ffa450edef68
* Fix cut and paste typo which scuttled the last release, thiswrowe2007-09-041-2/+2
| | | | | | | caused StdOutput to never be inherited (something not noticed, nor particularly interesting in httpd, which is how I missed it). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@572457 13f79535-47bb-0310-9956-ffa450edef68
* Fix r569890 - this error did not hit 1.2 or 0.9 branches,wrowe2007-09-011-2/+2
| | | | | | | | thankfully. Submitted by: Steven Narin <steven.narin googlemail.com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@571712 13f79535-47bb-0310-9956-ffa450edef68
* Correct r569882 typo; we must leave what we enter.wrowe2007-08-261-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@569890 13f79535-47bb-0310-9956-ffa450edef68
* Proposed;wrowe2007-08-261-12/+118
| | | | | | | | | | | | | | | | | | | | | | | Solve win32 inherited pipe leaks by leveraging OS2 port's solution. Mutex the pipe manipulation on WinNT+++ alone (not WinCE, nor 9x) so that we toggle the inherited state of the stdin/out/err pipes. This is only possible on NT, because in CE/9x it would involve replacing the pipe handles all over the place as there is no toggle. This CRITICAL_SECTION pipe is incredibly fast in the mainline case, and only introduces contention in the threaded server after startup (for cgi, etc). Not unlike an in-process cgid. So, leave WinCE alone for now, since it doesn't follow the stdio model, and leave Win9x alone for good, as nearly abandoned. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@569882 13f79535-47bb-0310-9956-ffa450edef68
* Make Win32 consistent with unix, in that we will inherit the defaultwrowe2007-08-231-6/+6
| | | | | | | | stdin/out/err if some of these handles are left unset, while one or two of them are set with apr_procattr_io_set() (with one or more APR_NO_PIPE's) and/or apr_procattr_child_XXX_set(). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@568818 13f79535-47bb-0310-9956-ffa450edef68
* Eliminate for WinCE the special handling of program files ending in wrowe2007-06-011-0/+4
| | | | | | | | | | | | ".bat" or ".cmd" and falls through to the general case. There is no COMSPEC on WinCE (no getenv either) and no command line shell. PR: 39869 Submitted by: Curt Arnold <carnold apache.org> Reviewed by: Davi Arnaut git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@543324 13f79535-47bb-0310-9956-ffa450edef68
* Borland specific define for LOGON32_LOGON_NETWORKwrowe2007-05-311-0/+4
| | | | | | | | | PR: 33490/attachment 18106 Submitted by: Curt Arnold <carnold apache.org> Reviewed by: Davi Arnaut <davi haxent.com.br> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@543304 13f79535-47bb-0310-9956-ffa450edef68
* Suppress warning of unused static function.wrowe2007-05-311-0/+2
| | | | | | | | PR: 39868 Submitted by: Curt Arnold <carnold apache.org> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@543279 13f79535-47bb-0310-9956-ffa450edef68
* Fix compile failure in pthread_attr_setdetachstate() logic on z/OS.trawick2007-01-291-1/+5
| | | | | | | | Submitted by: David Jones <oscaremma gmail.com> Reviewed by: trawick git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@501150 13f79535-47bb-0310-9956-ffa450edef68
* Backout R434327, R437115, which...wrowe2006-11-221-15/+2
| | | | | | | | | | | Implement apr_threadkey_private destructors on WIN32 instead silently ignoring them. and reviewed by wrowe, brane, jerenkrantz to need a more comprehensive solution, e.g. Windows PE destructor entry points, that does -not- break svn. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@478137 13f79535-47bb-0310-9956-ffa450edef68
* * threadprox/unix/proc.c (apr_proc_create): Relax the tests to allowjorton2006-10-101-1/+1
| | | | | | | | | | executable-but-unreadable programs to be executed even if the errchk mode is active. PR: 32498 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@454787 13f79535-47bb-0310-9956-ffa450edef68
* Implement apr_threadkey_private destructors on WIN32mturk2006-08-241-2/+15
| | | | | | instead silently ignoring them. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@434327 13f79535-47bb-0310-9956-ffa450edef68
* Fix the typo.jorton2006-08-0322-22/+22
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@428317 13f79535-47bb-0310-9956-ffa450edef68
* Update license header.jorton2006-08-0322-132/+132
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@428313 13f79535-47bb-0310-9956-ffa450edef68
* Fix up Win32-private includes to bring it in line with all other platforms.jerenkrantz2006-07-124-6/+6
| | | | | | | | | | Originally titled: [patch 10/17] include path prefix win32/ Submitted by: John Mark Vandenberg Reviewed by: Will Rowe (concept), Justin Erenkrantz git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@421349 13f79535-47bb-0310-9956-ffa450edef68