aboutsummaryrefslogtreecommitdiff
path: root/threadproc/os2/proc.c
Commit message (Collapse)AuthorAge
* Remove trailing whitespaces in *.c.Ivan Zhakov2022-11-20
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1905414 13f79535-47bb-0310-9956-ffa450edef68
* apr_thread: Follow up to r1897207 and r1897471: s/AP_HAS_/APR_HAS_/gYann Ylavic2022-06-17
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902019 13f79535-47bb-0310-9956-ffa450edef68
* apr_thread: Follow up to r1897207: Provide apr_thread_current_after_fork().Yann Ylavic2022-01-25
| | | | | | | | | | | thread_local variables are not (always?) reset on fork(), so APR (and the user) needs a way to set the current_thread to NULL. Use apr_thread_current_after_fork() in apr_proc_fork()'s child process. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1897470 13f79535-47bb-0310-9956-ffa450edef68
* stop using deprecated versions of APR_FOPEN_* and APR_FPROT_*Jeff Trawick2014-01-18
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1559343 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Remove all remaining uses of APR_OS2_STATUS macro which has beenBrian Havard2010-04-02
| | | | | | | superceded by the more general APR_FROM_OS_ERROR. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@930224 13f79535-47bb-0310-9956-ffa450edef68
* * We need to disable inheritance in the case of success like in theRuediger Pluem2009-06-11
| | | | | | | | cases for stdout and stdin. Fixes the same issue fixed for unix in r783398 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@783722 13f79535-47bb-0310-9956-ffa450edef68
* Remove simple ipc because of -1Mladen Turk2009-02-24
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@747357 13f79535-47bb-0310-9956-ffa450edef68
* Remove ipc init from apr_initialize.Mladen Turk2009-02-23
| | | | | | | On posix make unique tmp name and add that to child environment. The env var name made of child making it almost unique for that process instance git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@747042 13f79535-47bb-0310-9956-ffa450edef68
* Add simple parent/child data exchange for APR processesMladen Turk2009-02-21
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@746589 13f79535-47bb-0310-9956-ffa450edef68
* Add object perms set macros and implement them for shm and mutexMladen Turk2009-02-07
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@741862 13f79535-47bb-0310-9956-ffa450edef68
* Fix mismatch, using child_err when dealing with stdout.Brian Havard2007-10-31
| | | | git-svn-id: https://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.Brian Havard2007-10-31
| | | | | | | | We still need to restore the std handles if "no file" (filedes == -1) is passed to the child. git-svn-id: https://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.Brian Havard2007-10-30
| | | | | | | | I haven't yet verified that the code works but this is a step in the right direction. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@590037 13f79535-47bb-0310-9956-ffa450edef68
* Backport the std handling improvements to Netware, OS2, BeOS.William A. Rowe Jr2007-10-15
| | | | | | | | | | | | | | | | | | | | | 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: https://svn.apache.org/repos/asf/apr/apr/trunk@584928 13f79535-47bb-0310-9956-ffa450edef68
* Fix the typo.Joe Orton2006-08-03
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@428317 13f79535-47bb-0310-9956-ffa450edef68
* Update license header.Joe Orton2006-08-03
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@428313 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Fix crash in apr_proc_create with non-shell type process creation whereBrian Havard2005-07-03
| | | | | | | | | the .exe extension is not given. Was trying to close an apr_file_t that had failed to open, causing a segfault. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@208879 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright year to 2005 and standardize on current copyright owner line.Justin Erenkrantz2005-02-04
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@151412 13f79535-47bb-0310-9956-ffa450edef68
* Added apr_procattr_user_set and apr_procattr_group_set to allow setting ↵Mladen Turk2005-01-16
| | | | | | uid/gid for newly created processes using apr_proc_create. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@125349 13f79535-47bb-0310-9956-ffa450edef68
* Add command type APR_SHELLCMD_ENV for creating a processJeff Trawick2004-06-23
| | | | | | | | | | | | | | | 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: https://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 ↵Jean-Jacques Clar2004-06-14
| | | | | | | | | | (NetWare ONLY). Replaced changes that added APR_PROGRAM_ADDRSPACE committed 6/11/04. Reviewed by Brad Nicholes git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65196 13f79535-47bb-0310-9956-ffa450edef68
* Relicense APR under Apache License, Version 2.0Justin Erenkrantz2004-02-13
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64904 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: when parsing #! line, adjust for the fact that apr_file_gets() noBrian Havard2003-03-31
| | | | | | | longer removes CR characters. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64464 13f79535-47bb-0310-9956-ffa450edef68
* We don't guard against NULL args.William A. Rowe Jr2003-02-24
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64375 13f79535-47bb-0310-9956-ffa450edef68
* add apr_procattr_error_check_set() for telling apr_proc_create() toJeff Trawick2003-02-07
| | | | | | | | try to anticipate any errors that might occur after fork() (no-op everywhere but Unix) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64341 13f79535-47bb-0310-9956-ffa450edef68
* Allow apr_proc_create() to call an app-provided error reportingJeff Trawick2003-02-06
| | | | | | | | | | 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: https://svn.apache.org/repos/asf/apr/apr/trunk@64330 13f79535-47bb-0310-9956-ffa450edef68
* rename apr_arch_fileio.h to apr_arch_file_io.h for consistencyThom May2003-01-07
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64275 13f79535-47bb-0310-9956-ffa450edef68
* Namespace protection for include/arch/ header filesThom May2003-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: https://svn.apache.org/repos/asf/apr/apr/trunk@64271 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright notices to 2003.Thom May2003-01-01
| | | | | | | No functional changes git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64251 13f79535-47bb-0310-9956-ffa450edef68
* Rename all the "cntxt" members of the thread and proc structures toSander Striker2002-03-19
| | | | | | | "pool". git-svn-id: https://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].William A. Rowe Jr2002-03-16
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63141 13f79535-47bb-0310-9956-ffa450edef68
* Update our copyright for this year.Roy T. Fielding2002-03-13
| | | | git-svn-id: https://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 automaticAaron Bannert2002-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | 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: https://svn.apache.org/repos/asf/apr/apr/trunk@63044 13f79535-47bb-0310-9956-ffa450edef68
* Add a couple new command types to process creation:Greg Stein2002-01-28
| | | | | | | | | | | | | | | | | | 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: https://svn.apache.org/repos/asf/apr/apr/trunk@62840 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Implement exitcode/exitwhy enhancements in apr_proc_wait*Brian Havard2001-10-26
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62464 13f79535-47bb-0310-9956-ffa450edef68
* Fix the reporting for child processes that die. This removesRyan Bloom2001-10-23
| | | | | | | | | all of the non-portable W* macros from Apache. Submitted by: Jeff Trawick and Ryan Bloom git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62455 13f79535-47bb-0310-9956-ffa450edef68
* Return the exit code from apr_proc_wait(). This is a combination of a patchGreg Stein2001-09-20
| | | | | | | | | | | 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: https://svn.apache.org/repos/asf/apr/apr/trunk@62350 13f79535-47bb-0310-9956-ffa450edef68
* Ooops, test is redundant. We wouldn't get here if interpreter was 0 length.Brian Havard2001-08-23
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62213 13f79535-47bb-0310-9956-ffa450edef68
* \n removal, needed now OS/2 apr_file_gets() leaves them on.Brian Havard2001-08-23
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62212 13f79535-47bb-0310-9956-ffa450edef68
* Wrap all APR functions in APR_DECLARE macro.Ryan Bloom2001-08-10
| | | | | | | Submitted by: Sterling Hughes <sterling@designmultimedia.com> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62139 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: add an assortment of misc helper functions that were missing soBrian Havard2001-03-19
| | | | | | | | exports.c can safely be linked in. There's also a few stub functions returning APR_ENOTIMPL. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61367 13f79535-47bb-0310-9956-ffa450edef68
* Stop warning about apr_signal() being undeclared.Brian Havard2001-02-18
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61250 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright to 2001Roy T. Fielding2001-02-16
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61235 13f79535-47bb-0310-9956-ffa450edef68
* Don't assume apr_pstrndup will return n bytes of storage. It was recentlyBrian Havard2001-02-13
| | | | | | | | optimized to only allocate enough storage for the string if shorter than n which caused the args to get scrambled. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61228 13f79535-47bb-0310-9956-ffa450edef68
* renaming various functions for consistency sakeDoug MacEachern2001-02-08
| | | | | | | | | | | see: http://apr.apache.org/~dougm/apr_rename.pl PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61194 13f79535-47bb-0310-9956-ffa450edef68
* OS2 was chasing os2errno.h which we hid in a private platform directory,William A. Rowe Jr2001-01-28
| | | | | | | | | | | | but apr_errno.h is public. It also called in <os.h> with possibly inappropriate headers, and if os2.h follows any other header's usual conventions, calling it the second time for more declarations can be dicey. Relocated <os2.h> into apr.h.in (accessable to all, since it's later leveraged by most), which simplifies a bunch of code, and relocate all of the os2errno values into apr_errno.h for APR_STATUS_IS_FOO tests. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61156 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: const'ifying the args to apr_create_process() has a ripple effect....Brian Havard2000-11-26
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60797 13f79535-47bb-0310-9956-ffa450edef68
* The arguments to apr_create_process() should be "const" since we aren'tGreg Stein2000-11-26
| | | | | | | | | | going to change them. It is also quite possible that args are constant strings (thus, we *definitely* better not change them). "env" got the same treatment. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60795 13f79535-47bb-0310-9956-ffa450edef68
* Fix OS/2 build after the move of private APR headers to the include/arch/Brian Havard2000-11-14
| | | | | | | | | | | | | | | | | | | area. This also messes with some unix stuff where it's shared with OS/2. The strategy used to get the right platform specific include files is: - Every Makefile.in contains something like OSDIR=$(INCDIR)/arch/@OSDIR@ DEFOSDIR=$(INCDIR)/arch/@DEFAULT_OSDIR@ INCLUDES=-I$(INCDIR) -I$(OSDIR) -I$(DEFOSDIR) - all APR private includes look like #include "fileio.h", ie no leading arch directory so no #ifdef'ing needed in shared .c files. This ensures that the include file for the target platform is always used if it exists, otherwise the default is used. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60720 13f79535-47bb-0310-9956-ffa450edef68
* Move all of the threadproc private header files to an arch directory underRyan Bloom2000-11-09
| | | | | | | | | the include directory. All private header files for APR are being moved. This allows platforms that only implement some of the APR types to compile cleanly. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60660 13f79535-47bb-0310-9956-ffa450edef68