how to terminate an external program after timeout?
Brandon S Allbery KF8NH
allbery at ece.cmu.edu
Thu Sep 9 15:41:57 EDT 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 9/9/10 05:35 , Christian Maeder wrote:
> System.Process.readProcessWithExitCode "metis" filename ""
If all else fails, there's:
sh -c '(sleep 120; kill -TERM $$ >/dev/null 2>&1) & exec metis'
which makes the shell deal with timeouts for you. (Adjust sleep time and
kill signal as needed.)
- --
brandon s. allbery [linux,solaris,freebsd,perl] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university KF8NH
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkyJOIUACgkQIn7hlCsL25VzdwCfcFW/LHTRslit2P4en/o3V88j
VEcAnjTB6Dzhpc74TmIvvTUwXwENhDz/
=8ROO
-----END PGP SIGNATURE-----
More information about the Glasgow-haskell-users
mailing list