R
Razzel
I created this as a test:
#include <time.h>
main(){
printf(X1: %s\n", putim());
printf(X2: %s\n", putim());
}
putim() {
time_t t;
time(&t);
return(ctime(&t));
}
It works and gives me the time of day and date just like "date" command
in linux.
When I use this in a data collection program where I also use sleep commands
(not encompassing any of the above) I get a segmentation fault at/after
the return.
Admittedly, the compile in both cases produces a warning
"return makes integer from pointer without a cast."
Since this is not effecting the test above why is it or the use of sleep
functions killing me with a seg fault?????
Any suggestions would be helpful
Dan
#include <time.h>
main(){
printf(X1: %s\n", putim());
printf(X2: %s\n", putim());
}
putim() {
time_t t;
time(&t);
return(ctime(&t));
}
It works and gives me the time of day and date just like "date" command
in linux.
When I use this in a data collection program where I also use sleep commands
(not encompassing any of the above) I get a segmentation fault at/after
the return.
Admittedly, the compile in both cases produces a warning
"return makes integer from pointer without a cast."
Since this is not effecting the test above why is it or the use of sleep
functions killing me with a seg fault?????
Any suggestions would be helpful
Dan