[BusyBox] ash -c

Rolland Dudemaine karllim at apologia.cx
Tue Sep 10 08:15:03 UTC 2002


Hello, there
I have a little enhancement ask for ash : When a command is given with 
-c argument, and that command is external, then it should not fork, so 
that the shell does not remain in memory.

Here is what it does with ash :

karnaj:~/busybox# ps
  PID TTY          TIME CMD
28674 pts/4    00:00:00 bash
31325 pts/4    00:00:00 ps
karnaj:~/busybox# ash -c xterm &
[2] 31326
karnaj:~/busybox# ps
  PID TTY          TIME CMD
28674 pts/4    00:00:00 bash
31326 pts/4    00:00:00 ash
31327 pts/4    00:00:00 xterm
31329 pts/4    00:00:00 ps
karnaj:~/busybox#

And what it should be , and is already in bash :

karnaj:~/busybox# ps
  PID TTY          TIME CMD
28674 pts/4    00:00:00 bash
31331 pts/4    00:00:00 ps
karnaj:~/busybox# bash -c xterm &
[2] 31332
karnaj:~/busybox# ps
  PID TTY          TIME CMD
28674 pts/4    00:00:00 bash
31332 pts/4    00:00:00 xterm
31334 pts/4    00:00:00 ps
karnaj:~/busybox#

I'm trying to search for the right place in ash.c, but it's kinda 
difficult to dive in a shell like that ...

Best regards to all of you, that's a good joob!!!
Rolland Dudemaine




More information about the busybox mailing list