{"id":13830686,"url":"https://github.com/sharvil/flingfd","last_synced_at":"2025-04-25T00:32:50.268Z","repository":{"id":12683143,"uuid":"15355280","full_name":"sharvil/flingfd","owner":"sharvil","description":"A tiny library to send file descriptors across processes","archived":false,"fork":false,"pushed_at":"2017-11-25T18:38:40.000Z","size":8,"stargazers_count":168,"open_issues_count":2,"forks_count":15,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-03T13:44:12.404Z","etag":null,"topics":["c","descriptor","file","linux"],"latest_commit_sha":null,"homepage":null,"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/sharvil.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2013-12-21T07:09:47.000Z","updated_at":"2025-02-18T22:17:14.000Z","dependencies_parsed_at":"2022-07-21T12:48:15.486Z","dependency_job_id":null,"html_url":"https://github.com/sharvil/flingfd","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/sharvil%2Fflingfd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharvil%2Fflingfd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharvil%2Fflingfd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharvil%2Fflingfd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sharvil","download_url":"https://codeload.github.com/sharvil/flingfd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250733557,"owners_count":21478390,"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":["c","descriptor","file","linux"],"created_at":"2024-08-04T10:01:05.725Z","updated_at":"2025-04-25T00:32:50.041Z","avatar_url":"https://github.com/sharvil.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# flingfd\nflingfd is a small, standalone C library to pass file descriptors across processes on Linux.\n\n## Installation\nBy default, flingfd installs in `/usr/local`. If you want to change where it gets installed, edit the `PREFIX` in the Makefile.\n\n```\n  $ make \u0026\u0026 sudo make install\n```\n\n## Documentation\nThe library consists of two functions declared in `flingfd.h`:\n```c\n  bool flingfd_simple_send(const char *path, int fd);\n  int flingfd_simple_recv(const char *path);\n```\n\nWhen you want to send a file descriptor, call `flingfd_simple_send` and receive it in the other process with `flingfd_simple_recv`. Make sure you use the same `path` argument in both processes -- that determines which process gets the file descriptor.\n\nHere's an example of sending `stdout` to another process:\n```c\n  #include \u003cflingfd.h\u003e\n\n  void send_my_stdout() {\n    int fd = fileno(stdout);\n    flingfd_simple_send(\"/tmp/some_unique_path\", fd);\n  }\n```\n\nAnd here's the other process writing to the sender's `stdout`:\n```c\n  #include \u003cflingfd.h\u003e\n\n  void write_to_their_stdout() {\n    int fd = flingfd_simple_recv(\"/tmp/some_unique_path\");\n    write(fd, \"Hello world\\n\", 12);\n  }\n```\n\nWhen you're done writing your code, link against the library with `-lflingfd`.\n\n## Bindings\n\n* Python - https://github.com/soulseekah/pyflingfd\n\n## License\nApache 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharvil%2Fflingfd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharvil%2Fflingfd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharvil%2Fflingfd/lists"}