c - Client/server: running "nano editor" command from client -


i have client/ server program written c language, client can send , receive .txt documents server, wish open file received visualize command nano example, inside running process:

something this: exec( nano, "file-to-open.txt") dont know how do this), can me?

sorry english thank's lot

try this:

execlp("nano", "nano", "file.txt", null); 

the nano editor must in path, file.txt must in current directory of running client process, , importantly, whatever display editor going display on must accessible, terminal client run or appropriate x-windows display.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -