source: git/Tst/Short/waitfirst.tst @ 09cb443

spielwiese
Last change on this file since 09cb443 was 113fcd, checked in by Andreas Steenpaß <steenpas@…>, 13 years ago
tests for waitall and waitfirst git-svn-id: file:///usr/local/Singular/svn/trunk@14079 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 455 bytes
Line 
1LIB "tst.lib";
2tst_init();
3
4link l1 = "ssi:fork"; open(l1);
5link l2 = "ssi:fork"; open(l2);
6link l3 = "ssi:fork"; open(l3);
7list l = list(l1,l2,l3);
8write(l1, quote(system("sh", "sleep 15")));
9write(l2, quote(system("sh", "sleep 13")));
10write(l3, quote(system("sh", "sleep 11")));
11waitfirst(l, 5000); // terminates after 5sec with result 0
12waitfirst(l);       // terminates after 6 more sec with result 3
13close(l1);
14close(l2);
15close(l3);
16
17tst_status(1);$
Note: See TracBrowser for help on using the repository browser.