Search Results

Search: Posts Made By: tafazzi87
Forum: Programming 01-10-2012
1,480
Posted By tafazzi87
[C] close server after user input
i must close server after a specific user input, such as FINE, if i put a test inside function "maiuscolatore" i receive an error on second recv of client. why?

below there are code of client and...
Forum: Programming 01-06-2012
23,924
Posted By tafazzi87
[SOLVED]Problem transport endpoint is not connected
i've made a simple program that change a string from lowercase to uppercase and from uppercase to lowercase. Server works until start client, after client run server give this error: "recv server...
Forum: Programming 12-29-2011
7,471
Posted By tafazzi87
thanks a lot now it works very well
thanks a lot now it works very well
Forum: Programming 12-29-2011
7,471
Posted By tafazzi87
[Solved] how to send an integer via message queue?
how can i send an integer via message queue?
i try this, but it doesn't work, child process receive 13345943 instead of 5

#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include...
Forum: Programming 12-28-2011
39,091
Posted By tafazzi87
execvp required only two argument...
execvp required only two argument...
Forum: Programming 12-27-2011
39,091
Posted By tafazzi87
no one can help me?
no one can help me?
Forum: Programming 12-23-2011
39,091
Posted By tafazzi87
nothing also with buffer[4] i've same error on...
nothing also with buffer[4] i've same error on output...
Forum: Programming 12-23-2011
39,091
Posted By tafazzi87
yes but also if i use buffer[3] instead...
yes but also if i use buffer[3] instead buffer[2], return same error, i have already thought that was an error of memory segment, but if i try all possibilities.
if i use IPC_CREAT i've same error...
Forum: Programming 12-22-2011
39,091
Posted By tafazzi87
i've another problem, now i want to add two...
i've another problem, now i want to add two numbers and print result, two number are written in the first and second elements of buffer of shared memory and after call an adder program and he make...
Forum: Programming 12-16-2011
39,091
Posted By tafazzi87
thanks now it works very well, i've a very last...
thanks now it works very well, i've a very last question...:rolleyes: where i find manual of mode flags?
Forum: Programming 12-16-2011
39,091
Posted By tafazzi87
the first: #include <unistd.h> #include...
the first:

#include <unistd.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <stdio.h>
#include <stdlib.h>
int main() {
int a=5,b=7;
key_t keyshm; // or...
Forum: Programming 12-16-2011
39,091
Posted By tafazzi87
if i use key_t shmkey=0x200; it doesn't work,...
if i use key_t shmkey=0x200;
it doesn't work, it gives segmentation fault and also if i use ftok function...
maybe i'm wrong to use ftok(), which type of file i use in path argument?
Forum: Programming 12-15-2011
39,091
Posted By tafazzi87
thanks a lot for your exhaustive answer, i will...
thanks a lot for your exhaustive answer, i will try soon

---------- Post updated at 05:06 PM ---------- Previous update was at 04:26 PM ----------

so, for example i have to declare :

key_t...
Forum: Programming 12-15-2011
39,091
Posted By tafazzi87
Shared memory between two c program
i have to shared a variable between two different c programs with shared memory and i do these:

int main() {
int a=5,b=7;
int buffer[1];
int *point;
int shmid;
...
Forum: Programming 12-09-2011
5,151
Posted By tafazzi87
i use gcc 4.6.1 under ubuntu 11.10 thanks...
i use gcc 4.6.1 under ubuntu 11.10


thanks a lot i solved this problem :rolleyes:
Forum: Programming 12-09-2011
5,151
Posted By tafazzi87
[SOLVED]C: error in wait system call
i made this program but when i compile this code, compiler make this error, is an error on wait() system call but argumenti is right, or not?:

esercizio.c:80:9: error: incompatible type for...
4,073
Posted By tafazzi87
i solved with this code: if [ $(echo...
i solved with this code:

if [ $(echo $LETTER|grep '[A-Z]') ]; then
lettera=`echo $LETTER|tr [A-Z] [a-z]`;
fi;
4,073
Posted By tafazzi87
yes but i must put the letter translate into...
yes but i must put the letter translate into $LETTER
4,073
Posted By tafazzi87
[Solved] check if chars is a capital letter and translate it
how can i check if
read -n 1 LETTER;
LETTER is a capital letter and after translate in minuscule.
i have thought with:
tr [A-Z] [a-z]
or no?
18,937
Posted By tafazzi87
[solved] how to check if two arrays are equals?
how to compare to arrays to check if each elements of the first are the same of the second?

for ((i=0;i<$LENGTH;i++)) ; do
for (j=0;j<$LENGTH;j++)) ; do
if [ ${ARR1[i]} ==...
1,343
Posted By tafazzi87
if the user at the first read command insert "a"...
if the user at the first read command insert "a" at the next iteration of while the user can insert [b-z]... if the users insert "f" the next [b-z] but without "f" and so on...
1,343
Posted By tafazzi87
read into a range of character
i have this problem:
i must hide a string with a character such as _ by command
WORD=string;
XXX=`echo $WORD | sed 's/[a-z]/_/g'
but after, users must send in input a character and i must to...
8,392
Posted By tafazzi87
thanks a lot :D
thanks a lot :D
8,392
Posted By tafazzi87
thanks :D ---------- Post updated at 01:34...
thanks :D

---------- Post updated at 01:34 PM ---------- Previous update was at 10:11 AM ----------

instead if i want to put every chars on a different variables for each chars?
8,392
Posted By tafazzi87
last=${#VARIABLE} for ((i=0;i<$last;i++)) ; do ...
last=${#VARIABLE}
for ((i=0;i<$last;i++)) ; do
CAR=${VARIABLE:i:1};
echo $CAR;
done
Showing results 1 to 25 of 30

 
All times are GMT -4. The time now is 06:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy