Subject | Hash | Author | Date (UTC) |
---|---|---|---|
parallel: Fix exit code handling when commands are specified after -- | 448a100d287f2cc183f305f9e28723776f10b1bf | Joey Hess | 2010-02-23 18:59:20 |
Cap sillyness. Closes: #570815 | 62b8a323afe9cd95f2bff26c7db455e226a40cec | Joey Hess | 2010-02-21 18:16:23 |
releasing version 0.38 | 9c0302474850fa0d16a1d2bca094325e9eea546b | Joey Hess | 2010-02-09 21:42:14 |
changelog | 8324a9ca9cfa1588339166cf70911fbbe99c8854 | Joey Hess | 2010-02-09 20:47:40 |
parallel: Define WEXITED to allow building on FreeBSD kernel. (This is somewhat experimental.) | 753f003b589caca0b7a25c0df6c6ae14e7b20a89 | Joey Hess | 2010-02-09 20:40:14 |
freebsd patch from Enrico Tassi | ff93b6b5da3e3d404a659973fe898b9cfd3a8092 | Joey Hess | 2010-02-09 20:35:10 |
wording | ad61b8762ecb666d386160df83031d34071e1031 | Joey Hess | 2009-10-31 23:02:53 |
parallel: Allow running independent commands, like `parallel -j3 -- ls df "echo hi"` | e0b2bcda976eb43b3976b750ce4261db6d608af8 | Joey Hess | 2009-10-31 14:20:08 |
Description improvements. Closes: #549450 (Thanks, Justin B Rye) | c54640a51bbf3ee6a8bc0054b48f31e46dd86ce1 | Joey Hess | 2009-10-05 17:33:27 |
releasing version 0.37 | 007d7b518d2d83b536adad36f3126856b1cd117a | Joey Hess | 2009-07-25 08:23:55 |
parallel.1: Typo fixes. Closes: #538147 | 6501eeabda20d1b1cf1f137d9bcfd167164a99df | Joey Hess | 2009-07-25 08:03:42 |
update | 0ddc5db2ce6e03ff7d7ff394b9285ff62d504b02 | Joey Hess | 2009-07-25 08:02:56 |
support -n option | 2470d063c10dc25daeedb31bcd77865da06d65fd | Pierre Habouzit | 2009-07-22 09:17:20 |
parallel: Clarify man page regarding CPUs. Closes: #536597 | f933ad5fa6a1a400426763576895f050da32ccbf | Joey Hess | 2009-07-15 14:13:52 |
releasing version 0.36 | 6cf8eb501e1636b37bf61b86b0aaeade05fc768b | Joey Hess | 2009-07-10 15:04:21 |
update | 87bb3ae3ea452f7abba694be1840ee177d03c085 | Joey Hess | 2009-07-10 15:01:25 |
use sysconf to determine number of processors | b5c8031c8f202c8140ee69c901c0e719a244aa77 | Joey Hess | 2009-07-10 14:51:46 |
update | ab46fb8018f45a5584485edfd3c0caa82f3fd9b4 | Joey Hess | 2009-07-10 14:51:43 |
Fix indentation | 2a323e50cf8b4b75b9cf1e258908819e6f59daa6 | Tollef Fog Heen | 2009-07-10 12:11:17 |
parallel: Argument validation | 4c46b498f7c42a037f4f00e54f8a6a0197a80c93 | Tollef Fog Heen | 2009-07-10 12:09:48 |
File | Lines added | Lines deleted |
---|---|---|
debian/changelog | 1 | 0 |
parallel.c | 11 | 3 |
File debian/changelog changed (mode: 100644) (index 4049ddd..3670373) | |||
1 | 1 | moreutils (0.39) UNRELEASED; urgency=low | moreutils (0.39) UNRELEASED; urgency=low |
2 | 2 | ||
3 | 3 | * Cap sillyness. Closes: #570815 | * Cap sillyness. Closes: #570815 |
4 | * parallel: Fix exit code handling when commands are specified after -- | ||
4 | 5 | ||
5 | 6 | -- Joey Hess <joeyh@debian.org> Sun, 21 Feb 2010 13:16:10 -0500 | -- Joey Hess <joeyh@debian.org> Sun, 21 Feb 2010 13:16:10 -0500 |
6 | 7 |
File parallel.c changed (mode: 100644) (index c78e830..94559ff) | |||
... | ... | void exec_child(char **command, char **arguments, int replace_cb, int nargs) { | |
70 | 70 | } | } |
71 | 71 | else { | else { |
72 | 72 | if (fork() == 0) { | if (fork() == 0) { |
73 | exit(system(arguments[0])); | ||
73 | int ret=system(arguments[0]); | ||
74 | if (WIFEXITED(ret)) { | ||
75 | exit(WEXITSTATUS(ret)); | ||
76 | } | ||
77 | else { | ||
78 | exit(1); | ||
79 | } | ||
74 | 80 | } | } |
75 | 81 | } | } |
76 | 82 | return; | return; |
... | ... | int wait_for_child(int options) { | |
82 | 88 | ||
83 | 89 | infop.si_pid = 0; | infop.si_pid = 0; |
84 | 90 | waitid(P_ALL, id_ignored, &infop, WEXITED | options); | waitid(P_ALL, id_ignored, &infop, WEXITED | options); |
85 | if (infop.si_pid == 0) | ||
91 | if (infop.si_pid == 0) { | ||
86 | 92 | return -1; /* Nothing to wait for */ | return -1; /* Nothing to wait for */ |
87 | if (infop.si_code == CLD_EXITED) | ||
93 | } | ||
94 | if (infop.si_code == CLD_EXITED) { | ||
88 | 95 | return infop.si_status; | return infop.si_status; |
96 | } | ||
89 | 97 | return 1; | return 1; |
90 | 98 | } | } |
91 | 99 |