This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Connect system call in SCO
- From: Robert Lipe <robertlipe at usa dot net>
- To: "Rakshit Karnavat , Gurgaon" <rakshit at ggn dot hcltech dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 13 Dec 2001 08:37:26 -0600
- Subject: Re: Connect system call in SCO
- References: <5F0021EEA434D511BE7300D0B7B6AB5301AAD650@MAIL2>
> think it is the problem with the connect system call itself, when it
> fails.
Since OpenServer doesn't really support threads, the system calls
have no way of knowing if they're threaded or not. (In fact, this is
one of the major reasons that the various "strap-on" threads packages
for OpenServer can be such a bumpy road; they have to do all sorts of
wrapping themselves.)
> I am using FSUPthreads, as the thread support on SCO.
I just pulled FSUpthreads 3.5 from ftp.caldera.com/skunkware.
> The example program which confirmed it is attached.
> It is a client program. Just make it fail at the connect system call.
> I gave a wrong server IP to
> make it fail.
> Any hints.
You didn't describe what constitutes failure or success or include
sample compilation lines, but I was able to to build and run your
program just fine.
$ gcc c.cpp -lgthreads -lsocket && ./a.out
INSIDE THE THREAD
Of course, if you get the library link order wrong, you'll get different
results:
$ gcc c.cpp -lsocket -lgthreads && ./a.out
INSIDE THE THREAD
normal -2146743556
Main : Unknown error
result of connection in loop no 1 ---1--
Are you seeing something else completely? I'm thinking this isn't a g++
thing at all...
RJL