summaryrefslogtreecommitdiff
path: root/threadproc/win32/proc.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright notices for 2005.jorton2005-06-141-1/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.1.x@190596 13f79535-47bb-0310-9956-ffa450edef68
* Use zero length password if supplied password is NULL.mturk2005-01-171-12/+15
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@125406 13f79535-47bb-0310-9956-ffa450edef68
* Added apr_procattr_user_set and apr_procattr_group_set to allow setting ↵mturk2005-01-161-7/+145
| | | | | | uid/gid for newly created processes using apr_proc_create. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@125349 13f79535-47bb-0310-9956-ffa450edef68
* Win32: Implement apr_procattr_child_errfn_set()and ↵stoddard2004-08-241-2/+38
| | | | | | apr_procattr_error_check_set() on Windows git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65307 13f79535-47bb-0310-9956-ffa450edef68
* Add command type APR_SHELLCMD_ENV for creating a processtrawick2004-06-231-2/+4
| | | | | | | | | | | | | | | which is started by the shell and which inherits the parent's environment variables. The immediate use for this is with Apache httpd's piped loggers, correcting a regression since 1.3. In general, applications starting child processes often want the child to run with the same environment variables, so this plugs a hole in the API. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65213 13f79535-47bb-0310-9956-ffa450edef68
* Added new APR API to load child process in current or new address space ↵clar2004-06-141-0/+7
| | | | | | | | | | (NetWare ONLY). Replaced changes that added APR_PROGRAM_ADDRSPACE committed 6/11/04. Reviewed by Brad Nicholes git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65196 13f79535-47bb-0310-9956-ffa450edef68
* Relicense APR under Apache License, Version 2.0jerenkrantz2004-02-131-49/+10
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64904 13f79535-47bb-0310-9956-ffa450edef68
* As near as I can tell, Win32 will now correspond to Unix in terms of thewrowe2003-02-271-1/+6
| | | | | | | 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
* 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
* add apr_procattr_error_check_set() for telling apr_proc_create() totrawick2003-02-071-0/+7
| | | | | | | | 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/+7
| | | | | | | | | | 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
* 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
* rename apr_arch_fileio.h to apr_arch_file_io.h for consistencythommay2003-01-071-1/+1
| | | | 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-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-011-1/+1
| | | | | | | No functional changes git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64251 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
* 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
* 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
* 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
* 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
* 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
* Rename all the "cntxt" members of the thread and proc structures tostriker2002-03-191-26/+26
| | | | | | | "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-131-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63117 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
* In respect to Jeff's earlier comments, these fns will never be publiclywrowe2002-01-291-5/+6
| | | | | | | | | exported. However, with some patches I'm working up, they will be bound inside the core executable, so clashes could become possible [inevitable] since they aren't (and should not become) static functions. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62850 13f79535-47bb-0310-9956-ffa450edef68
* Add a couple new command types to process creation:gstein2002-01-281-0/+2
| | | | | | | | | | | | | | | | | | 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
* Mladen Turk's <mturk@mappingsoft.com> WinCE port.wrowe2002-01-281-4/+10
| | | | | | | | | | | | | | | | | | | Nearly, the apr.hw patch needs some review. In short, several quite standard ansi headers (e.g. time.h) aren't present in the WinCT port, but these changes require corresponding changes to apr.h.in. I changed Mladen's #define'd symbol names for the macro blocks to IF_WIN_OS_IS_UNICODE and ELSE_WIN_OS_IS_ANSI to make the code a bit more readable, and drop the global apr_os_level from each macro invocation. Also, I changed the scope of his APR_HAS_ANSI_FS to local scope, since it has no application in the public headers. Mladen's patch helps NT as well, allowing the /D WINNT flag to define NT-only compilations. With WINNT defined, all UNICODE/ANSI os version tests drop out entirely. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62837 13f79535-47bb-0310-9956-ffa450edef68
* Substantial optimization of the os_level semantic. Since this is entirelywrowe2001-12-281-7/+4
| | | | | | | | | | for internal consumption, and apr_initialize must be called, resolve the situation once and use the static, shared value for the remainder of the program execution. Next step is to allow conditional builds [excluding older 9x paths] if the user has no interest in 9x support. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62675 13f79535-47bb-0310-9956-ffa450edef68
* Win32: Fix compile break caused by last patch to proc.cstoddard2001-10-231-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62457 13f79535-47bb-0310-9956-ffa450edef68
* Fix the reporting for child processes that die. This removesrbb2001-10-231-2/+2
| | | | | | | | | 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
* No longer... win32's pid is a _pid_, hproc is the process handle.wrowe2001-09-201-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62354 13f79535-47bb-0310-9956-ffa450edef68
* Return the exit code from apr_proc_wait(). This is a combination of a patchgstein2001-09-201-13/+15
| | | | | | | | | | | 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
* Eliminate the //?/ paths altogether from proc_create. This simply isn'twrowe2001-09-171-1/+1
| | | | | | | | | that good an idea, too many user apps expect d:\ or \\mach\share\ from the args and GetModuleName calls (the later returns the true name as given by 'progname'.) Safer to simply ignore these. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62339 13f79535-47bb-0310-9956-ffa450edef68
* Clean up an emit.wrowe2001-09-171-1/+3
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62337 13f79535-47bb-0310-9956-ffa450edef68
* Fix two odd bits of breakage. Don't you just -love- casts?wrowe2001-09-171-15/+28
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62336 13f79535-47bb-0310-9956-ffa450edef68
* Since the original version of these blocks just set the si.hStdFoo'sjwoolley2001-09-111-6/+6
| | | | | | | | unconditionally, just testing attr->child_foo is sufficient to both maintain the original semantics and prevent a NULL pointer deref. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62312 13f79535-47bb-0310-9956-ffa450edef68
* (apr_proc_create): Check the attribute pointers, yes, but *don't*brane2001-09-111-8/+12
| | | | | | | change the semantics while we're at it. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62309 13f79535-47bb-0310-9956-ffa450edef68
* (apr_proc_create): Sigh. Process attributes can remainbrane2001-09-111-14/+28
| | | | | | | undefined. Don't dereference pointers without checking. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62308 13f79535-47bb-0310-9956-ffa450edef68
* (apr_proc_create): Fix bug in conversion of program name to Unicode onbrane2001-09-101-3/+3
| | | | | | | | WinNT: utf8_to_unicode_path needs more space than just the program length. Use a fixed-size buffer for the program name, like everywhere else. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62304 13f79535-47bb-0310-9956-ffa450edef68
* Fix the apr_proc_create for win32. In order to do so, this patchwrowe2001-09-091-150/+189
| | | | | | | | | | | | | | | introduces a flags arg for apr_filepath_get(), like apr_filepath_merge(), that allows the APR_FILEPATH_NATIVE result format. This launches win32 processes with the Unicode semantics (although it runs sbcs apps equally well) and changes the default to 'not detached', in sync with the unix default. Finally, assures apr_filepath_get() uses the '/' semantics on OS2 by default. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62296 13f79535-47bb-0310-9956-ffa450edef68