aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2017-07-20 17:27:20 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2017-07-20 17:27:20 +0300
commit0c0ae29bc7a71fc2cb6d0acf403b1e72715fbe48 (patch)
treed6a052101d5795da1c9c5dcb2651874f513cc3e9
parent089d80690690f5c8af84865d2930e3bd8cb009be (diff)
downloadruncap-0c0ae29bc7a71fc2cb6d0acf403b1e72715fbe48.tar.gz
runcap-0c0ae29bc7a71fc2cb6d0acf403b1e72715fbe48.tar.bz2
Minor changes
* Makefile: Add the "clean" rule. * runcap.c (runcap): Rewind captured streams before return on success.
-rw-r--r--Makefile3
-rw-r--r--runcap.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 1f0914d..e0a8f06 100644
--- a/Makefile
+++ b/Makefile
@@ -51,6 +51,9 @@ libruncap.a: $(OBJECTS)
ar $(ARFLAGS) libruncap.a $(OBJECTS)
ranlib libruncap.a
+clean:
+ rm -f libruncap.a $(OBJECTS)
+
install: install-lib install-headers install-man
install-lib: libruncap.a
diff --git a/runcap.c b/runcap.c
index f36d5b1..f2b3d95 100644
--- a/runcap.c
+++ b/runcap.c
@@ -536,6 +536,8 @@ runcap(struct runcap *rc, int flags)
errno = rc->rc_errno;
return -1;
}
+ runcap_rewind(rc, RUNCAP_STDOUT);
+ runcap_rewind(rc, RUNCAP_STDERR);
return 0;
}

Return to:

Send suggestions and report system problems to the System administrator.