Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6877219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:34:27+00:00 2026-05-27T04:34:27+00:00

I am implementing a netcat clone and currently need a way to run command-line

  • 0

I am implementing a netcat clone and currently need a way to run command-line programs over the network.

My solution so far is to execute a process and use pipes for STDIN and STDOUT, then forward the data back and forth over TCP.

The problem is, I feel like this is a round-about way of doing things. When I run bash, the prompt doesn’t show up, and I am unable to use ncurses programs, like Vi.

Is there an easier way to control the input and see the output of a program in C, or are pipes my best bet?

Here a portion of my code (click on it, it’s very intuitive):

http://pastebin.com/MjyxFkdu

I am using C with GNU/Linux.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T04:34:27+00:00Added an answer on May 27, 2026 at 4:34 am

    Correct terminal behavior can’t be obtained using pipes — you will need to use a PTY (pseudoterminal) to get the right results.

    Note that what you’re trying to write here is essentially telnetd…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When implementing a needle search of a haystack in an object-oriented way, you essentially
Implementing a web service that uses Transport-level security with WCF over HTTP is pretty
I`m implementing a custom filesystem on Ubuntu using Fuse, but I need to trap
When implementing SuperBoxSelect (http://www.sencha.com/forum/showthread.php?69307-3.x-Ext.ux.form.SuperBoxSelect), I've realized that it currently does not support shift +
Im implementing a project in java using webservices and I need to figure out
When implementing Zend Lucene, do we need to install Java on our server or
When implementing a client/server solutions, one of the questions you always need to answer
while implementing hhtps, is there a way not to show the message Do you
Currently implementing vectorial interface elements on iOS is very peculiar, UIImage advertises support only
Im implementing my own proto in Java, it will use a heartbeat over a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.