do_exec_pty(..)
Sunil K. Vallamkonda
sunil at redback.com
Thu Mar 1 11:37:29 EST 2001
Hello,
I see that incase of command execution:
:fork()" is called twice, in sshd.
Once to spin off child sshd from parenat and
second from child sshd, to execute command.
Due to this I see 3 processes being created
for each connection viz:
16398 0.0 0.3 1284 892 ?? S 4:33PM 0:00.05 sshd:child
16399 0.0 0.1 320 232 p4 Is+ 4:33PM 0:00.06 -sh -c foo_command
16401 0.0 0.3 2076 840 p4 S+ 4:33PM 0:00.01 foo_command
I may be missing something, but
I was wondering to why second
fork() is required to execute a command
on server.
To execute a command, the child sshd could execve(..).
thus eliminate the need for second fork() and possibly
simpler code path.
Thank you.
More information about the openssh-unix-dev
mailing list