10-27-2008
Well, I'm not sure why this is happening, but I suggest you install a signal handler on your UNIX socket process. The signal handler will forcefully shut down any and all sockets upon receipt of a signal or at the program's exit. It could be that for some reason, normal program termination does not close those sockets.
10 More Discussions You Might Find Interesting
1. Programming
Hello there chaps.
First of all, i'm no TCP/IP-wiz, so forgive me if this is a stupid question.
I've been messing around with filetransfer using sockets, and there is one thing that confuses me.
This is how it's set up:
A server app listens on a port for a client connection.
When it... (3 Replies)
Discussion started by: crippe
3 Replies
2. UNIX for Dummies Questions & Answers
If I do a netstat -a I can see all the sockets currently open, is there a way that I can tell which application is holding open these sockets ? (3 Replies)
Discussion started by: murphyboy
3 Replies
3. Programming
Hi all,
I'm writing a socket program which sends a structure from one machine to another. When I run my client first time it runs well, however after the first time I couldn't receive all the data inside the structure (it is like, half of the array is received and the other half is not set). I... (1 Reply)
Discussion started by: SaTYR
1 Replies
4. Programming
Hi,
I am having an issue with using sockets.
I have a program which binds to a socket and listen on it. Later I spawn a thread to handle some function. In the new thread created I need to call a shell script which executes the specified function. Here I am using a system command to call the... (5 Replies)
Discussion started by: Janardhanbr
5 Replies
5. Programming
Hello,
I'm trying to write a small c application to test a tcp port. This works fine for the most part but the default timeout on the connect is very long. I have been reading many posts but and it looks like I need to set the socket to be non-blocking and poll for a result. I have been totally... (2 Replies)
Discussion started by: tjones1105
2 Replies
6. IP Networking
Hello,
Our software is using a TCP socket (AF_INET, SOCK_STREAM) to communicate with an Ethernet device. When we send a message, the message object writes itself in full onto the socket's stream buffer before the software invokes send() from socket.h.
I'm still researching, but have 2... (1 Reply)
Discussion started by: bix_20002000
1 Replies
7. Shell Programming and Scripting
Hello all,
I have a requirement to read and write to a tcp socket from an HP-UX shell script. I see a /dev/tcp character device on my servers:
crw-rw-rw- 1 root root 72 0x00004f Mar 28 18:37 /dev/tcp
So I believe this is what I should use. The problem is that all the... (2 Replies)
Discussion started by: lupin..the..3rd
2 Replies
8. Solaris
I installed a fresh copy of Solaris 7 and present up my ip and domain for my web services but when I try to connect to it I get the following error;
TCPActiveOpen: connect failed tcp/192.168.1.148/7900: 146 (Connection refused).
the port is open in my router but I don't no were to add it in... (5 Replies)
Discussion started by: Wpgn
5 Replies
9. Solaris
I been looking for a good guide or some help on how to install and setup TCP-MUX protocol socket on my Solaris 7 servers.
Can anyone point me in right direction of help me ?
Thanks (5 Replies)
Discussion started by: Wpgn
5 Replies
10. AIX
Hi
The clients connect to my server -using port 9130. But no client could connect to my server at this time. I've checked already and this is the result
netstat -Aan|grep -v 127.0.0.1|grep 9130|pg
f10006000abcb398 tcp4 10313 0 10.0.89.81.9130 10.158.70.24.1705 CLOSE_WAIT... (8 Replies)
Discussion started by: bobochacha29
8 Replies
sigset(3C) sigset(3C)
NAME
sigset(), sighold(), sigrelse(), sigignore() - signal management
SYNOPSIS
DESCRIPTION
The system defines a set of signals that can be delivered to a process. The set of signals is defined in signal(5), along with the meaning
and side effects of each signal. An alternate mechanism for handling these signals is defined here. The facilities described here should
not be used in conjunction with the other facilities described under signal(2) and sigspace(2).
allows the calling process to choose one of four ways to handle the receipt of a specific signal. sig specifies the signal and func speci-
fies the action handler.
sig can be any one of the signals described under signal(5) except or
func is assigned one of four values: or a function address. The actions prescribed by and are described under signal(5). The action pre-
scribed by and function address are described below:
Hold signal.
The signal sig is held upon receipt. Any pending signal of this signal type remains held. Only one signal of each type
is held.
Note: the signals and cannot be held.
function address Catch signal.
func must be a pointer to a function, the signal-catching handler, that is called when signal sig occurs. specifies that
the process calls this function upon receipt of signal sig. Any pending signal of this type is released. This handler
address is retained across calls to the other signal management functions listed here. Upon receipt of signal sig, the
receiving process executes the signal-catching function pointed to by func as described under signal(5) with the follow-
ing differences:
Before calling the signal-catching handler, the defined action of sig is set to During a normal return from the signal-
catching handler, the defined action is restored to func and any held signal of this type is released. If a non-local
goto (longjmp(3C)) is taken, must be called to restore the defined action to func and release any held signal of this
type.
holds the signal sig. restores the defined action of sig to that specified previously by and are used to establish critical regions of
code. is analogous to raising the priority level and deferring or holding a signal until the priority is lowered by
sets the action for signal sig to (see signal(5)).
RETURN VALUE
Upon successful completion, returns the previous value of the defined action for the specified signal sig. Otherwise, a value of is
returned and is set to indicate the error. is defined in
For the other functions, a 0 value indicates that the call succeeded. A -1 return value indicates an error occurred and is set to indicate
the reason.
ERRORS
fails and the defined action for sig is not changed if any of the following occur:
The func argument points to memory that is not a valid part of the process address space. Reliable detection of this
error is implementation dependent.
and and fail and the defined action for sig is not changed if any of the following occur:
sig is not a valid signal number.
An attempt is made to ignore, hold, or supply a handler
for a signal that cannot be ignored, held, or caught; see signal(5).
WARNINGS
These signal facilities should not be used in conjunction with signal(2) and sigspace(2).
SEE ALSO
kill(1), kill(2), pause(2), signal(2), sigspace(2), wait(2), abort(3C), setjmp(3C), sigpause(3C), signal(5).
STANDARDS CONFORMANCE
sigset(3C)