From: "Petr Vandrovec" <VANDROVE@vc.cvut.cz>
To: Der Herr Hofrat <der.herr@mail.hofr.at>
Cc: linux-kernel@vger.kernel.org
Subject: Re: kthread execve question
Date: Mon, 2 Sep 2002 18:18:55 +0200 [thread overview]
Message-ID: <A811111E8C@vcnet.vc.cvut.cz> (raw)
On 2 Sep 02 at 17:03, Der Herr Hofrat wrote:
>
> any hint whats wrong ? any pointers to using kernel threads dosc/examples in
> general and how to execute user space apps would be appreciated.
>
> char cmd_path[256] = "/bin/echo";
>
> static int exec_cmd(void * kthread_arg)
> {
> static char * envp[] = { "HOME=/",
> "TERM=linux",
> "PATH=/:/bin:/usr/bin:/usr/bin",
> NULL };
> char *argv[] = { kthread_arg,
> ">>",
> "/tmp/kthread_echo",
'>>' is bash thing. Try executing "/bin/touch" with "/tmp/testfile" instead.
If /tmp/testfile will appear, you got it.
And also do not forget that argv[0] should contain program name, not
first argument - so in most cases you want
exec_usermodehelper(argv[0], argv, envp) ...
Petr Vandrovec
next reply other threads:[~2002-09-02 16:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-02 16:18 Petr Vandrovec [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-09-02 15:03 Der Herr Hofrat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=A811111E8C@vcnet.vc.cvut.cz \
--to=vandrove@vc.cvut.cz \
--cc=der.herr@mail.hofr.at \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®