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)
51 ar $(ARFLAGS) libruncap.a $(OBJECTS) 51 ar $(ARFLAGS) libruncap.a $(OBJECTS)
52 ranlib libruncap.a 52 ranlib libruncap.a
53 53
54clean:
55 rm -f libruncap.a $(OBJECTS)
56
54install: install-lib install-headers install-man 57install: install-lib install-headers install-man
55 58
56install-lib: libruncap.a 59install-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)
536 errno = rc->rc_errno; 536 errno = rc->rc_errno;
537 return -1; 537 return -1;
538 } 538 }
539 runcap_rewind(rc, RUNCAP_STDOUT);
540 runcap_rewind(rc, RUNCAP_STDERR);
539 return 0; 541 return 0;
540} 542}
541 543

Return to:

Send suggestions and report system problems to the System administrator.