summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/index.html2
-rw-r--r--doc/s6-maximumtime.html7
-rw-r--r--doc/upgrade.html8
-rw-r--r--package/info2
-rw-r--r--src/skaembutils/s6-maximumtime.c17
5 files changed, 24 insertions, 12 deletions
diff --git a/doc/index.html b/doc/index.html
index be6f1f3..b879dd7 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -77,7 +77,7 @@ library. </li>
<ul>
<li> The current released version of s6-portable-utils is
-<a href="s6-portable-utils-2.0.5.1.tar.gz">2.0.5.1</a>. </li>
+<a href="s6-portable-utils-2.0.5.2.tar.gz">2.0.5.2</a>. </li>
<li> Alternatively, you can checkout a copy of the s6-portable-utils git repository:
<pre> git clone git://git.skarnet.org/s6-portable-utils </pre> </li>
</ul>
diff --git a/doc/s6-maximumtime.html b/doc/s6-maximumtime.html
index d99ea88..650309a 100644
--- a/doc/s6-maximumtime.html
+++ b/doc/s6-maximumtime.html
@@ -50,5 +50,12 @@ s6-maximumtime sends it a signal and exits 99 with a message. </li>
<li> <tt>-2</tt>&nbsp;: on timeout, send a SIGUSR2 </li>
</ul>
+<h2> Notes </h2>
+
+<ul>
+ <li> If <em>milli</em> is 0, then it's interpreted as infinite: no time
+limit will be enforced. </li>
+</ul>
+
</body>
</html>
diff --git a/doc/upgrade.html b/doc/upgrade.html
index a8be650..8816eba 100644
--- a/doc/upgrade.html
+++ b/doc/upgrade.html
@@ -18,10 +18,16 @@
<h1> What has changed in s6-portable-utils </h1>
+<h2> in 2.0.5.2 </h2>
+
+<ul>
+ <li> Bugfix release, no changes. </li>
+</ul>
+
<h2> in 2.0.5.1 </h2>
<ul>
- <li> skalibs dependency bumped to 2.3.4.0. </li>
+ <li> skalibs dependency bumped to 2.3.6.1. </li>
</ul>
<h2> in 2.0.5.0 </h2>
diff --git a/package/info b/package/info
index ead360b..b3fbd34 100644
--- a/package/info
+++ b/package/info
@@ -1,4 +1,4 @@
package=s6-portable-utils
-version=2.0.5.1
+version=2.0.5.2
category=admin
package_macro_name=S6_PORTABLE_UTILS
diff --git a/src/skaembutils/s6-maximumtime.c b/src/skaembutils/s6-maximumtime.c
index 571914f..b5c8eab 100644
--- a/src/skaembutils/s6-maximumtime.c
+++ b/src/skaembutils/s6-maximumtime.c
@@ -19,11 +19,11 @@
int main (int argc, char const *const *argv, char const *const *envp)
{
- unsigned int timeout ;
- tain_t stamp, deadline ;
+ tain_t deadline ;
iopause_fd x[1] = { { .fd = -1, .events = IOPAUSE_READ, .revents = 0 } } ;
pid_t pid = 0 ;
int tosend = SIGTERM ;
+ unsigned int timeout ;
PROG = "s6-maximumtime" ;
{
subgetopt_t l = SUBGETOPT_ZERO ;
@@ -50,9 +50,8 @@ int main (int argc, char const *const *argv, char const *const *envp)
}
if ((argc < 2) || !uint0_scan(argv[0], &timeout)) strerr_dieusage(100, USAGE) ;
- if (!timeout) timeout = 1 ;
- if (!tain_from_millisecs(&deadline, timeout))
- strerr_diefu1sys(111, "taia_from_millisecs") ;
+ if (timeout) tain_from_millisecs(&deadline, timeout) ;
+ else deadline = tain_infinite_relative ;
x[0].fd = selfpipe_init() ;
if (x[0].fd < 0) strerr_diefu1sys(111, "selfpipe_init") ;
@@ -60,13 +59,13 @@ int main (int argc, char const *const *argv, char const *const *envp)
if (selfpipe_trap(SIGCHLD) < 0) strerr_diefu1sys(111, "selfpipe_trap") ;
pid = child_spawn0(argv[1], argv+1, envp) ;
- if (!pid) strerr_diefu2sys(111, "spawn ", argv[1]) ;
- tain_now(&stamp) ;
- tain_add(&deadline, &deadline, &stamp) ;
+ if (!pid) strerr_diefu2sys(111, "spawn ", argv[1]) ;
+ tain_now_g() ;
+ tain_add_g(&deadline, &deadline) ;
for (;;)
{
- int r = iopause_stamp(x, 1, &deadline, &stamp) ;
+ int r = iopause_g(x, 1, &deadline) ;
if (r < 0) strerr_diefu1sys(111, "iopause") ;
if (!r) break ;
if (x[0].revents & IOPAUSE_READ)