Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. GooMooPunch

    Using exec call with uknown amount of args...

    Hello, I have a shell program with a function that handles external unix calls, but I can't figure out how to make it so I can use an exec call because the amount of arguments being sent to the function is different for different external commands... int exCmdhandler(char* cmd, char* args[]){...
  2. GooMooPunch

    problem with struct passwd...

    Hello, I'm trying to print out the user's name, but am receiving an error: ------ struct passwd* user = getpwuid(getuid()); printf("\n %s \n", user.pw_name); --------- the error I receive is: request for member "pw_name" in something not a structure or union ----- I'm...
  3. GooMooPunch

    using fork and wait...

    What I'm trying to do is have my program make an execlp call and then return back to my original program... I know that I can use fork to create another process..and that exec will replace the process that it is being called from...but i'm not sure exactly how to use fork and wait and exec...
  4. GooMooPunch

    Printing system call output using printf...

    Thank you for the reply Salem, Follow up question: How can I capture the string data from calling the uname() function? It returns an integer, so I'm not quite sure how to do this... Thanks
  5. GooMooPunch

    Printing system call output using printf...

    I'm quite new to the C language, and i'm sure this is a simple question... I'm trying to create a prompt that includes the output from the command uname(), but I'm having trouble displaying it properly. My question is how do I capture the output of the uname() command so I can include it in...

Part and Inventory Search

Back
Top