The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Executing shell program from a web page venkatritch Shell Programming and Scripting 5 06-14-2008 02:36 AM
Shell Program that prompts for user Id mmg2711 Shell Programming and Scripting 16 10-25-2007 10:09 AM
Shell Program that prompts for user Id mmg2711 UNIX for Dummies Questions & Answers 1 10-24-2007 04:15 AM
Executing an .ec program in different informix versions matrixmadhan High Level Programming 0 05-21-2005 03:29 AM
executing the su command from a java program. shailendrat UNIX for Dummies Questions & Answers 1 03-24-2005 08:27 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-19-2008
Registered User
 

Join Date: Apr 2008
Posts: 4
Stumble this Post!
Advantage of executing program in user shell?

Hi,

I'm curious about the advantage of forking and executing a program in a user shell as opposed to forking and executing the program directly without the user shell.

For example:

why is it often like:
SSHD->fork&exec(shell, sftp-server)->fork&exec(sftp-server)

And Not like:

SSHD->fork&exec(sftp-server)

Is there an advantage?

TIA
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-20-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,650
Stumble this Post!
If you fork a shell, you get access to the shell's facilities, such as wildcard expansion, redirection, etc.
Reply With Quote
  #3 (permalink)  
Old 05-21-2008
Registered User
 

Join Date: Apr 2008
Posts: 4
Stumble this Post!
but the sftp program is being accessed by a remote client and the shell features of auto-completion etc will not come into picture as the commands from the sftp client will be passed to the server as is without any modifications. Am I wrong?
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:07 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0