Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~7K People Reached
Favorite Forums
Favorite Tags
Member Avatar for Fredszky

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 …

0
197
Member Avatar for Fredszky

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() …

Member Avatar for Fredszky
0
6K
Member Avatar for Fredszky

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 …

Member Avatar for nmaillet
0
221
Member Avatar for Fredszky

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: …

Member Avatar for vinitmittal2008
0
177
Member Avatar for Fredszky

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 …

Member Avatar for Fredszky
0
103
Member Avatar for Fredszky

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 …

Member Avatar for Fredszky
0
100