proc-wait3 1.7.1 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +8 -0
- data.tar.gz.sig +0 -0
- data/{CHANGES → CHANGES.md} +50 -19
- data/Gemfile +7 -0
- data/LICENSE +177 -0
- data/MANIFEST.md +18 -0
- data/README.md +53 -0
- data/Rakefile +18 -21
- data/certs/djberg96_pub.pem +26 -0
- data/doc/wait3.txt +2 -2
- data/ext/extconf.rb +13 -24
- data/ext/proc/wait3.c +20 -32
- data/lib/proc-wait3.rb +1 -0
- data/proc-wait3.gemspec +14 -6
- data/spec/proc_wait3_spec.rb +234 -0
- metadata +58 -26
- metadata.gz.sig +2 -0
- data/MANIFEST +0 -14
- data/README +0 -46
- data/test/test_proc_wait3.rb +0 -223
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 833ae8756453e432d042610abec187891cd8c53c9c03f942a247cc0f6488979b
|
4
|
+
data.tar.gz: 873ae57b81c82f55f9a34e975ae53eb71319d8c65fde352bfef7bd62f9000cb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2798ca928c06bd913b04665f7adcd02ac73f2d6d742e30c7d08e15a56c7a284e9cd2cc3b2cb9d8c923fa82d1297fbe30488de848504ffef0cd3dd9a776a6146a
|
7
|
+
data.tar.gz: 28976b3335794b2cf0bd0002dafa58c5d3b8eec326d52bd085c34afebc79f3fff838b3c2da12779089d008b037dd7b7ae56b2b2c0f0299e95eb34bb163ff88af
|
checksums.yaml.gz.sig
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
�)���If��u�F�~(���e�|mV����(�U��b���~��?�۶;^��5]����"ion�$QduP%~չ�o
|
2
|
+
/ 8|i�z2�+�c���#!�:��R����5r4C�k��ot(Q��?BD�xc�#�4�����lF�f�)�~ƕwغ)]�\�1s8�.���6���im�Y�Z#��Qޘ�� 4�G;G�����)y]�L@o�(���Gc�p�%
|
3
|
+
t|]�j��pfB;}^}�v��Q�`����S�_��凞=�����S*�ѕ�8:�
|
4
|
+
�
|
5
|
+
�5���_�������}��l�}�X�#���^
|
6
|
+
8�
|
7
|
+
K!
|
8
|
+
�9��a#q(p�Š�v�B]ڭ�N Ѡ]��_7f�汵��X�땍
|
data.tar.gz.sig
ADDED
Binary file
|
data/{CHANGES → CHANGES.md}
RENAMED
@@ -1,8 +1,39 @@
|
|
1
|
-
|
1
|
+
## 1.9.0 - 7-Jan-2021
|
2
|
+
* Switched from test-unit to rspec.
|
3
|
+
* Skip some tests on Darwin because of EINTR errors.
|
4
|
+
* Switched from rdoc to markdown since github isn't rendering rdoc properly.
|
5
|
+
* Added a Gemfile.
|
6
|
+
|
7
|
+
## 1.8.1 - 8-Apr-2020
|
8
|
+
* Added a LICENSE file to the distribution as required by the Apache-2.0 license.
|
9
|
+
* Add an explicit .rdoc extension to the README, CHANGES and MANIFEST files.
|
10
|
+
|
11
|
+
## 1.8.0 - 20-Feb-2019
|
12
|
+
* Changed license to Apache-2.0.
|
13
|
+
* Now requires Ruby 2.2 or later.
|
14
|
+
* Now checks for <bsd/string.h> header and include's it if found. This was
|
15
|
+
mainly to help silence some implicit declaration warnings on Linux.
|
16
|
+
* The WAIT3_VERSION constant is now frozen.
|
17
|
+
* Updated the cert, should be good for about 10 years.
|
18
|
+
* Added metadata to the gemspec.
|
19
|
+
* Removed some old macro checks/definitions that were no longer relevant.
|
20
|
+
* Added a proc-wait3.rb file for convenience.
|
21
|
+
|
22
|
+
## 1.7.3 - 21-Nov-2015
|
23
|
+
* Fixed a bug where tv_usec was divided by 1k instead of 1e6. Thanks go to
|
24
|
+
Jason Gladish for the spot.
|
25
|
+
* This gem is now signed.
|
26
|
+
* The gem related tasks in the Rakefile now assume Rubygems 2.x.
|
27
|
+
|
28
|
+
## 1.7.2 - 5-Sep-2014
|
29
|
+
* Added support for the RUSAGE_THREAD constant on Linux. Thanks go to
|
30
|
+
Bruno Michel for the patch.
|
31
|
+
|
32
|
+
## 1.7.1 - 24-Apr-2014
|
2
33
|
* Explicitly check for and include sys/resource.h because Debian. Thanks
|
3
34
|
go to Christos Trochalakis for the spot.
|
4
35
|
|
5
|
-
|
36
|
+
## 1.7.0 - 6-Apr-2014
|
6
37
|
* The wait3 and wait4 methods no longer set $? to a custom struct. The builtin
|
7
38
|
variable is still set, but if you need the custom Struct::ProcStat information
|
8
39
|
then use the $last_status global instead, or just use the return value. This
|
@@ -11,12 +42,12 @@
|
|
11
42
|
* Some build warning fixes for BSD platforms.
|
12
43
|
* Some test updates for BSD and Solaris.
|
13
44
|
|
14
|
-
|
45
|
+
## 1.6.0 - 28-Aug-2011
|
15
46
|
* Removed the getrlimit and setrlimit methods. Ruby has supported these methods
|
16
47
|
since Ruby 1.8.5, so I think it's time to finally dump them.
|
17
48
|
* Fixed two build warnings regarding unused variables and one 32/64 cast warning.
|
18
49
|
|
19
|
-
|
50
|
+
## 1.5.6 - 7-Jan-2010
|
20
51
|
* Checks are now made for the si_fd, si_utime, si_status and si_stime siginfo_t
|
21
52
|
struct members. This addresses build failures on OS X 10.5 and later where
|
22
53
|
those struct members went mysteriously MIA.
|
@@ -26,7 +57,7 @@
|
|
26
57
|
* Updates to the README.
|
27
58
|
* Source code moved to github.
|
28
59
|
|
29
|
-
|
60
|
+
## 1.5.5 - 8-Aug-2009
|
30
61
|
* Now compatible with Ruby 1.9.x.
|
31
62
|
* License changed to Artistic 2.0.
|
32
63
|
* Added test-unit 2.x as a development dependency.
|
@@ -37,7 +68,7 @@
|
|
37
68
|
* Example files renamed to avoid any confusion with actual test files.
|
38
69
|
* Several Rake tasks added to run individual example programs.
|
39
70
|
|
40
|
-
|
71
|
+
## 1.5.4 - 7-Feb-2008
|
41
72
|
* ALERT! ALERT! Now auto-patches your mkmf.rb file to add the 'have_const'
|
42
73
|
method if it's not already found. This is necessary to determine if certain
|
43
74
|
enum values exist on your system. Your original mkmf.rb is backed up first
|
@@ -48,7 +79,7 @@
|
|
48
79
|
* Fixed the extconf.rb file so that it sets the target directory properly.
|
49
80
|
* No source code changes (except for comment updates and a version bump).
|
50
81
|
|
51
|
-
|
82
|
+
## 1.5.3 - 25-Oct-2006
|
52
83
|
* Because not all platforms support automatically converting signal names
|
53
84
|
into their equivalent numbers, the Process.pause method now accepts names
|
54
85
|
or numbers. It will raise an ArgumentError if you try to use a signal name
|
@@ -61,7 +92,7 @@
|
|
61
92
|
* Internal fixes for platforms that don't support the strlcpy() function.
|
62
93
|
* Minor update for the test_pause.rb example program.
|
63
94
|
|
64
|
-
|
95
|
+
## 1.5.2 - 24-Jul-2006
|
65
96
|
* Fixed the way I was handling whether or not Ruby already defined the various
|
66
97
|
RLIMIT constants within wait3.c.
|
67
98
|
* Fixed the way in which certain RLIM constants were being converted. I
|
@@ -70,7 +101,7 @@
|
|
70
101
|
* Added the WAIT3_VERSION constant.
|
71
102
|
* The getrlimit and setrlimit tests are now skipped for Ruby 1.8.5 or later.
|
72
103
|
|
73
|
-
|
104
|
+
## 1.5.1 - 13-Jul-2006
|
74
105
|
* Fixed bugs with improper values being set for some of the rlimit constants.
|
75
106
|
* Cleaned up a few warnings related to signed-ness for the RLIM_xxx constants.
|
76
107
|
* Now only sets the various rlimit constants if they're not already defined
|
@@ -78,21 +109,21 @@
|
|
78
109
|
* Some internal cleanup.
|
79
110
|
* Created a gemspec and added a gem to RubyForge.
|
80
111
|
|
81
|
-
|
112
|
+
## 1.5.0 - 12-Jun-2006
|
82
113
|
* Removed the '?' character from the various struct members, since Ruby
|
83
114
|
no longer (properly) handles them.
|
84
115
|
* Fixed a 64 bit bug related to rb_struct_define.
|
85
116
|
* Added some more tests.
|
86
117
|
|
87
|
-
|
118
|
+
## 1.4.3 - 28-Jun-2005
|
88
119
|
* Added more #ifdef checks for some of the process flags which, it turns
|
89
120
|
out, are not defined in earlier versions of Linux.
|
90
121
|
|
91
|
-
|
122
|
+
## 1.4.2 - 14-Jun-2005
|
92
123
|
* Fixed a syntax error that could cause the build to fail.
|
93
124
|
* Removed some (but not all) possible warnings from gcc -Wall.
|
94
125
|
|
95
|
-
|
126
|
+
## 1.4.1 - 13-Jun-2005
|
96
127
|
* Added support for the Linux 2.6.9+ kernel (by adding more preprocessor
|
97
128
|
constant checks, which may help with other platforms as well).
|
98
129
|
* Moved project to RubyForge.
|
@@ -100,34 +131,34 @@
|
|
100
131
|
* Removed the wait3.rd file.
|
101
132
|
* Minor fix for the test_waitid.rb sample program.
|
102
133
|
|
103
|
-
|
134
|
+
## 1.4.0 - 16-Feb-2005
|
104
135
|
* Added the getrusage method.
|
105
136
|
* Added test cases and documentation for getrusage.
|
106
137
|
* Renamed a couple test files in the examples directory.
|
107
138
|
|
108
|
-
|
139
|
+
## 1.3.0 - 14-Feb-2005
|
109
140
|
* Added the pause and sigsend methods.
|
110
141
|
* I had to modify the process type constants to include the "P_", because
|
111
142
|
Ruby already has Process::GID and Process::UID defined. That makes this
|
112
143
|
release incompatible with previous versions.
|
113
144
|
* Updated tests and documentation.
|
114
145
|
|
115
|
-
|
146
|
+
## 1.2.0 - 7-Feb-2005
|
116
147
|
* Added the Proc.waitid method (for those platforms that support it).
|
117
148
|
* Made the wait3.c file more rdoc friendly.
|
118
149
|
* Added a test_waitid.rb file in the examples directory.
|
119
150
|
|
120
|
-
|
151
|
+
## 1.1.1 - 10-Jan-2005
|
121
152
|
* Eliminated some (harmless) warnings that cropped up in 1.8.2
|
122
153
|
* Moved the "examples" directory to the toplevel directory.
|
123
154
|
* Made docs slightly more rdoc friendly
|
124
155
|
|
125
|
-
|
156
|
+
## 1.1.0 - 14-Sep-2004
|
126
157
|
* Modified setup and source to handle the possibility that wait3() might
|
127
158
|
be defined while wait4() is not (e.g. HPUX).
|
128
159
|
* Modified the test scripts in the examples directory to play nice on HPUX
|
129
160
|
and Darwin.
|
130
161
|
* Added this file (oops).
|
131
162
|
|
132
|
-
|
163
|
+
## 1.0.0 - 13-Sep-2004
|
133
164
|
- Initial release
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,177 @@
|
|
1
|
+
|
2
|
+
Apache License
|
3
|
+
Version 2.0, January 2004
|
4
|
+
http://www.apache.org/licenses/
|
5
|
+
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7
|
+
|
8
|
+
1. Definitions.
|
9
|
+
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
12
|
+
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
14
|
+
the copyright owner that is granting the License.
|
15
|
+
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
17
|
+
other entities that control, are controlled by, or are under common
|
18
|
+
control with that entity. For the purposes of this definition,
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
20
|
+
direction or management of such entity, whether by contract or
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
23
|
+
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
25
|
+
exercising permissions granted by this License.
|
26
|
+
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
28
|
+
including but not limited to software source code, documentation
|
29
|
+
source, and configuration files.
|
30
|
+
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
32
|
+
transformation or translation of a Source form, including but
|
33
|
+
not limited to compiled object code, generated documentation,
|
34
|
+
and conversions to other media types.
|
35
|
+
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
37
|
+
Object form, made available under the License, as indicated by a
|
38
|
+
copyright notice that is included in or attached to the work
|
39
|
+
(an example is provided in the Appendix below).
|
40
|
+
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
47
|
+
the Work and Derivative Works thereof.
|
48
|
+
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
50
|
+
the original version of the Work and any modifications or additions
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
62
|
+
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
65
|
+
subsequently incorporated within the Work.
|
66
|
+
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
73
|
+
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79
|
+
where such license applies only to those patent claims licensable
|
80
|
+
by such Contributor that are necessarily infringed by their
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
83
|
+
institute patent litigation against any entity (including a
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
86
|
+
or contributory patent infringement, then any patent licenses
|
87
|
+
granted to You under this License for that Work shall terminate
|
88
|
+
as of the date such litigation is filed.
|
89
|
+
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
92
|
+
modifications, and in Source or Object form, provided that You
|
93
|
+
meet the following conditions:
|
94
|
+
|
95
|
+
(a) You must give any other recipients of the Work or
|
96
|
+
Derivative Works a copy of this License; and
|
97
|
+
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
99
|
+
stating that You changed the files; and
|
100
|
+
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
103
|
+
attribution notices from the Source form of the Work,
|
104
|
+
excluding those notices that do not pertain to any part of
|
105
|
+
the Derivative Works; and
|
106
|
+
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
109
|
+
include a readable copy of the attribution notices contained
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
112
|
+
of the following places: within a NOTICE text file distributed
|
113
|
+
as part of the Derivative Works; within the Source form or
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
115
|
+
within a display generated by the Derivative Works, if and
|
116
|
+
wherever such third-party notices normally appear. The contents
|
117
|
+
of the NOTICE file are for informational purposes only and
|
118
|
+
do not modify the License. You may add Your own attribution
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
121
|
+
that such additional attribution notices cannot be construed
|
122
|
+
as modifying the License.
|
123
|
+
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
125
|
+
may provide additional or different license terms and conditions
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
129
|
+
the conditions stated in this License.
|
130
|
+
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
134
|
+
this License, without any additional terms or conditions.
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
136
|
+
the terms of any separate license agreement you may have executed
|
137
|
+
with Licensor regarding such Contributions.
|
138
|
+
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
141
|
+
except as required for reasonable and customary use in describing the
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
143
|
+
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
153
|
+
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
159
|
+
incidental, or consequential damages of any character arising as a
|
160
|
+
result of this License or out of the use or inability to use the
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
163
|
+
other commercial damages or losses), even if such Contributor
|
164
|
+
has been advised of the possibility of such damages.
|
165
|
+
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
169
|
+
or other liability obligations and/or rights consistent with this
|
170
|
+
License. However, in accepting such obligations, You may act only
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
175
|
+
of your accepting any such warranty or additional liability.
|
176
|
+
|
177
|
+
END OF TERMS AND CONDITIONS
|
data/MANIFEST.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
* CHANGES.md
|
2
|
+
* Gemfile
|
3
|
+
* LICENSE
|
4
|
+
* MANIFEST.md
|
5
|
+
* Rakefile
|
6
|
+
* README.md
|
7
|
+
* proc-wait3.gemspec
|
8
|
+
* certs/djberg96_pub.pem
|
9
|
+
* doc/wait3.txt
|
10
|
+
* ext/extconf.rb
|
11
|
+
* ext/proc/wait3.c
|
12
|
+
* examples/example_getrusage.rb
|
13
|
+
* examples/example_pause.rb
|
14
|
+
* examples/example_wait3.rb
|
15
|
+
* examples/example_wait4.rb
|
16
|
+
* examples/example_waitid.rb
|
17
|
+
* lib/proc-wait3.rb
|
18
|
+
* test/test_proc_wait3.rb
|
data/README.md
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
## Description
|
2
|
+
Adds the wait3, wait4, waitid, pause, sigsend, and getrusage methods to the Process module.
|
3
|
+
|
4
|
+
## Installation
|
5
|
+
`gem install proc-wait3`
|
6
|
+
|
7
|
+
## Synopsis
|
8
|
+
```ruby
|
9
|
+
require 'proc/wait3'
|
10
|
+
|
11
|
+
pid = fork{
|
12
|
+
sleep 1
|
13
|
+
exit 2
|
14
|
+
}
|
15
|
+
|
16
|
+
puts Time.now.to_s
|
17
|
+
Process.wait3
|
18
|
+
puts $?.exitstatus # => 2
|
19
|
+
```
|
20
|
+
|
21
|
+
## Tested Platforms
|
22
|
+
* Solaris
|
23
|
+
* Linux
|
24
|
+
* FreeBSD
|
25
|
+
* OS X
|
26
|
+
|
27
|
+
## Warnings
|
28
|
+
Linux users who compile with gcc -Wall will notice a few warnings. These
|
29
|
+
are harmless (and unavoidable atm).
|
30
|
+
|
31
|
+
Linux users may also notice warnings about implicit declarations. These
|
32
|
+
are also harmless, and can be silenced by installing the libbsd-dev package
|
33
|
+
first.
|
34
|
+
|
35
|
+
On Darwin these methods will likely fail with Errno::EINTR unless you pass
|
36
|
+
the WNOHANG flag. I am not sure why, I can only speculate that the child is
|
37
|
+
receiving a signal from either the Ruby interpreter or the operating system.
|
38
|
+
|
39
|
+
## Integration with Ruby's process.c
|
40
|
+
I considered simply providing a patch to the core process.c file, but I
|
41
|
+
decided against it for two reasons. First, I wanted to get something
|
42
|
+
out more quickly rather than waiting for approval from the core developers
|
43
|
+
who, based on an earlier post, seem somewhat gun-shy about integrating support
|
44
|
+
for wait3() and wait4() based, I think, on portability concerns.
|
45
|
+
|
46
|
+
Second, and more importantly, I don't like the cProcStatus class. The
|
47
|
+
extra inspection code seems like an awful lot of work for very little gain.
|
48
|
+
The overloaded methods are also overkill, and do nothing but save me the
|
49
|
+
trouble of typing the word "status", since all they're for is comparing or
|
50
|
+
operating on the status attribute.
|
51
|
+
|
52
|
+
## Additional Documentation
|
53
|
+
Please see the doc/wait3.txt file for detailed documentation.
|