{"id":27025872,"url":"https://github.com/L-as/procex","last_synced_at":"2025-04-04T22:01:40.964Z","repository":{"id":102832222,"uuid":"386087397","full_name":"L-as/procex","owner":"L-as","description":"Ergonomic process launching with extreme flexibility and speed (compared to shh)","archived":false,"fork":false,"pushed_at":"2025-03-29T17:08:15.000Z","size":66,"stargazers_count":26,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-29T18:22:06.147Z","etag":null,"topics":["haskell","shell"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/L-as.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2021-07-14T22:05:28.000Z","updated_at":"2025-03-29T03:22:34.000Z","dependencies_parsed_at":"2023-03-09T03:15:40.696Z","dependency_job_id":null,"html_url":"https://github.com/L-as/procex","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/L-as%2Fprocex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/L-as%2Fprocex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/L-as%2Fprocex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/L-as%2Fprocex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/L-as","download_url":"https://codeload.github.com/L-as/procex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247256099,"owners_count":20909240,"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":["haskell","shell"],"created_at":"2025-04-04T22:01:24.612Z","updated_at":"2025-04-04T22:01:40.957Z","avatar_url":"https://github.com/L-as.png","language":"Haskell","funding_links":[],"categories":["Haskell"],"sub_categories":[],"readme":"[![Hackage](https://img.shields.io/hackage/v/procex.svg?style=flat)](https://hackage.haskell.org/package/procex)\n\n[Hackage documentation](https://hackage.haskell.org/package/procex/docs/)\n\n[My blog post about using it as a shell](https://las.rs/blog/haskell-as-shell.html) (see `example-shell` directory).\n\n# About\n\n`procex` is a library for launching unix processes, that DOES NOT wrap `createProcess`.\nIt interfaces directly with `vfork` and `execve`, and closes fds efficiently using the\nnew `close_range` Linux syscall (or `close` if not available).\nThe syntax for launching processes is clean, concise, and flexible, mimicking `sh`.\n\n# Differences from shh, turtle, etc.\n\n`procex` can:\n\n- `execve` without `fork`, i.e. replace the current process\n- Set fds besides 0, 1, and 2\n- Launch a process without taking \u003e0.5s when max fds is high\n- Launch processes with an invalid UTF-8 name\n- Be extended easily due to the flexible and simple API\n- Be used as a shell\n- not wrap Haskell functions in a `Cmd` like `shh`, because that is generally not a good solution\n\n# Example\n\n```hs\nimport Procex.Prelude\n\nmain :: IO ()\nmain = captureLazy (mq \"cat\" \u003c\u003c\u003c \"some stdin\") \u003e\u003e= \\stdout -\u003e putStrLn (show stdout)\n```\n\n\n# TODO\n\n- Setting the environment (workaround: use `env` from coreutils)\n- Better README\n- Support for non-Linux kernels\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FL-as%2Fprocex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FL-as%2Fprocex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FL-as%2Fprocex/lists"}