sinit, branch HEAD suckless init 28c44b6b94a870f2942c37f9cfbae8b770595712 2018-03-26T16:48:09Z 2018-03-26T16:48:09Z Bump to 1.1 sin sin@2f30.org commit 28c44b6b94a870f2942c37f9cfbae8b770595712 parent 170d599d58efee6c9be675a85c6e435d68e8a2de Author: sin <sin@2f30.org> Date: Mon, 26 Mar 2018 17:48:09 +0100 Bump to 1.1 170d599d58efee6c9be675a85c6e435d68e8a2de 2018-03-18T13:35:38Z 2018-03-18T13:43:25Z Ensure children are reaped periodically sin sin@2f30.org commit 170d599d58efee6c9be675a85c6e435d68e8a2de parent 731f65fc82afcd474f4c682f9f0069e5c80c86dd Author: sin <sin@2f30.org> Date: Sun, 18 Mar 2018 13:35:38 +0000 Ensure children are reaped periodically There is a pathological case where a parent receives SIGCHLD after its child dies but does not reap it. After the parent dies, the child is reparented to init but SIGCHLD is not redelivered. To fix this, periodically check if there are zombies pending to be reaped. 731f65fc82afcd474f4c682f9f0069e5c80c86dd 2016-09-23T07:37:59Z 2016-09-23T08:33:22Z Use switch for fork() FRIGN dev@frign.de commit 731f65fc82afcd474f4c682f9f0069e5c80c86dd parent 40a9fd323646b680a4eb046076c606339fd7501e Author: FRIGN <dev@frign.de> Date: Fri, 23 Sep 2016 09:37:59 +0200 Use switch for fork() This saves us one local variable and 2 lines of code, while improving readability by using the switch-style we are used to from other suckless projects. We are allowed to check against -1, as POSIX clearly mandates for the RETURN VALUE: "Upon successful completion, fork() shall return 0 to the child process and shall return the process ID of the child process to the parent process. Both processes shall continue to execute from the fork() function. Otherwise, -1 shall be returned to the parent process, no child process shall be created, and errno shall be set to indicate the error." [http://pubs.opengroup.org/onlinepubs/9699919799/functions/fork.html] This way, checking against < 0 was overdoing it and it's sufficient to compare against -1, justifying the switch statement here. 40a9fd323646b680a4eb046076c606339fd7501e 2015-07-12T19:24:19Z 2015-07-12T20:13:46Z config.def.h: align rc*cmd Ypnose linuxien@legtux.org commit 40a9fd323646b680a4eb046076c606339fd7501e parent 164d628c5cbe96fd67fe05a835016299eb3dd0fe Author: Ypnose <linuxien@legtux.org> Date: Sun, 12 Jul 2015 21:24:19 +0200 config.def.h: align rc*cmd 164d628c5cbe96fd67fe05a835016299eb3dd0fe 2015-06-16T09:37:07Z 2015-06-16T09:37:07Z Put sinit out of its misery and bump it up to 1.0 sin sin@2f30.org commit 164d628c5cbe96fd67fe05a835016299eb3dd0fe parent 15a22edf7c1f2e5b7ac0863f6e20b474a14d9de8 Author: sin <sin@2f30.org> Date: Tue, 16 Jun 2015 10:37:07 +0100 Put sinit out of its misery and bump it up to 1.0 15a22edf7c1f2e5b7ac0863f6e20b474a14d9de8 2015-02-18T17:55:27Z 2015-02-18T17:56:17Z Prefix signal handlers with 'sig' sin sin@2f30.org commit 15a22edf7c1f2e5b7ac0863f6e20b474a14d9de8 parent 634d0168a6ea43e3c337d36e0526f39f9002daa1 Author: sin <sin@2f30.org> Date: Wed, 18 Feb 2015 17:55:27 +0000 Prefix signal handlers with 'sig' Apparently reboot() is an existing symbol on some BSD systems. 634d0168a6ea43e3c337d36e0526f39f9002daa1 2015-02-03T17:44:32Z 2015-02-03T17:44:53Z Update LICENSE year sin sin@2f30.org commit 634d0168a6ea43e3c337d36e0526f39f9002daa1 parent 71f9a7717b3ca29ecbd5a32312eedbf20eeba1b5 Author: sin <sin@2f30.org> Date: Tue, 3 Feb 2015 17:44:32 +0000 Update LICENSE year 71f9a7717b3ca29ecbd5a32312eedbf20eeba1b5 2015-02-01T21:00:30Z 2015-02-01T21:01:49Z Fix some mandoc lint warnings sin sin@2f30.org commit 71f9a7717b3ca29ecbd5a32312eedbf20eeba1b5 parent 73428b2daf892400348c71bfeda6c3092db91738 Author: sin <sin@2f30.org> Date: Sun, 1 Feb 2015 21:00:30 +0000 Fix some mandoc lint warnings 73428b2daf892400348c71bfeda6c3092db91738 2014-12-04T15:03:45Z 2014-12-04T15:03:45Z Style fix sin sin@2f30.org commit 73428b2daf892400348c71bfeda6c3092db91738 parent 20bae3a21d90690fa32355a91d7833ba743a96cd Author: sin <sin@2f30.org> Date: Thu, 4 Dec 2014 15:03:45 +0000 Style fix 20bae3a21d90690fa32355a91d7833ba743a96cd 2014-12-04T14:56:01Z 2014-12-04T14:56:01Z Don't use EXIT_{SUCCESS,FAILURE} sin sin@2f30.org commit 20bae3a21d90690fa32355a91d7833ba743a96cd parent c714a445f7b016b17f371e3eb6d90eb5d8076622 Author: sin <sin@2f30.org> Date: Thu, 4 Dec 2014 14:56:01 +0000 Don't use EXIT_{SUCCESS,FAILURE} c714a445f7b016b17f371e3eb6d90eb5d8076622 2014-12-04T14:30:39Z 2014-12-04T14:30:39Z Just use $(OBJ) instead of hardcoded sinit.o sin sin@2f30.org commit c714a445f7b016b17f371e3eb6d90eb5d8076622 parent 3667ce42b2a72721be800281065c5a81405f02db Author: sin <sin@2f30.org> Date: Thu, 4 Dec 2014 14:30:39 +0000 Just use $(OBJ) instead of hardcoded sinit.o 3667ce42b2a72721be800281065c5a81405f02db 2014-12-04T14:21:51Z 2014-12-04T14:21:51Z Bump up to 0.9.2 sin sin@2f30.org commit 3667ce42b2a72721be800281065c5a81405f02db parent a43027d58ad1085a5a7315b747cf13f64002ffeb Author: sin <sin@2f30.org> Date: Thu, 4 Dec 2014 14:21:51 +0000 Bump up to 0.9.2 a43027d58ad1085a5a7315b747cf13f64002ffeb 2014-12-04T14:19:01Z 2014-12-04T14:21:04Z Update LICENSE sin sin@2f30.org commit a43027d58ad1085a5a7315b747cf13f64002ffeb parent fd8710d8a5f90ea3677b2f9afe3138be94f7b38e Author: sin <sin@2f30.org> Date: Thu, 4 Dec 2014 14:19:01 +0000 Update LICENSE fd8710d8a5f90ea3677b2f9afe3138be94f7b38e 2014-12-04T14:18:36Z 2014-12-04T14:20:58Z Simplify Makefile sin sin@2f30.org commit fd8710d8a5f90ea3677b2f9afe3138be94f7b38e parent f8536ea0d905993652caf1950d6aae1fca881e0f Author: sin <sin@2f30.org> Date: Thu, 4 Dec 2014 14:18:36 +0000 Simplify Makefile f8536ea0d905993652caf1950d6aae1fca881e0f 2014-12-04T14:07:35Z 2014-12-04T14:09:32Z Update manpage sin sin@2f30.org commit f8536ea0d905993652caf1950d6aae1fca881e0f parent b15e98850f0fd136a7e370c9287faace4ed97825 Author: sin <sin@2f30.org> Date: Thu, 4 Dec 2014 14:07:35 +0000 Update manpage b15e98850f0fd136a7e370c9287faace4ed97825 2014-08-18T19:12:36Z 2014-08-18T19:13:04Z Update link to initscripts sin sin@2f30.org commit b15e98850f0fd136a7e370c9287faace4ed97825 parent fd3f3ff9ee28e5f9e1b34beb2f2b8a8d79cbedca Author: sin <sin@2f30.org> Date: Mon, 18 Aug 2014 20:12:36 +0100 Update link to initscripts fd3f3ff9ee28e5f9e1b34beb2f2b8a8d79cbedca 2014-08-17T21:17:07Z 2014-08-17T21:33:18Z Remove -Wno-unused-result and add -s sin sin@2f30.org commit fd3f3ff9ee28e5f9e1b34beb2f2b8a8d79cbedca parent 542049d495c3b7605915bdd5151a3e0fcc5c7999 Author: sin <sin@2f30.org> Date: Sun, 17 Aug 2014 22:17:07 +0100 Remove -Wno-unused-result and add -s 542049d495c3b7605915bdd5151a3e0fcc5c7999 2014-08-16T17:02:52Z 2014-08-16T17:03:56Z Reword sinit manpage - clarify confusion around utmp entries. sin sin@2f30.org commit 542049d495c3b7605915bdd5151a3e0fcc5c7999 parent f9f979a48e63429e104390c56a95815263b8f44a Author: sin <sin@2f30.org> Date: Sat, 16 Aug 2014 18:02:52 +0100 Reword sinit manpage - clarify confusion around utmp entries. f9f979a48e63429e104390c56a95815263b8f44a 2014-08-05T17:53:49Z 2014-08-05T17:55:37Z Bump up to 0.9.1 sin sin@2f30.org commit f9f979a48e63429e104390c56a95815263b8f44a parent 2667955762d224c9fac50f173e7324e5edcfbe05 Author: sin <sin@2f30.org> Date: Tue, 5 Aug 2014 18:53:49 +0100 Bump up to 0.9.1 2667955762d224c9fac50f173e7324e5edcfbe05 2014-07-26T15:44:43Z 2014-07-26T15:45:48Z Re-order includes sin sin@2f30.org commit 2667955762d224c9fac50f173e7324e5edcfbe05 parent 07c5067cfc395a161da433cd6249b95eb8fe58c5 Author: sin <sin@2f30.org> Date: Sat, 26 Jul 2014 16:44:43 +0100 Re-order includes 07c5067cfc395a161da433cd6249b95eb8fe58c5 2014-04-23T10:25:46Z 2014-04-23T10:29:34Z Mention /bin/rc.init in the manpage sin sin@2f30.org commit 07c5067cfc395a161da433cd6249b95eb8fe58c5 parent bd089dd5b18cd472c10f554a46c163e3b51a58a2 Author: sin <sin@2f30.org> Date: Wed, 23 Apr 2014 11:25:46 +0100 Mention /bin/rc.init in the manpage bd089dd5b18cd472c10f554a46c163e3b51a58a2 2014-04-22T11:42:59Z 2014-04-23T09:52:14Z Add sinit.8 manpage sin sin@2f30.org commit bd089dd5b18cd472c10f554a46c163e3b51a58a2 parent 76309c5e61defc04b88254111a764e849fa8ee71 Author: sin <sin@2f30.org> Date: Tue, 22 Apr 2014 12:42:59 +0100 Add sinit.8 manpage 76309c5e61defc04b88254111a764e849fa8ee71 2014-04-22T10:53:58Z 2014-04-23T09:04:27Z Add dist target to Makefile sin sin@2f30.org commit 76309c5e61defc04b88254111a764e849fa8ee71 parent b1b19ccf2786b06cbbe7a7986a08324f685ca036 Author: sin <sin@2f30.org> Date: Tue, 22 Apr 2014 11:53:58 +0100 Add dist target to Makefile b1b19ccf2786b06cbbe7a7986a08324f685ca036 2014-04-21T09:27:49Z 2014-04-21T09:38:21Z Break on first signal found sin sin@2f30.org commit b1b19ccf2786b06cbbe7a7986a08324f685ca036 parent d1bb8b1a30f059724da20185d17a9565088c322a Author: sin <sin@2f30.org> Date: Mon, 21 Apr 2014 10:27:49 +0100 Break on first signal found d1bb8b1a30f059724da20185d17a9565088c322a 2014-04-19T09:25:18Z 2014-04-19T09:28:09Z setpgid(0, 0) seems redundant after setsid() sin sin@2f30.org commit d1bb8b1a30f059724da20185d17a9565088c322a parent e4a4117b3e895e28ff99e30526f229e55aa57d0d Author: sin <sin@2f30.org> Date: Sat, 19 Apr 2014 10:25:18 +0100 setpgid(0, 0) seems redundant after setsid() e4a4117b3e895e28ff99e30526f229e55aa57d0d 2014-04-16T09:30:03Z 2014-04-16T09:30:03Z Bump up to v0.9 - should be the final release sin sin@2f30.org commit e4a4117b3e895e28ff99e30526f229e55aa57d0d parent 4c0a1d87a4d611711896c6fa45978c66cc25d3f3 Author: sin <sin@2f30.org> Date: Wed, 16 Apr 2014 10:30:03 +0100 Bump up to v0.9 - should be the final release 4c0a1d87a4d611711896c6fa45978c66cc25d3f3 2014-04-09T21:01:30Z 2014-04-09T21:01:56Z Be less hardcore and don't use -Werror sin sin@2f30.org commit 4c0a1d87a4d611711896c6fa45978c66cc25d3f3 parent 7a2bb2cc6b306ca39e787175027814b23a4ac99a Author: sin <sin@2f30.org> Date: Wed, 9 Apr 2014 22:01:30 +0100 Be less hardcore and don't use -Werror Use -Wno-unused-result as the compiler produces false positives. 7a2bb2cc6b306ca39e787175027814b23a4ac99a 2014-03-27T10:22:28Z 2014-03-27T10:22:28Z Fix vertical indentation sin sin@2f30.org commit 7a2bb2cc6b306ca39e787175027814b23a4ac99a parent 8a9ac0ea3c6ecddfef6e914122b3bb20cb37523c Author: sin <sin@2f30.org> Date: Thu, 27 Mar 2014 10:22:28 +0000 Fix vertical indentation 8a9ac0ea3c6ecddfef6e914122b3bb20cb37523c 2014-03-27T10:20:08Z 2014-03-27T10:20:08Z Just block all signals sin sin@2f30.org commit 8a9ac0ea3c6ecddfef6e914122b3bb20cb37523c parent d8ba71dec434728e80bd04a7d5d820bd1e82c58c Author: sin <sin@2f30.org> Date: Thu, 27 Mar 2014 10:20:08 +0000 Just block all signals d8ba71dec434728e80bd04a7d5d820bd1e82c58c 2014-03-08T17:48:24Z 2014-03-08T17:48:24Z Bump up version to v0.8 sin sin@2f30.org commit d8ba71dec434728e80bd04a7d5d820bd1e82c58c parent 41841eabd5116c1e045c2023900c7ce7850a2480 Author: sin <sin@2f30.org> Date: Sat, 8 Mar 2014 17:48:24 +0000 Bump up version to v0.8 41841eabd5116c1e045c2023900c7ce7850a2480 2014-03-08T17:16:44Z 2014-03-08T17:16:44Z Remove util/ sin sin@2f30.org commit 41841eabd5116c1e045c2023900c7ce7850a2480 parent 27326b71197a4f73e422f388d5aa3d1b3ea24bac Author: sin <sin@2f30.org> Date: Sat, 8 Mar 2014 17:16:44 +0000 Remove util/ 27326b71197a4f73e422f388d5aa3d1b3ea24bac 2014-03-08T16:48:28Z 2014-03-08T16:49:07Z Mark venprintf() as static explicitly, not just in the decl sin sin@2f30.org commit 27326b71197a4f73e422f388d5aa3d1b3ea24bac parent a7b6c6f0751fb34e6b8ed344de0af6dbf42fdb5d Author: sin <sin@2f30.org> Date: Sat, 8 Mar 2014 16:48:28 +0000 Mark venprintf() as static explicitly, not just in the decl a7b6c6f0751fb34e6b8ed344de0af6dbf42fdb5d 2014-02-27T15:29:16Z 2014-02-27T15:29:16Z Don't assume that $(DESTDIR)$(PREFIX)/bin exists sin sin@2f30.org commit a7b6c6f0751fb34e6b8ed344de0af6dbf42fdb5d parent 3a953eac00727baf7a5e3f3194257daa9529df37 Author: sin <sin@2f30.org> Date: Thu, 27 Feb 2014 15:29:16 +0000 Don't assume that $(DESTDIR)$(PREFIX)/bin exists 3a953eac00727baf7a5e3f3194257daa9529df37 2014-02-16T20:16:42Z 2014-02-16T20:16:42Z No need to setsid() early sin sin@2f30.org commit 3a953eac00727baf7a5e3f3194257daa9529df37 parent 77e8aa520d8be2ebbebbcba2a08e245cfd0ae758 Author: sin <sin@2f30.org> Date: Sun, 16 Feb 2014 20:16:42 +0000 No need to setsid() early 77e8aa520d8be2ebbebbcba2a08e245cfd0ae758 2014-02-12T13:50:44Z 2014-02-12T13:51:01Z Bump up to v0.7 sin sin@2f30.org commit 77e8aa520d8be2ebbebbcba2a08e245cfd0ae758 parent c09709f04fb60c89e0b6d401eac8785d4523b52d Author: sin <sin@2f30.org> Date: Wed, 12 Feb 2014 13:50:44 +0000 Bump up to v0.7 c09709f04fb60c89e0b6d401eac8785d4523b52d 2014-02-12T09:33:06Z 2014-02-12T09:33:06Z Sanitize working dir - default to "/" sin sin@2f30.org commit c09709f04fb60c89e0b6d401eac8785d4523b52d parent 31dbd779dcbd5b7c2cd96a008f1f93c035e0a4f7 Author: sin <sin@2f30.org> Date: Wed, 12 Feb 2014 09:33:06 +0000 Sanitize working dir - default to "/" 31dbd779dcbd5b7c2cd96a008f1f93c035e0a4f7 2014-02-10T20:19:22Z 2014-02-10T20:19:22Z It doesn't really matter what we return - just signal failure sin sin@2f30.org commit 31dbd779dcbd5b7c2cd96a008f1f93c035e0a4f7 parent 189d686ef4415fd611de37fdfec5c14550ec860c Author: sin <sin@2f30.org> Date: Mon, 10 Feb 2014 20:19:22 +0000 It doesn't really matter what we return - just signal failure 189d686ef4415fd611de37fdfec5c14550ec860c 2014-02-10T20:16:49Z 2014-02-10T20:16:49Z Add -Wextra and -Werror by default sin sin@2f30.org commit 189d686ef4415fd611de37fdfec5c14550ec860c parent 2e948429b275da54d2ec11631fda3c3e7fdd64e3 Author: sin <sin@2f30.org> Date: Mon, 10 Feb 2014 20:16:49 +0000 Add -Wextra and -Werror by default 2e948429b275da54d2ec11631fda3c3e7fdd64e3 2014-02-10T20:16:28Z 2014-02-10T20:16:28Z Use proper type for iterator sin sin@2f30.org commit 2e948429b275da54d2ec11631fda3c3e7fdd64e3 parent 10a4b601ef8fda0d0318a56d4effd10d961c28c4 Author: sin <sin@2f30.org> Date: Mon, 10 Feb 2014 20:16:28 +0000 Use proper type for iterator 10a4b601ef8fda0d0318a56d4effd10d961c28c4 2014-02-10T20:10:34Z 2014-02-10T20:10:34Z Bump up to v0.6 sin sin@2f30.org commit 10a4b601ef8fda0d0318a56d4effd10d961c28c4 parent c7c74b7b37b596ba11b18a6824fa808575bb005c Author: sin <sin@2f30.org> Date: Mon, 10 Feb 2014 20:10:34 +0000 Bump up to v0.6 c7c74b7b37b596ba11b18a6824fa808575bb005c 2014-02-10T20:08:05Z 2014-02-10T20:08:05Z Remove signalfd include header sin sin@2f30.org commit c7c74b7b37b596ba11b18a6824fa808575bb005c parent 7fd10119bbb606d8e186e4e43bae3d1ab17e4184 Author: sin <sin@2f30.org> Date: Mon, 10 Feb 2014 20:08:05 +0000 Remove signalfd include header 7fd10119bbb606d8e186e4e43bae3d1ab17e4184 2014-02-10T20:04:58Z 2014-02-10T20:04:58Z Use sigwait() instead of signalfd() sin sin@2f30.org commit 7fd10119bbb606d8e186e4e43bae3d1ab17e4184 parent 514b100944d0b61d8e8a295ab3cd534be4cfd344 Author: sin <sin@2f30.org> Date: Mon, 10 Feb 2014 20:04:58 +0000 Use sigwait() instead of signalfd() 514b100944d0b61d8e8a295ab3cd534be4cfd344 2014-02-10T14:53:51Z 2014-02-10T15:00:34Z Unblock signals before exec sin sin@2f30.org commit 514b100944d0b61d8e8a295ab3cd534be4cfd344 parent 9246a13738fc21d08aab20382b67c5dadb4ff8ae Author: sin <sin@2f30.org> Date: Mon, 10 Feb 2014 14:53:51 +0000 Unblock signals before exec 9246a13738fc21d08aab20382b67c5dadb4ff8ae 2014-02-10T10:03:25Z 2014-02-10T10:03:25Z No need to typedef sin sin@2f30.org commit 9246a13738fc21d08aab20382b67c5dadb4ff8ae parent 36cbf757036bc20dd8889ca7c19a025f8ded077e Author: sin <sin@2f30.org> Date: Mon, 10 Feb 2014 10:03:25 +0000 No need to typedef 36cbf757036bc20dd8889ca7c19a025f8ded077e 2014-02-10T10:00:22Z 2014-02-10T10:00:22Z Don't clutter code sin sin@2f30.org commit 36cbf757036bc20dd8889ca7c19a025f8ded077e parent 7345487258eacdabbb6a6335ab71e3c41ca79a3d Author: sin <sin@2f30.org> Date: Mon, 10 Feb 2014 10:00:22 +0000 Don't clutter code 7345487258eacdabbb6a6335ab71e3c41ca79a3d 2014-02-09T12:43:18Z 2014-02-09T12:43:18Z Simplify naming of variables sin sin@2f30.org commit 7345487258eacdabbb6a6335ab71e3c41ca79a3d parent 88d185e42ba5e7e4eed1393c1042aede529d13ce Author: sin <sin@2f30.org> Date: Sun, 9 Feb 2014 12:43:18 +0000 Simplify naming of variables 88d185e42ba5e7e4eed1393c1042aede529d13ce 2014-02-09T12:14:45Z 2014-02-09T12:14:45Z Bump up to v0.5 sin sin@2f30.org commit 88d185e42ba5e7e4eed1393c1042aede529d13ce parent ebccd1b409b8971fb11a26eed6eb12c42cbbf693 Author: sin <sin@2f30.org> Date: Sun, 9 Feb 2014 12:14:45 +0000 Bump up to v0.5 ebccd1b409b8971fb11a26eed6eb12c42cbbf693 2014-02-08T13:05:05Z 2014-02-08T13:05:05Z We can't reach the end of main, add a comment sin sin@2f30.org commit ebccd1b409b8971fb11a26eed6eb12c42cbbf693 parent fa62232dceae65c3d07a980653b42ecc997ff753 Author: sin <sin@2f30.org> Date: Sat, 8 Feb 2014 13:05:05 +0000 We can't reach the end of main, add a comment fa62232dceae65c3d07a980653b42ecc997ff753 2014-02-08T13:01:55Z 2014-02-08T13:01:55Z Remove unused #includes sin sin@2f30.org commit fa62232dceae65c3d07a980653b42ecc997ff753 parent a9baa02ed953c0a09afd70632610daba6fe9723b Author: sin <sin@2f30.org> Date: Sat, 8 Feb 2014 13:01:55 +0000 Remove unused #includes a9baa02ed953c0a09afd70632610daba6fe9723b 2014-02-08T13:00:06Z 2014-02-08T13:00:06Z No need to use select() - we only have one fd sin sin@2f30.org commit a9baa02ed953c0a09afd70632610daba6fe9723b parent 74f1fb86c974ad805614f8d96388c2df7911eb55 Author: sin <sin@2f30.org> Date: Sat, 8 Feb 2014 13:00:06 +0000 No need to use select() - we only have one fd 74f1fb86c974ad805614f8d96388c2df7911eb55 2014-02-08T12:36:34Z 2014-02-08T12:36:34Z Remove Arg - it is a leftover from when we had the FIFO code sin sin@2f30.org commit 74f1fb86c974ad805614f8d96388c2df7911eb55 parent 948ceeb6750119251fa81baa662d109eb1206247 Author: sin <sin@2f30.org> Date: Sat, 8 Feb 2014 12:36:34 +0000 Remove Arg - it is a leftover from when we had the FIFO code 948ceeb6750119251fa81baa662d109eb1206247 2014-02-07T22:21:19Z 2014-02-07T22:21:37Z Bump up to v0.4 sin sin@2f30.org commit 948ceeb6750119251fa81baa662d109eb1206247 parent 5fe27def6552bb8794121d1984ffc16176fb2f08 Author: sin <sin@2f30.org> Date: Fri, 7 Feb 2014 22:21:19 +0000 Bump up to v0.4 5fe27def6552bb8794121d1984ffc16176fb2f08 2014-02-07T22:19:40Z 2014-02-07T22:19:40Z No need for sigfd to be defined at file scope sin sin@2f30.org commit 5fe27def6552bb8794121d1984ffc16176fb2f08 parent c1a8eb796394bae62f27e54c7929820420538e44 Author: sin <sin@2f30.org> Date: Fri, 7 Feb 2014 22:19:40 +0000 No need for sigfd to be defined at file scope c1a8eb796394bae62f27e54c7929820420538e44 2014-02-07T22:03:07Z 2014-02-07T22:03:07Z *p points to program name sin sin@2f30.org commit c1a8eb796394bae62f27e54c7929820420538e44 parent 30f05b9cf6be171dc38e78940e865ea473a88baf Author: sin <sin@2f30.org> Date: Fri, 7 Feb 2014 22:03:07 +0000 *p points to program name 30f05b9cf6be171dc38e78940e865ea473a88baf 2014-02-07T21:42:24Z 2014-02-07T21:42:24Z signum is unused - get rid of it sin sin@2f30.org commit 30f05b9cf6be171dc38e78940e865ea473a88baf parent 581cb839f723b182e4119955ec5abfae53f65748 Author: sin <sin@2f30.org> Date: Fri, 7 Feb 2014 21:42:24 +0000 signum is unused - get rid of it 581cb839f723b182e4119955ec5abfae53f65748 2014-02-07T21:34:38Z 2014-02-07T21:34:38Z It was Rich Felker who did the minimal init - give proper credit sin sin@2f30.org commit 581cb839f723b182e4119955ec5abfae53f65748 parent 31e1196c9174122635ed4ec3be3510209598e097 Author: sin <sin@2f30.org> Date: Fri, 7 Feb 2014 21:34:38 +0000 It was Rich Felker who did the minimal init - give proper credit 31e1196c9174122635ed4ec3be3510209598e097 2014-02-07T21:31:48Z 2014-02-07T21:31:48Z Close signalfd fd on exec sin sin@2f30.org commit 31e1196c9174122635ed4ec3be3510209598e097 parent a4ddecaa6a99210f9bc6910c078a3a1cf1667c30 Author: sin <sin@2f30.org> Date: Fri, 7 Feb 2014 21:31:48 +0000 Close signalfd fd on exec a4ddecaa6a99210f9bc6910c078a3a1cf1667c30 2014-02-07T21:08:57Z 2014-02-07T21:08:57Z Don't nest too much sin sin@2f30.org commit a4ddecaa6a99210f9bc6910c078a3a1cf1667c30 parent 314b062efc5961bc3743df484a5cea9e7e62181f Author: sin <sin@2f30.org> Date: Fri, 7 Feb 2014 21:08:57 +0000 Don't nest too much 314b062efc5961bc3743df484a5cea9e7e62181f 2014-02-07T21:06:13Z 2014-02-07T21:06:29Z We'll get a SIGCHLD so no need to double-fork sin sin@2f30.org commit 314b062efc5961bc3743df484a5cea9e7e62181f parent 11333316755b558ba963ad7b8a6b169f762fadfa Author: sin <sin@2f30.org> Date: Fri, 7 Feb 2014 21:06:13 +0000 We'll get a SIGCHLD so no need to double-fork 11333316755b558ba963ad7b8a6b169f762fadfa 2014-02-07T17:13:31Z 2014-02-07T17:13:31Z Update README sin sin@2f30.org commit 11333316755b558ba963ad7b8a6b169f762fadfa parent 5ae4360bad8ea469f133746440e3145682fecdba Author: sin <sin@2f30.org> Date: Fri, 7 Feb 2014 17:13:31 +0000 Update README 5ae4360bad8ea469f133746440e3145682fecdba 2014-02-07T17:10:47Z 2014-02-07T17:10:47Z Bump up to v0.3 sin sin@2f30.org commit 5ae4360bad8ea469f133746440e3145682fecdba parent d463e0109543c20269d69b691db59349ef8f05aa Author: sin <sin@2f30.org> Date: Fri, 7 Feb 2014 17:10:47 +0000 Bump up to v0.3 d463e0109543c20269d69b691db59349ef8f05aa 2014-02-07T16:50:01Z 2014-02-07T16:50:01Z Don't process incomplete reads sin sin@2f30.org commit d463e0109543c20269d69b691db59349ef8f05aa parent 9ad5329913cf99e5498ddff228d5906f9570e28b Author: sin <sin@2f30.org> Date: Fri, 7 Feb 2014 16:50:01 +0000 Don't process incomplete reads If that can ever happen... 9ad5329913cf99e5498ddff228d5906f9570e28b 2014-02-07T16:46:16Z 2014-02-07T16:46:16Z Some more error checking just to be sure sin sin@2f30.org commit 9ad5329913cf99e5498ddff228d5906f9570e28b parent 76b2240e1587129d4baefaffb738332440e20290 Author: sin <sin@2f30.org> Date: Fri, 7 Feb 2014 16:46:16 +0000 Some more error checking just to be sure 76b2240e1587129d4baefaffb738332440e20290 2014-02-07T16:18:02Z 2014-02-07T16:18:02Z Poweroff on SIGUSR1 sin sin@2f30.org commit 76b2240e1587129d4baefaffb738332440e20290 parent b8cb53193c0d235cec99d70bb63838f27c3c5fda Author: sin <sin@2f30.org> Date: Fri, 7 Feb 2014 16:18:02 +0000 Poweroff on SIGUSR1 b8cb53193c0d235cec99d70bb63838f27c3c5fda 2014-02-07T16:15:48Z 2014-02-07T16:15:48Z Remove FIFO from sinit sin sin@2f30.org commit b8cb53193c0d235cec99d70bb63838f27c3c5fda parent c381441b7020aaeea599de9a5569e2be8fb147c6 Author: sin <sin@2f30.org> Date: Fri, 7 Feb 2014 16:15:48 +0000 Remove FIFO from sinit We can just run /bin/rc.shutdown reboot|poweroff etc. It complicates things when rootfs is mounted as ro etc. c381441b7020aaeea599de9a5569e2be8fb147c6 2014-02-07T13:30:53Z 2014-02-07T13:30:53Z Bump up version to v0.2 sin sin@2f30.org commit c381441b7020aaeea599de9a5569e2be8fb147c6 parent a95e5a956322b7310f72df0016889288f2909ce6 Author: sin <sin@2f30.org> Date: Fri, 7 Feb 2014 13:30:53 +0000 Bump up version to v0.2 a95e5a956322b7310f72df0016889288f2909ce6 2014-02-07T13:23:34Z 2014-02-07T13:23:34Z Don't leak the fifofd if we re-init the fifo sin sin@2f30.org commit a95e5a956322b7310f72df0016889288f2909ce6 parent 8194f460daaa9343ce9863838b14132d0ad8037c Author: sin <sin@2f30.org> Date: Fri, 7 Feb 2014 13:23:34 +0000 Don't leak the fifofd if we re-init the fifo 8194f460daaa9343ce9863838b14132d0ad8037c 2014-02-07T12:47:15Z 2014-02-07T12:57:46Z Refactor code sin sin@2f30.org commit 8194f460daaa9343ce9863838b14132d0ad8037c parent 23dbb870c7ad1d82a5c2a967683158da54ab3469 Author: sin <sin@2f30.org> Date: Fri, 7 Feb 2014 12:47:15 +0000 Refactor code We no longer have two processes, one for reaping children and another for handling the FIFO. Use signalfd() to multiplex signal handling and reading from the FIFO. This setup will also allow us to capture ctrl-alt-del and to work with a read-only rootfs. To create the FIFO, we send a SIGHUP signal to init from our init scripts. 23dbb870c7ad1d82a5c2a967683158da54ab3469 2014-02-07T11:41:55Z 2014-02-07T11:43:24Z Allow fifopath to be NULL sin sin@2f30.org commit 23dbb870c7ad1d82a5c2a967683158da54ab3469 parent 747b2bfdceb94ff45b7ced747cbe3458d26dc6a8 Author: sin <sin@2f30.org> Date: Fri, 7 Feb 2014 11:41:55 +0000 Allow fifopath to be NULL In that case we do not use the FIFO at all. 747b2bfdceb94ff45b7ced747cbe3458d26dc6a8 2014-02-07T11:35:29Z 2014-02-07T11:35:29Z Pass the actual FIFO path to weprintf() sin sin@2f30.org commit 747b2bfdceb94ff45b7ced747cbe3458d26dc6a8 parent fc4fd37ba81aa101b9790a875511456b4e57d66c Author: sin <sin@2f30.org> Date: Fri, 7 Feb 2014 11:35:29 +0000 Pass the actual FIFO path to weprintf() fc4fd37ba81aa101b9790a875511456b4e57d66c 2014-02-07T11:14:38Z 2014-02-07T11:14:38Z Use the double fork trick to properly reap spawned processes sin sin@2f30.org commit fc4fd37ba81aa101b9790a875511456b4e57d66c parent eae5382f6ac183086944ff964eeaa95fd7dbe936 Author: sin <sin@2f30.org> Date: Fri, 7 Feb 2014 11:14:38 +0000 Use the double fork trick to properly reap spawned processes eae5382f6ac183086944ff964eeaa95fd7dbe936 2014-02-06T17:00:28Z 2014-02-06T17:43:13Z Create a new session as quickly as possible sin sin@2f30.org commit eae5382f6ac183086944ff964eeaa95fd7dbe936 parent 0ffbe5d2badae771a94457573c3cf0cb382f1ad4 Author: sin <sin@2f30.org> Date: Thu, 6 Feb 2014 17:00:28 +0000 Create a new session as quickly as possible 0ffbe5d2badae771a94457573c3cf0cb382f1ad4 2014-02-06T12:24:55Z 2014-02-06T12:24:55Z Use a double pointer sin sin@2f30.org commit 0ffbe5d2badae771a94457573c3cf0cb382f1ad4 parent ce52673f5d443ab7f9b63fee013e82d02d71fd9f Author: sin <sin@2f30.org> Date: Thu, 6 Feb 2014 12:24:55 +0000 Use a double pointer ce52673f5d443ab7f9b63fee013e82d02d71fd9f 2014-02-06T12:18:01Z 2014-02-06T12:18:01Z Inform the user when execvp() fails sin sin@2f30.org commit ce52673f5d443ab7f9b63fee013e82d02d71fd9f parent 561e9b0e65d605404da4506f18e630143ed5d6df Author: sin <sin@2f30.org> Date: Thu, 6 Feb 2014 12:18:01 +0000 Inform the user when execvp() fails 561e9b0e65d605404da4506f18e630143ed5d6df 2014-02-06T12:03:18Z 2014-02-06T12:03:18Z We don't use err.h so remove it sin sin@2f30.org commit 561e9b0e65d605404da4506f18e630143ed5d6df parent 5ab9c1c10322a4db21349555d901646259d26d6f Author: sin <sin@2f30.org> Date: Thu, 6 Feb 2014 12:03:18 +0000 We don't use err.h so remove it 5ab9c1c10322a4db21349555d901646259d26d6f 2014-02-06T12:01:00Z 2014-02-06T12:01:00Z Factor out the rc commands sin sin@2f30.org commit 5ab9c1c10322a4db21349555d901646259d26d6f parent 2273a1fca05b14f2cabbf212d9b3a4247520fe2e Author: sin <sin@2f30.org> Date: Thu, 6 Feb 2014 12:01:00 +0000 Factor out the rc commands 2273a1fca05b14f2cabbf212d9b3a4247520fe2e 2014-02-06T11:42:50Z 2014-02-06T11:42:50Z Add README sin sin@2f30.org commit 2273a1fca05b14f2cabbf212d9b3a4247520fe2e parent 81b8281b6bf0ed016a283f436854ccb29d36f9dd Author: sin <sin@2f30.org> Date: Thu, 6 Feb 2014 11:42:50 +0000 Add README 81b8281b6bf0ed016a283f436854ccb29d36f9dd 2014-02-06T11:38:12Z 2014-02-06T11:38:12Z rc has now been renamed to rc.init sin sin@2f30.org commit 81b8281b6bf0ed016a283f436854ccb29d36f9dd parent 5effb9944e3f7d4add1257204d86fd6cb3214967 Author: sin <sin@2f30.org> Date: Thu, 6 Feb 2014 11:38:12 +0000 rc has now been renamed to rc.init 5effb9944e3f7d4add1257204d86fd6cb3214967 2014-02-06T11:34:38Z 2014-02-06T11:34:38Z Remove config.h from repo sin sin@2f30.org commit 5effb9944e3f7d4add1257204d86fd6cb3214967 parent fd0f19b55727f4cc005bfa2c7959134e4a682617 Author: sin <sin@2f30.org> Date: Thu, 6 Feb 2014 11:34:38 +0000 Remove config.h from repo fd0f19b55727f4cc005bfa2c7959134e4a682617 2014-02-06T11:27:32Z 2014-02-06T11:31:34Z Be less harsh and don't error out entirely sin sin@2f30.org commit fd0f19b55727f4cc005bfa2c7959134e4a682617 parent 51664faebcc10b53a1a78cff95f0efc04a2c7f8e Author: sin <sin@2f30.org> Date: Thu, 6 Feb 2014 11:27:32 +0000 Be less harsh and don't error out entirely 51664faebcc10b53a1a78cff95f0efc04a2c7f8e 2014-02-06T11:14:33Z 2014-02-06T11:14:33Z Initial commit sin sin@2f30.org commit 51664faebcc10b53a1a78cff95f0efc04a2c7f8e Author: sin <sin@2f30.org> Date: Thu, 6 Feb 2014 11:14:33 +0000 Initial commit