source: git/Tst/Manual/waitfirst.tst @ 0d6b7fc

spielwiese Release-4-3-2p2
Last change on this file since 0d6b7fc was 894057, checked in by Oleksandr Motsak <motsak@…>, 13 years ago
ADD: Tests from online manual (res+stat on mamawutz): short ones Tst/Manual/s.lst
  • Property mode set to 100644
File size: 477 bytes
Line 
1LIB "tst.lib"; tst_init();
2  link l1 = "ssi:fork"; open(l1);
3  link l2 = "ssi:fork"; open(l2);
4  link l3 = "ssi:fork"; open(l3);
5  list l = list(l1,l2,l3);
6  write(l1, quote(system("sh", "sleep 15")));
7  write(l2, quote(system("sh", "sleep 13")));
8  write(l3, quote(system("sh", "sleep 11")));
9  waitfirst(l, 5000); // terminates after 5sec with result 0
10  waitfirst(l);       // terminates after 6 more sec with result 3
11  close(l1);
12  close(l2);
13  close(l3);
14tst_status(1);$
Note: See TracBrowser for help on using the repository browser.