Search:

Type: Posts; User: QuietBoi

Search: Search took 0.01 seconds.

  1. Replies
    9
    Views
    1,383

    Thanks a lot salem. I shall try out the different...

    Thanks a lot salem. I shall try out the different recommendations you've given. Get back again when I get something, probably next few days.

    Cheers!
  2. Replies
    9
    Views
    1,383

    Yup, indeed 'ps' can print out the PID and Parent...

    Yup, indeed 'ps' can print out the PID and Parent PID of every process and I can construct the process hierarchy. Then again, that's input directly into command line terminal. Now I need to know to...
  3. Replies
    9
    Views
    1,383

    Yes, indeed I could miss some of them. That's why...

    Yes, indeed I could miss some of them. That's why for development purposes, I purposely put busywait to be long, probably around 1 to 3 seconds.

    But assuming I have no control over the content of...
  4. Replies
    9
    Views
    1,383

    I am creating a mini user-mode scheduler. Read in...

    I am creating a mini user-mode scheduler. Read in some tasks from a file and runs them.

    When the process terminates, I output its command line and the process exit status. During execution, I want...
  5. Replies
    9
    Views
    1,383

    I've tried fopen /proc/[pid]/cmdline, but it...

    I've tried fopen /proc/[pid]/cmdline, but it returned me busywait instead.

    Busywait actually creates a child process which run the command gcc Test.c in execvp

    What I wanted is to capture that...
  6. Replies
    9
    Views
    1,383

    How to use cmdLine in /poroc ?

    I have a program which forks out a child and run another program (busywait) using execvp. I hope to get the commands busywait invoked. (May refer to this thread for the program)

    Take example,...
  7. Replies
    15
    Views
    8,328

    I think I should stop here since it is no longer...

    I think I should stop here since it is no longer related to readlink, digress off topic already. Post in a separate thread.

    Thanks once again Salem!
  8. Replies
    15
    Views
    8,328

    Thank you very much Salem. Finally got it...

    Thank you very much Salem. Finally got it working. Million thanks!

    Now another problem: To get the commands busywait invoked.

    Take example, busywait creates a child process with the command...
  9. Replies
    15
    Views
    8,328

    Thanks a lot Salem, just figured it out during...

    Thanks a lot Salem, just figured it out during the numerous tryouts just now. Didn't know that it's just that simple. Haha... Guess I'm still very new in C.

    But then, readlink still can't get the...
  10. Replies
    15
    Views
    8,328

    From the above codes, I added in more printf to...

    From the above codes, I added in more printf to print the child_pid and here's the result:


    Child

    In Child: Child pid: 2973
    Parent


    busywait program finished in 1 secs
  11. Replies
    15
    Views
    8,328

    Yes, I did. Included my codes at the earlier...

    Yes, I did. Included my codes at the earlier post, thought could save some space... Copy & paste here agian:

    I've tried to execvp in the current child, and do the readlink in the parent after the...
  12. Replies
    15
    Views
    8,328

    Yes, I do have a function earlier which setenv to...

    Yes, I do have a function earlier which setenv to a PATH. So I should use execvp(busywait) instead and it would go to the PATH to search for the correct path.

    I thought when using execvp, busywait...
  13. Replies
    15
    Views
    8,328

    This is the one which I have readlink()...

    This is the one which I have readlink() successfully printed out the path. It does gives me the path from the readlink, and the ./busywait program is executed. My idea is to get the path of the...
  14. Replies
    15
    Views
    8,328

    Oh I see. But how come the readlink before the...

    Oh I see. But how come the readlink before the execvp couldn't work?

    The earlier version too, the "Child finished" also not pritned.

    Thank you very much. =)
  15. Replies
    15
    Views
    8,328

    Thanks a lot Salem. Tried your suggestions, and...

    Thanks a lot Salem. Tried your suggestions, and it worked. So happy... However, the last line "Child Completed" still doesn't printe out. Humm...

    Now I try to include the execvp to run ./busywait...
  16. Replies
    15
    Views
    8,328

    Problem with readlink()?

    Hello...

    I am working on a program and I don't quite understand why my last line "Child completed" is not printed out. My idea is to output for the main process in the task, (i) the executable and...
Results 1 to 16 of 16