Back to index

glibc  2.9
Functions
spawn_faction_init.c File Reference
#include <errno.h>
#include <spawn.h>
#include <stdlib.h>
#include <string.h>
#include "spawn_int.h"

Go to the source code of this file.

Functions

int __posix_spawn_file_actions_realloc (posix_spawn_file_actions_t *file_actions)
int posix_spawn_file_actions_init (posix_spawn_file_actions_t *file_actions)

Function Documentation

Definition at line 30 of file spawn_faction_init.c.

{
  int newalloc = file_actions->__allocated + 8;
  void *newmem = realloc (file_actions->__actions,
                       newalloc * sizeof (struct __spawn_action));

  if (newmem == NULL)
    /* Not enough memory.  */
    return ENOMEM;

  file_actions->__actions = (struct __spawn_action *) newmem;
  file_actions->__allocated = newalloc;

  return 0;
}

Here is the caller graph for this function:

Definition at line 49 of file spawn_faction_init.c.

{
  /* Simply clear all the elements.  */
  memset (file_actions, '\0', sizeof (*file_actions));
  return 0;
}

Here is the caller graph for this function: