![]() |
| ||
| getting command into Unix Shell Hi guys. I'm doing a programming, whereby I have to display a prompt of my own on the linux terminal. Example commandprompt>. The program will then wait for user's input, example "ls -ali | more" or "ls -ali" and etc. I will be using the following system call in my program namely, fork(), execlp(), wait(). I'm having problem now waiting the wait and execlp. I've no idea how to use the function wait, since i have no idea how i could get the status of my child process. About using execlp, how do i make it robust? as in the user could be keying any amount of command. They could be piping a few things. like maybe... "ls -ali | more | ... | ..." or it could be simply be one command. my codes: int main() |
| All times are GMT -4. The time now is 2:26 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC