{"id":15557916,"url":"https://github.com/fgasper/p5-sys-pipe","last_synced_at":"2025-03-29T03:46:44.748Z","repository":{"id":56838979,"uuid":"273815594","full_name":"FGasper/p5-Sys-Pipe","owner":"FGasper","description":"CPAN’s Sys::Pipe","archived":false,"fork":false,"pushed_at":"2020-06-23T12:26:52.000Z","size":85,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-03T13:45:22.842Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FGasper.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-21T01:50:09.000Z","updated_at":"2020-06-23T12:26:54.000Z","dependencies_parsed_at":"2022-08-29T02:52:06.558Z","dependency_job_id":null,"html_url":"https://github.com/FGasper/p5-Sys-Pipe","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FGasper%2Fp5-Sys-Pipe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FGasper%2Fp5-Sys-Pipe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FGasper%2Fp5-Sys-Pipe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FGasper%2Fp5-Sys-Pipe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FGasper","download_url":"https://codeload.github.com/FGasper/p5-Sys-Pipe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246135739,"owners_count":20729056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T15:21:14.471Z","updated_at":"2025-03-29T03:46:44.723Z","avatar_url":"https://github.com/FGasper.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nSys::Pipe - `pipe2()` in Perl\n\n# SYNOPSIS\n\n    use Fcntl;\n    use Sys::Pipe;\n\n    Sys::Pipe::pipe( my $r, my $w, O_NONBLOCK ) or die \"pipe: $!\";\n\n# DESCRIPTION\n\nEver wish you could create a pipe that starts out non-blocking?\nLinux and a number of other OSes can do this via a proprietary `pipe2()`\nsystem call; this little library exposes that functionality to Perl.\n\n# WHEN IS THIS USEFUL?\n\nAs shown above, this exposes the ability to create a pipe that starts\nout non-blocking. If that’s all you need, then the gain here is mostly just\ntidiness. It _is_ also faster than doing:\n\n    pipe my $r, my $w or die \"pipe: $!\";\n    $r-\u003eblocking(0);\n    $w-\u003eblocking(0);\n\n… but the above is already quite fast, so that may not make a real-world\ndifference for you.\n\nIn Linux, this also exposes the ability to create a “packet mode” pipe.\nOther OSes may allow similar and/or other functionality. See your\nsystem’s [pipe2(2)](http://man.he.net/man2/pipe2) for more details.\n\n# STATUS\n\nThis module is best considered **EXPERIMENTAL**. If you find a problem,\nplease file a bug report. Thank you!\n\n# SEE ALSO\n\nPerl’s [socket()](https://metacpan.org/pod/perlfunc#socket-SOCKET-DOMAIN-TYPE-PROTOCOL)\nbuilt-in allows similar functionality on the relevant OSes, e.g.:\n\n    use Socket;\n\n    socket( my $s, AF_INET, SOCK_STREAM | SOCK_NONBLOCK, 0 ) or do {\n        die \"socket(): $!\";\n    };\n\n# FUNCTIONS\n\n## $success\\_yn = pipe( READHANDLE, WRITEHANDLE \\[, FLAGS\\] )\n\nA drop-in replacement for Perl’s `pipe()` built-in that optionally\naccepts a numeric _FLAGS_ argument. See your system’s [pipe2(2)](http://man.he.net/man2/pipe2)\ndocumentation for what values you can pass in there.\n\nNote that behavior is currently **undefined** if _FLAGS_ is nonzero on\nany system (e.g., macOS) that lacks `pipe2()`. (As of this writing an\nexception is thrown; that may change eventually.)\n\n## $yn = has\\_pipe2()\n\nReturns a boolean that indicates whether the underlying system can\nimplement `pipe2()` mechanics.\n\n# COPYRIGHT\n\nCopyright 2020 Gasper Software Consulting. All rights reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgasper%2Fp5-sys-pipe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffgasper%2Fp5-sys-pipe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgasper%2Fp5-sys-pipe/lists"}