mkfifo 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ext/extconf.rb +2 -0
- data/ext/mkfifo.c +21 -0
- metadata +65 -0
data/ext/extconf.rb
ADDED
data/ext/mkfifo.c
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
#include <ruby/ruby.h>
|
2
|
+
#include <sys/stat.h>
|
3
|
+
|
4
|
+
VALUE rb_cFile_mkfifo(VALUE, VALUE);
|
5
|
+
|
6
|
+
void Init_mkfifo() {
|
7
|
+
rb_define_singleton_method(rb_cFile, "mkfifo", rb_cFile_mkfifo, 1);
|
8
|
+
}
|
9
|
+
|
10
|
+
VALUE
|
11
|
+
rb_cFile_mkfifo(VALUE self, VALUE name) {
|
12
|
+
if (rb_type(name) != T_STRING) {
|
13
|
+
rb_raise(rb_eArgError, "Argument must be a string");
|
14
|
+
}
|
15
|
+
|
16
|
+
if (mkfifo(RSTRING_PTR(name), S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP) < 0) {
|
17
|
+
rb_raise(rb_eException, "Cannot create named pipe");
|
18
|
+
}
|
19
|
+
|
20
|
+
return INT2FIX(1);
|
21
|
+
}
|
metadata
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mkfifo
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
version: 0.0.1
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- shura
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-09-15 00:00:00 +02:00
|
18
|
+
default_executable:
|
19
|
+
dependencies: []
|
20
|
+
|
21
|
+
description: ""
|
22
|
+
email: shura1991@gmail.com
|
23
|
+
executables: []
|
24
|
+
|
25
|
+
extensions:
|
26
|
+
- ext/extconf.rb
|
27
|
+
extra_rdoc_files: []
|
28
|
+
|
29
|
+
files:
|
30
|
+
- ext/extconf.rb
|
31
|
+
- ext/mkfifo.c
|
32
|
+
has_rdoc: true
|
33
|
+
homepage: http://github.com/shurizzle/ruby-mkfifo
|
34
|
+
licenses: []
|
35
|
+
|
36
|
+
post_install_message:
|
37
|
+
rdoc_options: []
|
38
|
+
|
39
|
+
require_paths:
|
40
|
+
- lib
|
41
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
segments:
|
47
|
+
- 0
|
48
|
+
version: "0"
|
49
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
segments:
|
55
|
+
- 0
|
56
|
+
version: "0"
|
57
|
+
requirements: []
|
58
|
+
|
59
|
+
rubyforge_project:
|
60
|
+
rubygems_version: 1.3.7
|
61
|
+
signing_key:
|
62
|
+
specification_version: 3
|
63
|
+
summary: ""
|
64
|
+
test_files: []
|
65
|
+
|