08-11-2009
Does it happen in a different thread?
10 More Discussions You Might Find Interesting
1. Programming
Hi all,
I have developed server/client application (using C) and tested it on the same machine .. but when I deploy them on different machines I get connection timeout.
Well .. server machine and client machine exists on different network segments, so there is a linux firewall box to route... (3 Replies)
Discussion started by: Agent007
3 Replies
2. Programming
Can anyone help? I'm trying to write a program which will write to a socket. I can get the server to run, but always get an error when I try to connect.
It gives me an error at the "connect" command.
It's probably a simple error, but I can't seem to find it.
#include <sys/socket.h>... (6 Replies)
Discussion started by: Stevhp
6 Replies
3. Programming
Hi,
I am trying to develop a simple program that uses Sockets. I have a windows machine and MUST use C++. I found out that I can use C's Socket (#include <sys/socket.h>) API calls, but this is only possible on a unix machine. So I installed Cygwin to imitate a unix environment on my windows... (4 Replies)
Discussion started by: wannabeTekkie
4 Replies
4. UNIX for Advanced & Expert Users
I am not able to receive the message on socket in the current process when its waiting for its child to exit.
code looks something like below
//in one thread of the current process
//thread 1
===============================================
int numBytes = read(sockid,buf,SIZE); //Now the... (2 Replies)
Discussion started by: swap007
2 Replies
5. Programming
Dear All,
I've searched many topics and googled many web-pages, but still I didn't found solution to this problem.
I want to set timeout for connect(). The thing is, that my code works only on BSD, on Linux (tested on SuSE box) it freezes at connect() call :(
bool
SomeFunc(std::string... (1 Reply)
Discussion started by: sggkxv
1 Replies
6. UNIX for Advanced & Expert Users
Hi,
I was porting ipv4 application to ipv6; i was done with TCP transports. Now i am facing problem with SCTp transport at runtime.
To test SCTP transport I am using following server and client socket programs. Server program runs fine, but client program fails giving Invalid Arguments for... (0 Replies)
Discussion started by: chandrutiptur
0 Replies
7. Programming
I wrote a program which will send a message to multiple clients(i.e, broadcasting) that are connected to a server.Once when the client receives a message from the server ,the client should read a file in the server and display it in the client.The client which responds (i.e, client wants all the... (3 Replies)
Discussion started by: vigneshinbox
3 Replies
8. Linux
Hello,
./configure script fails to configure libsf. Please check the following last few lines of configure script error.
checking for db1/db.h... no
checking for db.h... yes
checking for dbopen in -ldb1... no
configure: error: No libdb? No libsf.
But find command shows the following; ... (4 Replies)
Discussion started by: vectrum
4 Replies
9. IP Networking
Hi
My socket program is to communicate between the two systems connected with lan. Always i am getting an error saying bind value is -1 or not connected. ..If i run both the server and client programs in the same machine in two diff terminals they are working but they are not working between two... (3 Replies)
Discussion started by: Gurvareddy
3 Replies
10. AIX
Can somebody help me too identify full path to socket library on AIX? Cannot find anything
Thanks
for contribution (2 Replies)
Discussion started by: digioleg54
2 Replies
LEARN ABOUT NETBSD
pthread_suspend_np
PTHREAD_SUSPEND_NP(3) BSD Library Functions Manual PTHREAD_SUSPEND_NP(3)
NAME
pthread_suspend_np, pthread_resume_np -- suspend/resume the given thread
LIBRARY
POSIX Threads Library (libpthread, -lpthread)
SYNOPSIS
#include <pthread.h>
int
pthread_suspend_np(pthread_t thread);
int
pthread_resume_np(pthread_t thread);
DESCRIPTION
The pthread_suspend_np() function suspends the thread given as argument. If thread is the currently running thread as returned by
pthread_self(3), the function fails and returns EDEADLK. Otherwise, it removes the named thread from the running queue, and adds it to the
suspended queue. The thread will remain blocked until pthread_resume_np() is called on it. In other words, pthread_resume_np() resumes the
thread given as argument, if it was suspended.
RETURN VALUES
Both functions return 0 on success and an error number indicating the reason for the failure.
COMPATIBILITY
These functions are non-standard extensions.
ERRORS
The pthread_suspend_np() function may fail if:
[EDEADLK] The thread requested to suspend was the currently running thread.
[ESRCH] The supplied thread was invalid.
The pthread_resume_np() function may fail if:
[ESRCH] The supplied thread was invalid.
NOTES
Some pthread_suspend_np() implementations may allow suspending the current thread. This is dangerous, because the semantics of the function
would then require the scheduler to schedule another thread, causing a thread context switch. Since that context switch can happen in a sig-
nal handler by someone calling pthread_suspend_np() in a signal handler, this is currently not allowed.
In pthread_resume_np() the NetBSD implementation does not check if the thread argument is not already suspended. Some implementations might
return an error condition if pthread_resume_np() is called on a non-suspended thread.
SEE ALSO
pthread_attr_setcreatesuspend_np(3), pthread_self(3)
BSD
July 9, 2010 BSD