Spawn (computing)

Spawn (computing)

Spawn is a function that loads and executes a new child process in the Microsoft Windows line of operating systems. The current process may or may not continue to execute asynchronously. Creating a new subprocess requires enough memory in which both the child process and the current program can execute.

The spawn functions are inspired by Unix functions fork and exec; however, as Windows does not support fork (at least in the Win32 API; POSIX emulation environments such as Cygwin or SFU do), the spawn function was supplied as a replacement for the fork-exec combination. However, the spawn function, although it deals adequately with the most common use cases, lacks the full power of fork-exec, since after fork any process settings which will survive an exec may be changed. However, in these cases, this deficiency can be made up for by using the more low-level CreateProcess API.

Files that are open when a "spawn" call is made remain open in the child process.

In the "spawnl", "spawnlp", "spawnv", and "spawnvp" calls, the child process inherits the environment of the parent.

Prototype

:int spawnl(int mode, char *path, char *arg0, ...);:int spawnle(int mode, char *path, char *arg0, ..., char ** envp);:int spawnlp(int mode, char *path, char *arg0, ...);:int spawnlpe(int mode, char *path, char *arg0, ..., char ** envp);:int spawnv(int mode, char *path, char **argv);:int spawnve(int mode, char *path, char **argv, char ** envp);:int spawnvp(int mode, char *path, char **argv);:int spawnvpe(int mode, char *path, char **argv, char ** envp);

Function names

The base name of each function is spawn, followed by one or more letters:

References

ee also

*Fork
*Exec
*fork-exec
*Path (variable)
*Process.h


Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • Spawn — The word spawn can have several meanings: * Biological spawning *Spawn (computing), an operating system function that executes a child process *Spawn (comics), a fictional character in the comic series of the same name. ** , a video game based on …   Wikipedia

  • Cilk — Paradigm(s) imperative (procedural), structured, parallel Appeared in 1994 Designed by MIT Laboratory for Computer Science Developer Intel …   Wikipedia

  • Asymmetric multiprocessing — Note: This article refers to both asymmetrical multiprocessing and multiprocessors.Asymmetric multiprocessing or ASMP is a style of multiprocessing supported in DEC s VMS V.3 as well as a number of older systems including TOPS 10 and OS 360. It… …   Wikipedia

  • Heroes of Might and Magic IV — Infobox VG title = Heroes of Might and Magic IV developer = New World Computing publisher = The 3DO Company designer = Gus Smedstad version = 3.0 released = genre = Turn based strategy modes = Single player, single system multiplayer, and network …   Wikipedia

  • Tetris — Tetяis redirects here. For the Tengen produced game, see TETЯIS: The Soviet Mind Game. Tetris The box of the Nintendo version of Tetris for the NES. Developer(s) Alexey Pajitnov (E60 prototype), Vadim Ge …   Wikipedia

  • Alice (programming language) — Infobox programming language name = Alice paradigm = Multi paradigm: imperative, functional, distributed, concurrent year = 2000 designer = Saarland University developer = latest release version = 1.4 latest release date = May 3 2007 typing =… …   Wikipedia

  • Message Passing Interface — MPI, the Message Passing Interface, is standardized and portable message passing system designed by a group of researchers from academia and industry to function on a wide variety of parallel computers. The standard defines the syntax and… …   Wikipedia

  • History of Microsoft — Microsoft began using its current logo in Microsoft Windows splash screens with Windows 95. Microsoft is a multinational computer technology corporation. The history of Microsoft began on April 4, 1975, when it was founded by Bill Gates and Paul… …   Wikipedia

  • Stanford Smart Memories Project — Advances in VLSI technology now permit multiple processors to reside on a single integrated circuit chip, or IC. Such a processing system is known as a chip multiprocessor, or multi core CPU system. Building on this technology, the Stanford Smart …   Wikipedia

  • Intel Cilk Plus — Cilk Plus Paradigm(s) imperative (procedural), structured, parallel Appeared in 2010 Designed by Intel Developer Intel Stable release Parallel Studio 201 …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”