<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX ProcessorsのトピックAPI to start script in kernel programming</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/API-to-start-script-in-kernel-programming/m-p/1092496#M160046</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working IMX8 platform. I want start the script from kernel. I used system() function from stdlib.h in my code. But, I unable to achieve in kernel programming.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any&lt;STRONG&gt; specified API to execute shells script from kernel driver&lt;/STRONG&gt; ?&lt;/P&gt;&lt;P&gt;Is there any&lt;STRONG&gt; specified API to execute/start service from kernel driver&lt;/STRONG&gt; ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Vinoth S,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 15 Aug 2020 03:58:51 GMT</pubDate>
    <dc:creator>vinothkumars</dc:creator>
    <dc:date>2020-08-15T03:58:51Z</dc:date>
    <item>
      <title>API to start script in kernel programming</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/API-to-start-script-in-kernel-programming/m-p/1092496#M160046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working IMX8 platform. I want start the script from kernel. I used system() function from stdlib.h in my code. But, I unable to achieve in kernel programming.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any&lt;STRONG&gt; specified API to execute shells script from kernel driver&lt;/STRONG&gt; ?&lt;/P&gt;&lt;P&gt;Is there any&lt;STRONG&gt; specified API to execute/start service from kernel driver&lt;/STRONG&gt; ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Vinoth S,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Aug 2020 03:58:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/API-to-start-script-in-kernel-programming/m-p/1092496#M160046</guid>
      <dc:creator>vinothkumars</dc:creator>
      <dc:date>2020-08-15T03:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: API to start script in kernel programming</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/API-to-start-script-in-kernel-programming/m-p/1092497#M160047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A _jive_internal="true" data-content-finding="Community" data-userid="299930" data-username="vinothkumars" href="https://community.nxp.com/people/vinothkumars"&gt;vinothkumar&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is not a good idea.&lt;/P&gt;&lt;P&gt;See the discussion on the link, please!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://stackoverflow.com/questions/15676667/how-to-execute-shell-command-in-kernel-programming" title="https://stackoverflow.com/questions/15676667/how-to-execute-shell-command-in-kernel-programming"&gt;c - How to execute shell command in kernel programming? - Stack Overflow&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below contents are from : &lt;A class="link-titled" href="https://www.zhihu.com/question/297646853" title="https://www.zhihu.com/question/297646853"&gt;linux kernel中编程执行shell脚本？ - 知乎&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Original contects are written in Chinese, so I translate them into English:&lt;/P&gt;&lt;P&gt;-------------------------------------&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;1. Executing a shell script is the process of parsing and executing script files using a shell interpreter.&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;2. The shell interpreter itself is a process in user mode.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="" title=""&gt;3. The system function essentially forks the shell interpreter process and executes the script file.&lt;/SPAN&gt; &lt;SPAN class="" title=""&gt;So if you want to execute a shell script in the kernel mode, you need the kernel thread to implement the shell interpreter, read the script to the kernel through the file system, and call the shell kernel thread for execution.&lt;/SPAN&gt; &lt;SPAN class="" title=""&gt;However, the running stack of the kernel thread is very small, and the kernel mode has many restrictions, and the execution of the script does not pay off.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;--------------------------------------&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope the information is helpful for you.&lt;/P&gt;&lt;P&gt;Have a nice day!&lt;/P&gt;&lt;P&gt;B.R,&lt;/P&gt;&lt;P&gt;Weidong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2020 02:15:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/API-to-start-script-in-kernel-programming/m-p/1092497#M160047</guid>
      <dc:creator>weidong_sun</dc:creator>
      <dc:date>2020-08-17T02:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: API to start script in kernel programming</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/API-to-start-script-in-kernel-programming/m-p/1092498#M160048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Weidong for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vinoth S,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2020 09:48:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/API-to-start-script-in-kernel-programming/m-p/1092498#M160048</guid>
      <dc:creator>vinothkumars</dc:creator>
      <dc:date>2020-08-17T09:48:16Z</dc:date>
    </item>
  </channel>
</rss>

