[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
about usage of `sigaction'
From: |
William Xu |
Subject: |
about usage of `sigaction' |
Date: |
Wed, 17 Jan 2007 13:29:55 +0800 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.92 (gnu/linux) |
Hi all,
i wrote a simple echo server/client. To catch SIGCHLD signal, i install
a signal handler before first `connect'. The problem is that when the
client exits, the handler seems not called. Instead, upon a new client
connected to the server, the handler will be called(due to last
client's exit).
To summarize,
,----[ first client ]
| $ guile -e main server.scm
| server started on localhost:10000
| New client(#(2 2130706433 54570)) incomming
|
| $ guile -e main client.scm
| connected to server
| hi
| hi
|
| $
`----
,----[ second client ]
| $ guile -e main server.scm
| server started on localhost:10000
| New client(#(2 2130706433 47200)) incomming
| child 16648 terminated
| New client(#(2 2130706433 47201)) incomming
|
| $ guile -e main client.scm
| connected to server
| hey
| hey
|
| $
`----
Can the signal handler be called as soon as the client exits?
Attchments are testing codes.
--
William
Work continues in this area.
-- DEC's SPR-Answering-Automaton
client.scm
Description: Text document
server.scm
Description: Text document
- about usage of `sigaction',
William Xu <=