Your message dated Thu, 28 May 2009 21:38:04 +0000
with message-id <e1m9nia-0001ye...@ries.debian.org>
and subject line Bug#412923: fixed in tct 1.18-3
has caused the Debian Bug report #412923,
regarding patch: support fractions of seconds
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
412923: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=412923
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: timeout
Version: 1.11-6.3
Severity: wishlist
Tags: patch
I needed < 1 second timeouts for something so I wrote a patch that
adds support for non-integer timeouts like 0.5 seconds or 2.3 seconds.
Attached.
Sami
--- ../../../tct-1.11.orig/src/misc/timeout.c 2001-09-10 00:46:10.000000000
+0300
+++ timeout.c 2007-03-01 01:09:48.000000000 +0200
@@ -34,6 +34,8 @@
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
+#include <time.h>
+#include <sys/wait.h>
extern int optind;
@@ -64,10 +66,11 @@
int argc;
char **argv;
{
- int time_to_run;
+ float time_to_run;
pid_t pid;
pid_t child_pid;
int status;
+ struct timespec ts;
progname = argv[0];
@@ -78,7 +81,7 @@
if ((kill_signal = atoi(*argv + 1)) <= 0)
usage();
- if (argc < 2 || (time_to_run = atoi(argv[0])) <= 0)
+ if (argc < 2 || (time_to_run = atof(argv[0])) <= 0)
usage();
commandname = argv[1];
@@ -100,7 +103,13 @@
(void) signal(SIGQUIT, terminate);
(void) signal(SIGTERM, terminate);
(void) signal(SIGALRM, terminate);
- alarm(time_to_run);
+ if (!fork()) {
+ ts.tv_sec = (int)time_to_run;
+ ts.tv_nsec = (time_to_run-ts.tv_sec)*1000000000;
+ nanosleep(&ts,NULL);
+ kill(getppid(),SIGALRM);
+ exit(0);
+ }
while ((pid = wait(&status)) != -1 && pid != child_pid)
/* void */ ;
return (pid == child_pid ? status : -1);
-- System Information:
Debian Release: 4.0
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-amd64
Locale: LANG=C, lc_ctype=fi...@euro (charmap=ISO-8859-15)
Versions of packages timeout depends on:
ii libc6 2.3.6.ds1-13 GNU C Library: Shared libraries
timeout recommends no packages.
-- no debconf information
signature.asc
Description: Digital signature
--- End Message ---
--- Begin Message ---
Source: tct
Source-Version: 1.18-3
We believe that the bug you reported is fixed in the latest version of
tct, which is due to be installed in the Debian FTP archive:
tct_1.18-3.diff.gz
to pool/main/t/tct/tct_1.18-3.diff.gz
tct_1.18-3.dsc
to pool/main/t/tct/tct_1.18-3.dsc
tct_1.18-3_i386.deb
to pool/main/t/tct/tct_1.18-3_i386.deb
timeout_1.18-3_i386.deb
to pool/main/t/tct/timeout_1.18-3_i386.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 412...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Daniel Baumann <dan...@debian.org> (supplier of updated tct package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Thu, 28 May 2009 22:55:57 +0200
Source: tct
Binary: tct timeout
Architecture: source i386
Version: 1.18-3
Distribution: unstable
Urgency: low
Maintainer: Debian Forensics <forensics-devel@lists.alioth.debian.org>
Changed-By: Daniel Baumann <dan...@debian.org>
Description:
tct - collection of forensics related utilities
timeout - run a command with a time limit
Closes: 412923
Changes:
tct (1.18-3) unstable; urgency=low
.
* Renaming debian sub-directories to better matching names.
* Using quilt rather than dpatch.
* Adding patch from Sami Liedes <slie...@cc.hut.fi> to add support for
fractions of seconds for timeout (Closes: #412923).
* Unifing code style for variables in tct.postrm.
* Updating year in copyrigth file.
* Updating to standards 3.8.1.
* Using correct rfc-2822 date formats in changelog.
Checksums-Sha1:
e48dcc2ef4c234ee80d6275d5b244351a8cd7dc2 1195 tct_1.18-3.dsc
577dd457753426748f4465a3cbf460cc6c7d5be0 16467 tct_1.18-3.diff.gz
ac8ba658ea8accf9792276f766847447fe84c810 158456 tct_1.18-3_i386.deb
f540ea4b84ee7f67179fdf4ff3f76954de9fbe8c 24720 timeout_1.18-3_i386.deb
Checksums-Sha256:
7c8a7882f21aa6794d272474dc2128b15193695e000fa26bb92307cac28f26ab 1195
tct_1.18-3.dsc
931467bdba38fdeb7ee0a720d088bf63675be552afe3f2a55d34008ade8ff55c 16467
tct_1.18-3.diff.gz
4eddec5c41d63f69b8dbf4b01b08ee53f0673b757f6f89f61f68317bc7282049 158456
tct_1.18-3_i386.deb
8afb0f6b2e89e19b9d5f7cbcfb40a13b6fdfe111e52ec48c3687937d2727b645 24720
timeout_1.18-3_i386.deb
Files:
aa0aa40407fe0e849b0779f735bf0266 1195 admin optional tct_1.18-3.dsc
07211b528be9c01c74db546266529cae 16467 admin optional tct_1.18-3.diff.gz
f755476bacd9cc7a8995a2f22b72981b 158456 admin optional tct_1.18-3_i386.deb
69cd00155ee39809e995956e92dc4afa 24720 admin optional timeout_1.18-3_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkoe+n0ACgkQ+C5cwEsrK54IGQCgyw8wEOFh4HTBPN9mrjEZ/f1k
bvsAn3fTXnPpY3EYwP7IQtA/3MqUHNHD
=Gy77
-----END PGP SIGNATURE-----
--- End Message ---
_______________________________________________
forensics-devel mailing list
forensics-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/forensics-devel