![]() |
|
|
|||||||
| Home | Forums | Register | Rules & FAQ | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here! |
Other UNIX.COM Threads You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Very strange things happened in the shell function | tpltp | Shell Programming and Scripting | 2 | 03-30-2008 04:35 AM |
| Converting gettimeoftheday output to string | p_aishwarya | UNIX for Dummies Questions & Answers | 1 | 10-21-2007 06:13 AM |
| Strange problem | Asty | Shell Programming and Scripting | 2 | 08-10-2006 12:44 AM |
| Strange FTP problem | widder | HP-UX | 4 | 06-08-2006 06:17 AM |
| strange...problem | Prafulla | UNIX for Dummies Questions & Answers | 1 | 10-29-2001 09:19 AM |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Hi all,
I am using pthread_cond_timedwait function in my program, to generate the time period of waiting i use gettimeoftheday function. When i run the code after compiling i get a core dump error. However my program runs perfectly if i give a printf statement before the gettimeoftheday function. Can anyone explain this problem . I have pasted the part of the code for your reference:pthread_mutex_lock(&lock); //printf("After core dump \n"); gettimeofday(&tp, NULL); ts.tv_sec = tp.tv_sec; ts.tv_nsec = tp.tv_usec * 1000; ts.tv_sec += WAIT_TIME_SECONDS; pthread_cond_timedwait(&write, &lock, &ts); pthread_mutex_unlock(&lock); Thanks in advance, |
| Forum Sponsor | ||
|
|