Hi RRick,
Thanks Very much for your help, this will give me lots to get my teeth into
Thanks again
RabidMoney
User Profile
Collapse
-
sorry here as an example of the log file cat from terminal...
granit:/mnt/md0/home/damian/ai/tree/Database# cat 1191276062.1016 000202.log
2 reset daycount
3 loadgeneticpair
4 ./Database/1191276062.1016 000202.gen
5 loading
6 end loadgenticpair. ....granit:/mnt/md0/home/damian/ai/tree/Database#Leave a comment:
-
debian C defunct process.... why
Hi I have the following code which is basically a function to open a file and load the data into a memory file (bob), i have a basic logging feature (logs to a text file) you will notice the last line "logfile" at which point this is where the program terminates as far as the log is concerned. where it is supposed to drop back to a main function where there is another immediate "logfile" but this never seems to get logged. and... -
I have decided to go the route of flockfile() as i can incorporate it into my code easy enough i have compiled and all seems to be going well, so i will move onto the next bug :)
This file locking business with threads seems to be a complicated but interesting number which i will come back to at a later date and research more on mutex and semaphores, but for the time being thanks very much for you help in pointing me in the right direction....Leave a comment:
-
Thank you very much i will take this onboard and research in that direction... This would also explain why the other programs crash intermittently too.
so do you think that a file locking scenario where before a program tries to write to a data file it checks to see if its locked and if not locks it, does its write function then unlock it?
Thanks again
Rabid MonkeyLeave a comment:
-
intermittant segfault on file access with fopen
Hi all, I get a seg fault on the following line of code but not every time only after the program has been running for a while and has done the routine a few times successfully...
FILE * geneticfileP;
geneticfileP = fopen ("./Database/tempchild.gen", "w");
I have tried hunting this down logically but there are other programes accessing the file too so I would much appreciate if someone could... -
-
-
I have it sussed out it was errno 29 an illegal seek and turned out to be a path name problem in the child proccess..
incidently its not important but how do I make my programs executable without using the preceeding dot slash ?Leave a comment:
-
execlp works for other executable but not mine :(
Hi all,
I have written a server & child program both are working fine but when the server tries to execute the child program with the line
execlp("child", "child", parameter, NULL );
nothing happens it does not call it, yet if I test the above line by substituting child with a system binary like pwd or ls it calls it without trouble. I have used the command "chmod a+x child" to... -
-
Thanks Banfa, I feel soooo silly now :)
So now I can convert those numbers to their binary equivalent and fill out a
char array[32] with zero's and ones and I have a representation of the float in binary. Thanks for that but in reference to willakawill's answer am I right in saying I should not have a problem so long as my server app is writing float to memory only and the client is readonly? (its a data feed going to many...Leave a comment:
-
Union as a converter
Hi all, briefly I am writing a client server app that communicates over shared mem (which is all fine) but I seemed to be stumped on using a union to convert from float to another type. ultimatly what I am trying to achieve is the server writes a 32 bit float to shared memory and the client accesses this and interperets it as an array of boolean chars eg "001101011. ..." I have this rough code that uses a union from float to char[4] (not...
No activity results to display
Show More
Leave a comment: