Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Making A Simple Unix Shell?


2 replies to this topic

#1 it01y2

    Member [Level 1]

  • Kontributors
  • PipPipPipPip
  • 71 posts

Posted 19 December 2009 - 12:01 PM

Can anybody help me making a simple unix shell? Using fork() and execlp commands in linux

#2 truefusion

    Coincidence is non-sequitur, therefore everything has a reason for its existence (except if they are eternal).

  • [MODERATOR]
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 3,216 posts
  • Gender:Male
  • Location:No, not there. Not there either. Yes, you'll never figure it out.
  • Interests:God, Christianity.
  • myCENT:86.16

Posted 19 December 2009 - 03:16 PM

Why not just call xterm? If you are trying to make your own terminal, i would suggest looking at the source code of xterm.

#3 it01y2

    Member [Level 1]

  • Kontributors
  • PipPipPipPip
  • 71 posts

Posted 20 December 2009 - 11:31 AM

Im just wondering how i can pass multiple parameters in this instance:

Prompt the user to enter a program name and then add a flag:

e.g:Program Name: ls First Parameter: -l (and so on....)

so... Program var is : ls, parameter var 1 = -l, parameter var 2 = etc. ......

char program[256];
char *parameters=NULL;
execlp(program,program,parameters, (char *)0);





Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users