Project

General

Profile

Feature #11536

File.mkfifo

Added by akr (Akira Tanaka) about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:<unknown>]

Description

I'd like to add File.mkfifo.

It is useful for tests.
FIFO is tricky: open() can block.
So it is troublesome and tests can prevent problems.

mkfifo() is defined POSIX.
Non-POSIX platform may not have it.
If we provide File.mkfifo, we can check the availability as File.respond_to? :mkfifo.
Current way, mkfifo command invocation, is difficult to determine the availability.
This availability checking eases test condition.
So this (non-implemented) method can be useful for non-POSIX platforms.

Several people requested File.mkfifo.
ruby-talk:92371, ruby-core:15675, ruby-list:49868

nobu and Hongli Lai implemented it: ruby-talk:91735 and ruby-core:15822

Associated revisions

Revision 92895155
Added by nobu (Nobuyoshi Nakada) about 4 years ago

file.c: File.mkfifo

  • file.c (rb_file_s_mkfifo): implement File.mkfifo. [Feature #11536]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 51897
Added by nobu (Nobuyoshi Nakada) about 4 years ago

file.c: File.mkfifo

  • file.c (rb_file_s_mkfifo): implement File.mkfifo. [Feature #11536]

Revision 51897
Added by nobu (Nobuyoshi Nakada) about 4 years ago

file.c: File.mkfifo

  • file.c (rb_file_s_mkfifo): implement File.mkfifo. [Feature #11536]

Revision 51897
Added by nobu (Nobuyoshi Nakada) about 4 years ago

file.c: File.mkfifo

  • file.c (rb_file_s_mkfifo): implement File.mkfifo. [Feature #11536]

Revision 51897
Added by nobu (Nobuyoshi Nakada) about 4 years ago

file.c: File.mkfifo

  • file.c (rb_file_s_mkfifo): implement File.mkfifo. [Feature #11536]

Revision 51897
Added by nobu (Nobuyoshi Nakada) about 4 years ago

file.c: File.mkfifo

  • file.c (rb_file_s_mkfifo): implement File.mkfifo. [Feature #11536]

History

#1

Updated by matz (Yukihiro Matsumoto) about 4 years ago

  • Assignee set to akr (Akira Tanaka)

Test seems reasonable use-case. Accepted.

Matz.

#3

Updated by nobu (Nobuyoshi Nakada) about 4 years ago

  • Status changed from Open to Closed

Applied in changeset r51897.


file.c: File.mkfifo

  • file.c (rb_file_s_mkfifo): implement File.mkfifo. [Feature #11536]

Also available in: Atom PDF