From: jayshankar nair <n_jayshankar@yahoo.com>
To: pthreads-win32@sourceware.org
Subject: pthread related issues
Date: Mon, 22 Dec 2008 07:22:00 -0000 [thread overview]
Message-ID: <46333.1920.qm@web55808.mail.re3.yahoo.com> (raw)
Hi,
I have installed windows pthread-win32 pthreadGC2 dll(WINDOWS XP). I see my multithreaded windows program crashing at different locations when i am handling I/O. If i use gdb, the program is able to run. For the below program sometimes crahes at ifstream fin(..)
int ConfigData::fillConfigData(char *p_cFileName)
{
int iStatus = 1;
char pcPort[10];
ifstream fin(p_cFileName, ifstream::in)---> crashes sometimes here.
//fin.getline(m_pcUrl,MAX_URL_LEN);
//cout << "----- fillConfigData URL :" << m_pcUrl<<endl;
fin.getline(pcPort,10);
m_iPort = atoi(pcPort);
cout << "----- fillConfigData port :" << m_iPort << endl;
fin.getline(m_pcMethod,MAX_CALLBACK_METHOD_NAME_LEN);
cout << "----- fillConfigData method: " << m_pcMethod<< endl;
}
I am able to run the same program with linux.
For compilation, i include -lpthreadGC2(libthreadGC2.dll). I have tried compilation both with and without -mthreads options. But the problem persists.
Am i missing something.
Suggestions appreciated.
Thanks,
Jay
next reply other threads:[~2008-12-22 7:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-22 7:22 jayshankar nair [this message]
2008-12-22 13:19 ` John E. Bossom
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46333.1920.qm@web55808.mail.re3.yahoo.com \
--to=n_jayshankar@yahoo.com \
--cc=pthreads-win32@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).