Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. how do I redirect STDIN STDOUT for cmd.exe?

how do I redirect STDIN STDOUT for cmd.exe?

Scheduled Pinned Locked Moved C / C++ / MFC
questionlinuxhelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    munawar1968
    wrote on last edited by
    #1

    Hi folks How do i redirect stdin stdout stderr for a process (cmd.exe). the usual method (as given in msdn) doesnt seem to give an interactive shell. help needed. thanks

    R 1 Reply Last reply
    0
    • M munawar1968

      Hi folks How do i redirect stdin stdout stderr for a process (cmd.exe). the usual method (as given in msdn) doesnt seem to give an interactive shell. help needed. thanks

      R Offline
      R Offline
      Rahim Rattani
      wrote on last edited by
      #2

      I think you want to read in the standard cosole. If I am correct, then u can do this by simply open a socket at port no. 512. anything u write would be sent to standard console for output and anything that is typed at the console would be available for u to read on the socket. 512 is a port that open to the standard console. Rahim Rattani Software Engineer, Matrix Systems (Pvt) Ltd., Karachi - Pakistan

      M 1 Reply Last reply
      0
      • R Rahim Rattani

        I think you want to read in the standard cosole. If I am correct, then u can do this by simply open a socket at port no. 512. anything u write would be sent to standard console for output and anything that is typed at the console would be available for u to read on the socket. 512 is a port that open to the standard console. Rahim Rattani Software Engineer, Matrix Systems (Pvt) Ltd., Karachi - Pakistan

        M Offline
        M Offline
        munawar1968
        wrote on last edited by
        #3

        1. 512 is 'rexec' port.It executes single commands non-interactively. 2. I dont want to use any builtin remote cmd execution service/prog. 3. I want to code an interactive telnet server.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups