aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rsvr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rsvr.c b/src/rsvr.c
index 01fa845..cd23e31 100644
--- a/src/rsvr.c
+++ b/src/rsvr.c
@@ -44,6 +44,11 @@ int main(int argc, char *argv[])
if( 0 > wb ){ perror("write(reservoir)"); }
if( 0 > rb || 0 > wb ){ return EXIT_FAILURE; }
+ if( 0 > lseek(rsvr_fd, 0, SEEK_SET) ){
+ perror("lseek(reservoir, 0, SEEK_SET)");
+ return EXIT_FAILURE;
+ }
+
if( 0 > dup2(rsvr_fd, 0) ){
perror("dup2(reservoir, stdin)");
return EXIT_FAILURE;