Functions

pt.c File Reference

internal fork functions and process table. More...

#include "pt.h"
#include "tcp_init.h"
#include "sr_module.h"
#include "socket_info.h"
#include "rand/fastrand.h"
#include "daemonize.h"
#include <stdio.h>
#include <time.h>
Include dependency graph for pt.c:

Go to the source code of this file.

Functions


Detailed Description

Definition in file pt.c.


Function Documentation

int fork_process ( int  child_id,
char *  desc,
int  make_sock 
)
Parameters:
child_id - rank, if equal to PROC_NOCHLDINIT init_child will not be called for the new forked process (see sr_module.h)
desc - text description for the process table
make_sock - if to create a unix socket pair for it
Returns:
the pid of the new process

Definition at line 261 of file pt.c.

References daemon_status_on_fork_cleanup(), PROC_NOCHLDINIT, and process_no.

Referenced by child_init(), fork_basic_timer(), fork_basic_utimer(), fork_local_timer_process(), fork_sync_timer(), fork_sync_utimer(), mi_child_init(), and mod_child_init().

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int set_fork_delay ( unsigned int  v  ) 
Parameters:
desc - text description for the process table
r - index in the tcp_children array
*reader_fd_1 - pointer to return the reader_fd[1]
Returns:
the pid of the new process

Definition at line 74 of file pt.c.