Re: problem handling POSIX thread on FreeBSD

2005-06-29 Thread Pablo Mora
>Not sure I understand the question. What do you mean by S.O? , sorry by my badly english, the correct word is O.S (operative system). >you saying that since the threads are POSIX, that you would >expect the program to act the same on all Operating Systems? exactly, that thought before your a

Re: problem handling POSIX thread on FreeBSD

2005-06-28 Thread Pablo Mora
S.O , sorry -- Concepción, Chile. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: problem handling POSIX thread on FreeBSD

2005-06-28 Thread Pablo Mora
Ok, I understand, but by being threads POSIX should be executed of the same one in any type of S.OR? thanks to all -- Concepción, Chile. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscrib

Re: problem handling POSIX thread on FreeBSD

2005-06-26 Thread Pablo Mora
/* file: test.c */ #include #include #include #include #include char buffer[512]; pthread_mutex_t mutex, mutex2; pthread_t hilo1, hilo2; void f1(void* ptr) { int i,n=10; int valor=0; char*p=(char*)ptr; for(i=0;ihttp://lists.freebsd.org/mailman/listinfo/fr

Re: problem handling POSIX thread on FreeBSD

2005-06-26 Thread Pablo Mora
Hi, very thanks you... i running fbsd v4.11 stable. -- Concepción, Chile. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

problem handling POSIX thread on FreeBSD

2005-06-26 Thread Pablo Mora
/* file: taller.c */ int main() { if(pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM) != 0) /* handler */ } $ gcc taller.c -pthread $ ./a.out pthread_attr_setscope: Unknown error: 0 $ PTHREAD_SCOPE_SYSTEM fail on freebsd ? help me please... very thanks... -- Concepción

Re: help me with C languaje please, re: files.

2005-06-04 Thread Pablo Mora
#include #include int main(void) { FILE *p_to_f; char buf[1024]; int i, j = 0; p_to_f = fopen("test","r"); if(p_to_f == NULL) { perror("fopen"); exit(EXIT_FAILURE); } for(i = 0; i < 4 && !feof(p_to_f); i++) { fgets(buf,1024,p_to_f); printf("%s", buf); } fclose(p_to_f); re

help me with C languaje please, re: files.

2005-06-04 Thread Pablo Mora
Hi all, I am programming in C and I need to read a quantity of lines of a file. How can I know when a line arrives at his end? exists some special character? exists some file in C in the kernel of FreeBSD (4.11) where I can find somewhat similar? example: how read four lines of a file. thank

Re: Files in C.

2005-05-04 Thread Pablo Mora
Greg, i am going to keep in mind your words. In fact I expect to guide me for more than an opinion. Hopefully they accept occasionally some my code written in C so that they help me to perfect it and i hope be not an inconvenience. PD. Any objection with the previous thing tell it to me please.

Re: Files in C.

2005-05-04 Thread Pablo Mora
thanks to all by responding me, I will have present each one of its mail PD. I thank to the community of FreeBSD by facilitating me its aid. TnX from Chile. -- Concepción, Chile. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/

Re: Files in C.

2005-05-04 Thread Pablo Mora
what do they think of the book: Advanced Programming In The Unix Environment (Richard Stevens) ?? is a good option to learn C on Unix ? -- Concepción, Chile. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd

Re: Files in C.

2005-05-03 Thread Pablo Mora
Thanks by responding me. I will revise each direction that have given me and truly I thank it a lot. -- Concepción, Chile. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any m

Files in C.

2005-05-03 Thread Pablo Mora
I know that this is not the place to consult on programming C. But I am so enthusiastic in FreeBSD that I want to learn more on the language C and someday coming to be a small part of which you already are. It wanted that they recommended to me some webpage where to be able to obtain information