bproc_move

Name

bproc_move – Move the running process to another node

Synopsis

#include <sys/bproc.h>
int _bproc_move_io (int node, int flags, int port);
int _bproc_move (int node, int flags);
int bproc_move (int node);

Arguments

node

The node to move to

flags

Flags for VMAdump.

port

The IP port BProc should connect back to for I/O forwarding.

Description

This call will move the current process to the remote node number given by node. It returns 0 on success, -1 on failure. errno is set on failure.

node is the node to move to.

flags can be one of the following: BPROC_DUMP_LIBS, BPROC_DUMP_EXEC, BPROC_DUMP_OTHER or any combination of them binary OR’d together. A binary OR of all three, BPROC_DUMP_ALL, is also provided as a shortcut. These flags tell VMAdump how much of the running process to dump and send to the compute node.

port is the port BProc should connect back to, to handle I/O forwarding. A port value of 0 means it assumes I/O forwarding is being done on the existing socket for stdout and stderr only. Any other value and it will try to connect back to that port and open three connections, one for stdout, one for stderr, and one for stdin.

If you use _bproc_move or bproc_move, port has a default value of 0. If you use bproc_move, flags takes a default value that is BPROC_DUMP_EXEC|BPROC_DUMP_OTHER if you’re trying to move to an up node or the master, otherwise it is BPROC_DUMP_EXEC|BPROC_DUMP_LIBS|BPROC_DUMP_OTHER

Return Value

Returns 0 on success.

Returns -1 on error, and sets errno.

Errors

EBUSY

No master?

ENOMEM

Out of memory.

EIO

An I/O error occurred.