No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
6 Posted Topics
Server code part: void spawn (char* program, char** arg_list) // Executing the clients command { printf("\n\nprogram = %s\narg_list = %s\n\str1=%s!!!\nstr2=%s\n\n",program,arg_list,str1,str2); dup2(s2, STDOUT_FILENO); //Redericting information to socket dup2(s2, STDERR_FILENO); execvp (program, arg_list);abort (); // Executing the clients command - After this, program gets stuck, why? /* if (send(s2, "This works multiple … | |
So i'm trying to make multiple clients logon to a server through filesockets, and perform simple commands like ls -l, ls, mkdir. I've managed to make one client recieve output of ls -l command, sometimes, its buggy. Now i've been sitting for days trying to figure out how to fork() … | |
Firstly, i'm really new to all this bash/unix/c stuff so i will probably get some words meanings wrong here, but anyway: Im trying to make a client pass simple shell commands to the server, which executes them. They communicate locally on the same machine through a socket. I can make … | |
Im trying to make my program to either open or create a file if it does not exist, in "C://". [code] printf("Filename: "); scanf("%s",filename); FILE *fil; fil=fopen(filename,"a+");[/code] This code opens or creates a file in the same folder as the program. What i want is something like this: [code] printf("Filename: … | |
I spent 5-6 hours today to try to get a working searchfunction for my textfile, can someone please put me in the right direction? I have this textfile, its a register over contacts: [code] Number Contacts = 3* James Brown:555-12345:james@brown.com Jack Yellow:555-42345:jack@yellow.com Sally White:555-12345:sally@yahoo.com [/code] For example, i want to … | |
Hello Im new to C programming, im trying to learn how to create a textfile with whatever name the user of the program wants. something like this, please ignore that this code wont work, its just so you might understand how i am thinking: [code] FILE *file; printf("name of the … |
The End.