{"id":18573019,"url":"https://github.com/buganini/rcexecr","last_synced_at":"2025-05-15T23:12:13.466Z","repository":{"id":66771625,"uuid":"1830402","full_name":"buganini/rcexecr","owner":"buganini","description":"Parallel rc.d scripts executer for FreeBSD","archived":false,"fork":false,"pushed_at":"2012-12-23T14:10:21.000Z","size":179,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-17T14:44:38.678Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/buganini.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-06-01T06:49:29.000Z","updated_at":"2019-01-31T10:36:44.000Z","dependencies_parsed_at":"2023-02-20T11:15:40.584Z","dependency_job_id":null,"html_url":"https://github.com/buganini/rcexecr","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/buganini%2Frcexecr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buganini%2Frcexecr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buganini%2Frcexecr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buganini%2Frcexecr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buganini","download_url":"https://codeload.github.com/buganini/rcexecr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254436951,"owners_count":22070949,"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-11-06T23:07:53.550Z","updated_at":"2025-05-15T23:12:13.381Z","avatar_url":"https://github.com/buganini.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"rcexecr is modified from rcorder(8) from freebsd(/netbsd)\n\nIt aims to do things that rcorder and part of /etc/rc do in parallel.\n\nTest with modification on /etc:\n\t#install\n\tcd /usr/src/sbin/\n\tgit clone git://github.com/buganini/rcexecr.git\n\tcd rcexecr\n\tsudo make all install\n\n\t#patch /etc\n\tcd /etc/\n\tpatch -p1 \u003c /usr/src/sbin/rcexecr/etc.patch.txt\n\n\t#enable parallel execution\n\techo rcexecr_parallel=\"YES\" \u003e\u003e /etc/rc.conf\n\n\t#reboot\n\tshutdown -r now\n\nTest without affecting system:\n\tcd /usr/src/sbin/\n\tgit clone git://github.com/buganini/rcexecr.git\n\tcd rcexecr\n\tsudo make\n\n\tenv ARG0=\\? ARG1=start./rcexecr /etc/rc.d/*\n\tenv ARG0=\\? ARG1=stop ./rcexecr -r /etc/rc.d/*\n\n\t#add -x to actually execute\n\tenv ARG0=\\? ./rcexecr -x testcase/rc.d/*\n\n\t#test self modification\n\tchmod -R 755 testcase/\n\tenv ARG0=\\? ./rcexecr -x testcase/rc.d/*\n\nProgress:\n\tbeg/end calculation: done\n\tfork/exec/waitpid/-x(execute, or dry print): done\n\t-r(reverse, for /etc/rc.shutdown): done\n\tself modification: done\n\tpatch for /etc: done\n\tupdate document: partial\n\nConcept:\n\tbeg/end: the proper timing to launch script / wait it finished.\n\tWhen a node's requirement is satisfied, it would be launched by fork()+exec().\n\tWhen a node is required to be done, it would be waited for by waitpid().\n\n\tthe whole schedule is reversed with -r.\n\n\tCircular dependency detecting:\n\t\tsee https://github.com/buganini/rcexecr/commit/8460c6006dd041fe4920047ee80c3bd19896f493\n\n\tSelf modification:\n\t\tconsider the dependencies as a graph, the files as nodes,\n\t\twhen subprocess exec(rcexecr), the node take whole graph as input,\n\t\tand regenerate it with adding new node.\n\t\tapproach:\n\t\t\tif (getenv(\"RCEXECR\")!=NULL) {\n\t\t\t\t//send new items to the nexus by writing to pipe.\n\t\t\t\texit(0);\n\t\t\t} else {\n\t\t\t\tsetenv(\"RCEXECR\", pipe-fd);\n\t\t\t}\n\t\t\tafter receiving new items, call regenerate(),\n\t\t\twhich exit() directly.\n\nTodo:\n\tzombieskiller (but this need another mapping and lookup)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuganini%2Frcexecr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuganini%2Frcexecr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuganini%2Frcexecr/lists"}