Thread: how to get output of a process?

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    18

    Question how to get output of a process?

    First, I ask the user name and password to start a telnet/ssh session. Then I want to get the output of the telnet/ssh session to deterrmine the next action.

    Use popen? The telnet/ssh session is still running, I afriad the buffer in fgets would overflow.

  2. #2
    Registered User Vber's Avatar
    Join Date
    Nov 2002
    Posts
    807

    sorry about posting, but what..

    popen() and pclose() means?
    Hmm did you change the 'f' to 'p', or this is just another function?

    Thanks

  3. #3
    Registered User Vber's Avatar
    Join Date
    Nov 2002
    Posts
    807

    ...

    Pretty ignorant and narrow-minded.
    I just asked, I really didn't know that popen() and pclose() exists, now I do know, thanks.

  4. #4
    Registered User
    Join Date
    Nov 2002
    Posts
    491
    VBer: Man pages. Use them and love them instead of asking silly questions. And don't give me any "I'm on windows" junk. www.freebsd.org has them with a pretty web front-end.

  5. #5
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,227
    >>And don't give me any "I'm on windows" junk. www.freebsd.org has them with a pretty web front-end.

    Now tell me - why on Earth should he learn to "use and love" documentation for a system that he doesn't program for? I should think a more approriate place to point him would be http://msdn.microsoft.com - the man pages of windows

  6. #6
    Registered User
    Join Date
    Nov 2002
    Posts
    491
    Because he may be asking about a non windows function. Although, I do agree msdn is a wonderful place for windows developers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem with forking a process
    By Unitedroad in forum C Programming
    Replies: 10
    Last Post: 10-04-2007, 01:43 AM
  2. Connecting input iterator to output iterator
    By QuestionC in forum C++ Programming
    Replies: 2
    Last Post: 04-10-2007, 02:18 AM
  3. Sending a message to parent from child process
    By maxorator in forum C++ Programming
    Replies: 2
    Last Post: 10-09-2005, 04:23 PM
  4. Process sending file descriptors to another process
    By Yasir_Malik in forum C Programming
    Replies: 4
    Last Post: 04-07-2005, 07:36 PM
  5. how to get the output of a non-stop process?
    By dkt in forum C Programming
    Replies: 1
    Last Post: 04-27-2002, 11:18 AM