aboutsummaryrefslogtreecommitdiffhomepage
path: root/exec.h
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2005-10-08 21:20:51 +1000
committerGravatar axel <axel@liljencrantz.se>2005-10-08 21:20:51 +1000
commit9ae7fa5831cbc0a7d221c566bcd8633e609b9670 (patch)
treee58edf5437595dc50ff8595c23215f13efb190f9 /exec.h
parent93eed7bc352d7c5f26097c70b3ee324c9f4947ca (diff)
Move io redirection functions to their own library
darcs-hash:20051008112051-ac50b-113caa4cba470a739e4bfbed9f479e2fed357be7.gz
Diffstat (limited to 'exec.h')
-rw-r--r--exec.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/exec.h b/exec.h
index 14802636..21a5bac9 100644
--- a/exec.h
+++ b/exec.h
@@ -11,6 +11,11 @@
#include "util.h"
/**
+ pipe redirection error message
+*/
+#define PIPE_ERROR L"An error occurred while setting up pipe"
+
+/**
Initialize the exec library
*/
void exec_init();
@@ -57,19 +62,17 @@ void exec( job_t *j );
int exec_subshell( const wchar_t *cmd,
array_list_t *l );
-/**
- Free all resources used by a IO_BUFFER type io redirection.
-*/
-void exec_free_io_buffer( io_data_t *io_buffer );
/**
- Create a IO_BUFFER type io redirection.
+ Loops over close until thesyscall was run without beeing
+ interrupted. Thenremoves the fd from the open_fds list.
*/
-io_data_t *exec_make_io_buffer();
+void exec_close( int fd );
/**
- Close writing end of IO_BUFFER type io redirection, and fully read the reading end.
+ Call pipe(), and add resulting fds to open_fds, the list of opend
+ file descriptors for pipes.
*/
-void exec_read_io_buffer( io_data_t *d );
+int exec_pipe( int fd[2]);
#endif