{"id":15033065,"url":"https://github.com/ruby/fcntl","last_synced_at":"2025-04-04T17:08:51.260Z","repository":{"id":19915690,"uuid":"88256938","full_name":"ruby/fcntl","owner":"ruby","description":"Loads constants defined in the OS fcntl.h C header file","archived":false,"fork":false,"pushed_at":"2025-02-17T11:07:59.000Z","size":99,"stargazers_count":6,"open_issues_count":2,"forks_count":12,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-03-28T16:09:25.620Z","etag":null,"topics":["fcntl","ruby"],"latest_commit_sha":null,"homepage":"","language":"C","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/ruby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-14T10:04:47.000Z","updated_at":"2025-02-17T11:08:01.000Z","dependencies_parsed_at":"2023-01-13T20:40:20.308Z","dependency_job_id":"b2d0d8c9-cd8c-459a-89a9-ca5270ac186e","html_url":"https://github.com/ruby/fcntl","commit_stats":{"total_commits":75,"total_committers":17,"mean_commits":4.411764705882353,"dds":0.5466666666666666,"last_synced_commit":"b946e505f12451dd0ddf8f8b0103f7ebcd41c637"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Ffcntl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Ffcntl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Ffcntl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Ffcntl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruby","download_url":"https://codeload.github.com/ruby/fcntl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247217184,"owners_count":20903009,"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":["fcntl","ruby"],"created_at":"2024-09-24T20:20:00.526Z","updated_at":"2025-04-04T17:08:51.231Z","avatar_url":"https://github.com/ruby.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fcntl\n\nFcntl loads the constants defined in the system's `\u003cfcntl.h\u003e` C header file, and used with both the fcntl(2) and open(2) POSIX system calls.\n\n * To perform a fcntl(2) operation, use IO::fcntl.\n * To perform an open(2) operation, use IO::sysopen.\n\nThe set of operations and constants available depends upon specific operating system.  Some values listed below may not be supported on your system.\n\nSee your fcntl(2) man page for complete details.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'fcntl'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install fcntl\n\n## Usage\n\nOpen `/tmp/tempfile` as a write-only file that is created if it doesn't\nexist:\n\n```ruby\nrequire 'fcntl'\n\nfd = IO.sysopen('/tmp/tempfile',\n                Fcntl::O_WRONLY | Fcntl::O_EXCL | Fcntl::O_CREAT)\nf = IO.open(fd)\nf.syswrite(\"TEMP DATA\")\nf.close\n```\n\nGet the flags on file `s`:\n\n```ruby\nm = s.fcntl(Fcntl::F_GETFL, 0)\n```\n\nSet the non-blocking flag on `f` in addition to the existing flags in `m`.\n\n```ruby\nf.fcntl(Fcntl::F_SETFL, Fcntl::O_NONBLOCK|m)\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/ruby/fcntl.\n\n\n## License\n\nThe gem is available as open source under the terms of the [2-Clause BSD License](https://opensource.org/licenses/BSD-2-Clause).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Ffcntl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruby%2Ffcntl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Ffcntl/lists"}