Menu
Home Explore People Places Arts History Plants & Animals Science Life & Culture Technology
On this page
process.h
Non-standard C header file provided by most C compilers targeting MS-DOS, Windows 3.1x, Win32, OS/2 or Novell NetWare

process.h is the C header file which contains function declarations and macros used in working with threads and processes. Most C compilers that target DOS, Windows 3.1x, Win32, OS/2, Novell NetWare or DOS extenders supply this header and the library functions in their C library. Neither the header file nor most of the functions are defined by either the ANSI/ISO C standard or by POSIX.

We don't have any images related to process.h yet.
We don't have any YouTube videos related to process.h yet.
We don't have any PDF documents related to process.h yet.
We don't have any Books related to process.h yet.
We don't have any archived web articles related to process.h yet.

History

Microsoft's version of the file dates back to at least 1985, according to its copyright statement.1 An early reference to the file was in a post on the net.micro.pc usenet on Oct-26-1986.2 The compiler used was Microsoft C compiler version 3.0. The Lattice C compiler version 3.30 (Aug-24-1988) did not have such a header file, but offered similar functions. Borland provided the header in their Turbo C compiler version 2.01. The C Ware-Personal C compiler version 1.2c (June 1989) had only the ANSI headers.

Functions

NameDescriptionNotes
execl, execle, execlp, execlpeload and execute a new child process by placing it in memory previously occupied by the parent process. Parameters are passed individually.DOS, Win, OS/2, POSIX
execv, execve, execvp, execvpeload and execute a new child process by placing it in memory previously occupied by the parent process. Parameters are passed as an array of pointers.DOS, Win, OS/2, POSIX
spawnl, spawnle, spawnlp, spawnlpeload and execute a new child process. Parameters are passed individually.DOS, Win, OS/2
spawnv, spawnve, spawnvp, spawnvpeload and execute a new child process. Parameters are passed as an array of pointers.DOS, Win, OS/2
beginthread, beginthreadNTcreates a new thread of execution within the current process.Win, OS/2
endthreadterminates a thread created by beginthread.Win, OS/2
getpidreturns the process identifier.DOS, Win, OS/2
cexitrestore interrupt vectors altered by the startup code.DOS, Win, OS/2

Constants

NameDescriptionNotesOS
_P_WAITSuspends parent process until the child process has finished executing.synchronous spawn.MS-DOS, Win32, OS/2
_P_NOWAIT, _P_NOWAITOContinues to execute calling process concurrently with new process.asynchronous spawn.Win32, OS/2
_P_OVERLAYOverlays parent process with child, which destroys the parent.has the same effect as the exec* functions.MS-DOS, Win32, OS/2
_P_DETACHThe child is run in background without access to the console or keyboard.Calls to _cwait upon the new process will fail. Asynchronous spawn.Win32, OS/2
_WAIT_CHILDused as cwait action.Obsolete on Win32.MS-DOS, OS/2
_WAIT_GRANDCHILDused as cwait action.Obsolete on Win32.MS-DOS, OS/2

Implementations

Given the fact there is no standard on which to base the implementation, the functions declared by process.h differ, depending on the compiler in use. Below is a list of compilers which provide process.h.

  • DJGPP34
  • OpenWatcom,56
  • Digital Mars78
  • MinGW9
  • Microsoft Visual C++10
  • Borland Turbo C, 2.0 and later1112
  • Lcc3213
  • QNX Neutrino QCC 6.x14

Differences

Another aspect that might vary is the combined length of exec* and spawn* parameters.

  • Delorie DJGPP: does not have such a limit.15
  • Digital Mars: the maximum is 128 bytes; nothing is stated about the ending '\0' character.
  • Microsoft cl: the argument list for the new process must not exceed 1024 bytes.16

References

  1. "Copyright 1985–1989, Microsoft Corporation", in QuickC version 2.00 process.h file /wiki/QuickC

  2. Is my floppy diskette formated?[permanent dead link‍], groups-beta.google.com http://groups-beta.google.com/group/net.micro.pc/browse_frm/thread/b85ef1946a4915e6/1154bb52be4d5854?lnk=st&q=%22process%5C.h%22&rnum=23#1154bb52be4d5854

  3. Delorie.com http://www.delorie.com/djgpp/

  4. DJGPP process.h, delorie.com http://www.delorie.com/djgpp/doc/incs/process.h

  5. Openwatcom.org Archived 2015-03-17 at the Wayback Machine http://www.openwatcom.org/index.php/Main_Page

  6. OpenWatcom clib Archived 2006-10-11 at the Wayback Machine, openwatcom.org http://www.openwatcom.org/ftp/manuals/clib.pdf

  7. DigitalMars.com http://www.digitalmars.com/

  8. Digital Mars process.h, digitalmars.com http://www.digitalmars.com/rtl/process.html

  9. MinGW.org http://www.mingw.org/

  10. "MSDN.Microsoft.com". Archived from the original on 2007-07-07. Retrieved 2007-01-15. https://web.archive.org/web/20070707082306/http://msdn.microsoft.com/vstudio/express/visualc/default.aspx

  11. "Borland.com". Archived from the original on 2012-11-05. Retrieved 2007-01-15. https://web.archive.org/web/20121105211827/http://www.borland.com/

  12. C version 2.01, dn.codegear.com https://archive.today/20110710191522/http://dn.codegear.com/article/20841Turbo

  13. CS.Virginia.edu http://www.cs.virginia.edu/~lcc-win32/

  14. QNX.com http://www.qnx.com/products/neutrino_rtos/

  15. DJGPP spawn*, delorie.com http://www.delorie.com/djgpp/doc/libc/libc_736.html

  16. Microsoft MSDN, msdn.microsoft.com http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_crt_system.2c_._wsystem.asp