JianyuWang0623 commented on PR #17216: URL: https://github.com/apache/nuttx/pull/17216#issuecomment-3454343833
@anchao > 1. System monitoring capabilities can also be implemented in nsh, rather than forcing developers to use init if they want enable this feature. Functionally, this can be achieved. However, it seems that common shells do not directly provide system monitoring capabilities. As I understand it, the usual approach is to use a combination of shell + init/systemd; please correct me if this is not accurate. If implemented in a new component, system monitoring and the shell would be independent of each other, giving users more flexibility in their choices (for example, there are scenarios where no shell is needed). > 2. Android's init syntax is only a subset of the shell, with additional syntax keywords to accommodate Android startup requirements. Historically, init syntax has consistently added keywords to improve compatibility with shell, so why not just use the shell? Furthermore, multi-line descriptions are a strange design. Similar to SELinux rule files, we can use semicolons or colon to separate rules, as many systems do. There are indeed various options when it comes to choosing a syntax, and I am not sure if there exists a syntax that everyone likes. Our primary consideration is to select an Init Language that is relatively widely used and reasonably designed, and then achieve compatibility with it. As a development and debugging tool, I am very accustomed to using the Shell and quite fond of it. Many people, including myself, are willing to contribute new features to nsh. What concerns me is whether the system monitoring function would deviate from nsh’s core functionalities. For instance, why don’t Linux distributions implement such a function in bash? Instead, they rely on init/systemd (I don’t have a deep understanding of the historical context behind this; I’m merely making a simple reference to the current situation). I am new to the Android Init Language, but if we are open to adopting it, it will be quite easy to get started with. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
