---
name: "rpspawn"
section: "2"
platform: "linux"
package: "lam2-dev"
version: "6.3.2-3"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/rpspawn"
---

# rpspawn(2)

Spawn a LAM process onto a remote node.

## NAME

rpspawn - Spawn a LAM process onto a remote node.

## SYNOPSIS

\#include \<preq.h\>

int rpspawn(int src\_node, int dest\_node, int sflags, int svalue, char \*\*argv, int \*pid, int \*idx);

## ARGUMENTS

- src\_node

  source node where selected process are running

- dest\_node

  destination node where new process will be spawned

- sflags

  method by which the existing process is selected - See [rpstate(2)](/rpstate/2.md).

- svalue

  selection matching value, if required, otherwise ignored

- argv

  null-terminated array of strings to be passed as command-line arguments to the new process

- pid

  new process ID (output)

- idx

  new process index (output)

## DESCRIPTION

When a process is spawned, the program is copied and rerun as a new process.

If *argv* is the null pointer, the program arguments of the original process are used.

One and only one process is spawned by *rpspawn()*. If multiple processes are selected, only one process is chosen.

## ERRORS

- ENOPDESCRIPTORS

  The remote process descriptor table is full.

- ENOFLDESCRIPTORS

  The table of strorage blocks (kept by the flat daemon) is full.

- ENOTPROCESS

  No matching process exists.

- EINVAL

  The selection method is invalid.

## SEE ALSO

[rpcreate(2)](/rpcreate/2.md), [rploadgo(2)](/rploadgo/2.md)
