| version 1.6, 2002/02/20 14:16:44 |
version 1.7, 2002/02/21 02:22:00 |
| Line 23 PROCTABLE proctable_create(const int siz |
|
| Line 23 PROCTABLE proctable_create(const int siz |
|
| /* Destroy proctable. */ |
/* Destroy proctable. */ |
| void proctable_destroy(PROCTABLE *p_ptbl); |
void proctable_destroy(PROCTABLE *p_ptbl); |
| |
|
| |
/* Join two proctables. Appends src_ptbl to p_dest_ptbl. */ |
| |
/* Returns 0 on error, -1 on success. */ |
| |
int proctable_join(PROCTABLE *p_dest_ptbl, PROCTABLE src_ptbl); |
| |
|
| /* Get index of process in process table by pid. */ |
/* Get index of process in process table by pid. */ |
| int proctable_get_process_index_by_pid(PROCTABLE ptbl, int pid); |
int proctable_get_process_index_by_pid(PROCTABLE ptbl, int pid); |
| |
|
| /* Get index of process in process table by its name. */ |
/* Get index of process in process table by its name. */ |
| |
/* Returns -1 when not found, index on sucess. */ |
| int proctable_get_process_index_by_name(PROCTABLE ptbl, char *name); |
int proctable_get_process_index_by_name(PROCTABLE ptbl, char *name); |
| |
|
| /* Add standart process with streams stdin, stdout, stderr to proc. */ |
/* Add standart process with streams stdin, stdout, stderr to proc. */ |
| /* Index it as ptbl[0] and move all ptbl[x] to ptbl[x+1]. */ |
/* Index it as ptbl[0] and move all ptbl[x] to ptbl[x+1]. */ |
| |
/* Returns -1 on error, 0 on success. */ |
| int proctable_add_std_process(PROCTABLE *p_ptbl); |
int proctable_add_std_process(PROCTABLE *p_ptbl); |
| |
|
| /* Update processes. */ |
/* Update processes. */ |
| Line 45 int proctable_exec(PROCTABLE ptbl); |
|
| Line 51 int proctable_exec(PROCTABLE ptbl); |
|
| /* Closing 2nd sides of pipes. */ |
/* Closing 2nd sides of pipes. */ |
| void proctable_close_2nd_sides_of_pipes(PROCTABLE ptbl); |
void proctable_close_2nd_sides_of_pipes(PROCTABLE ptbl); |
| |
|
| |
|
| /* Remove process from process table, when exited. */ |
/* Remove process from process table, when exited. */ |
| int proctable_remove_process(PROCTABLE *p_ptbl, const int proc_id); |
int proctable_remove_process(PROCTABLE *p_ptbl, const int proc_id); |
| |
|
| Line 54 void proctable_print(PROCTABLE ptbl); |
|
| Line 59 void proctable_print(PROCTABLE ptbl); |
|
| |
|
| /* Function read on opened filedescriptors and write */ |
/* Function read on opened filedescriptors and write */ |
| /* to 2nd sides pipes. */ |
/* to 2nd sides pipes. */ |
| int proctable_read_old(PROCTABLE *p_ptbl, fd_set *p_fds); |
|
| int proctable_read(PROCTABLE *p_ptbl, fd_set *p_rfds, fd_set *p_efds); |
int proctable_read(PROCTABLE *p_ptbl, fd_set *p_rfds, fd_set *p_efds); |
| |
|
| /* Check if processes are still running. */ |
/* Check if processes are still running. */ |