#1 2020-04-02 14:53:29

henk
Administrator
Netherlands
Reputation: +251
Registered: 2018-07-07
Posts: 322
Windows 10 Chrome 80.0

Server manager

I'v been working on a new bf1942 server manager for linux.
it should work as interface between the server binary and the user.

im stuck here:
(im writing it in c++)
how to run a binary and pass stdin to it, and receive stdout back?
I found:
http://tldp.org/LDP/lpg/node9.html
But iv tried and tried, but i didnt get it working. (especially the part where you exec the binary)
Im absolutely not a great programmer, so all help is welcome

Last edited by henk (2020-04-02 14:54:11)

Offline

    Positive reputation 0   Negative reputation 0

#2 2020-04-02 16:05:43

henk
Administrator
Netherlands
Reputation: +251
Registered: 2018-07-07
Posts: 322
Windows 10 Chrome 80.0

Re: Server manager

so basically what i am looking for is this:

run path/something.exe
read from
write to 
read from
write to 
read from
write to 
etc..

just like the console

Offline

    Positive reputation 0   Negative reputation 0

#3 2020-04-02 17:38:14

petr8
don't leave
Reputation: +626
Registered: 2016-10-13
Posts: 943
Fedora Firefox 74.0

Re: Server manager

Hi, try to look at this
http://man7.org/linux/man-pages/man3/popen.3.html
or
https://docs.microsoft.com/en-us/cpp/c- … pen-wpopen

But I don't think you really need this, it's enough to deal with the server remote console interface instead of std I/O.

Last edited by petr8 (2020-04-02 17:54:11)

Offline

    Positive reputation 0   Negative reputation 0

#4 2020-04-04 12:28:38

henk
Administrator
Netherlands
Reputation: +251
Registered: 2018-07-07
Posts: 322
Windows 10 Chrome 80.0

Re: Server manager

thanks!

For the guy who was chatting with me ingame: can you send me a pm on this forum?

Offline

    Positive reputation 0   Negative reputation 0

Board footer