guile-user
[Top][All Lists]
Advanced

[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

Attachment: client.scm
Description: Text document

Attachment: server.scm
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]