kod programu :
#include<stdio.h>
#include<stdlib.h>
#include<fcntl.h>
#include<string.h>
#include<unistd.h>
#include<sys/stat.h>
#include<sys/types.h>
int main(int argc, char *argv[]){
char *home = getenv("HOME");
char *FIFOR = malloc(sizeof(home)+20);
char *FIFOW = malloc(sizeof(home)+20);
int fifo_r;
int fifo_w;
int dl;
int id;
char name[20]="\0";strcpy(FIFOR,home);
strcat(FIFOR,"/tmp/klientfifo");
printf("%s\n",FIFOR); //wypisuje dobrze
strcpy(FIFOW,home);
strcat(FIFOW,"/tmp/serwerfifo");
printf("%s\n",FIFOW); // wypisuje dobrze
printf("%s\n",FIFOR); // !!!!!!!!!!!!!1 a tu to zrobil sobie polaczenie typu strcat(FIFOR,FIFOW); !!!!!!!!!!!!
// i dalej jeszcze ale tamto juz nie gra roli
Czy u was moze tez wyzuca cos takiego?
tomek zaj06 $ ./klitis
/home/users/tomek/tmp/klientfifo
/home/users/tomek/tmp/serwerfifo
/home/users/tomek/tmp/klientfifo/home/users/tomek/tmp/serwerfifo
tomek zaj06 $
_______________________________________________ pld-users-pl mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-users-pl
