Search:

Type: Posts; User: slevytam

Search: Search took 0.01 seconds.

  1. Replies
    16
    Views
    26,071

    Thanks, I'll see what I can find... If anyone...

    Thanks, I'll see what I can find... If anyone comes across a code snippet please let me know!
  2. Replies
    16
    Views
    26,071

    Well unfortunately, I have no idea how to do...

    Well unfortunately, I have no idea how to do this... Currently, my main method looks like this....

    for(;;) {

    /* display prompt, read input */
    printf("%s%s", getcwd(NULL,64),">");
    ...
  3. Replies
    16
    Views
    26,071

    I have tried searching sample code but have not...

    I have tried searching sample code but have not found a script that is smart enough to catch when the background process ends or displays output. I need to be able to catch this in order to reprint...
  4. Replies
    16
    Views
    26,071

    It seems as though what happens is that I(and my...

    It seems as though what happens is that I(and my program) doesn't know how to reprint the command line prompt and current buffer to screen when the process finishes. In unix if I had something on...
  5. Replies
    16
    Views
    26,071

    I've changed the code to look like this: ...

    I've changed the code to look like this:

    pid = fork();
    if (pid < 0) {
    fprintf(stderr, "ERROR: cannot fork!\n");
    return(-1);
    }
    else if (pid) {
    ...
  6. Replies
    16
    Views
    26,071

    Im sorry could you explain this a little more. ...

    Im sorry could you explain this a little more.

    The way the code is right now it does wait for the function to finish.

    ie if I call sleep 10, i won't back to the command prompt for 10 seconds.
    ...
  7. Replies
    16
    Views
    26,071

    This is the code I am using currently... How...

    This is the code I am using currently...

    How might it need to be modified?

    Thanks,

    slevytam

    pid = fork();
    if (pid < 0) {
  8. Replies
    16
    Views
    26,071

    execvp and ampersand?

    Hi,

    Currently, I have a shell which uses fork and execvp to execute commands. However, I am wondering how I can implement the ampersand feature of unix. ie program will not wait for process to...
  9. Replies
    4
    Views
    1,940

    ok thanks, ill take a look!

    ok thanks, ill take a look!
  10. Replies
    4
    Views
    1,940

    thanks for your reply. chdir worked great! ...

    thanks for your reply.

    chdir worked great!

    sorry to be a bother but I also need to do a dir function. is there a c function which will produce a directory listing?

    thanks,

    slevytam
  11. Replies
    4
    Views
    1,940

    Change Directory as an Internal Command!

    Hello,

    Sorry to bother; however, I was wondering if anyone could assist me in code for a change directory function as an internal command.

    Pretty much I am coding my own unix shell. I need to...
  12. Replies
    3
    Views
    1,282

    Thanks!

    Thanks!
  13. Replies
    3
    Views
    1,282

    Really Simple Question!

    Hi,

    I am starting to do some C coding after a break for a year or two. I have already forgotten a really simple thing.

    Can anyone remind me how to get the current directory from unix.
    ie. ...
Results 1 to 13 of 13