I have a program I'm trying to get to work under Posix that uses BSD
sockets to send a UDP packet to a server and then wait for a response.
 
Like most unix programs it uses alarm() as a timeout function to wake
itself up if no response is received (sockets has no timeout feature
for recvfrom() apparently).  My problem is that the current signals
implementation in MPE/iX (at least on 5.0) will not deliver the alarm
signal while the process is waiting in system code (the recvfrom), thus
rendering the alarm utterly useless.
 
Anyone know of any workarounds for this?  Currently I'm thinking of:
 
A) Rewrite all the networking calls to use NetIPC instead of sockets.
 
-or-
 
B) fork off a son process to send a 'wakeup' UDP message so that the
alarm can be delivered.
 
Are there any other solutions I'm missing?  Anyone know what happens
if you try to mix NetIPC and sockets calls on the same socket
descriptor (I'm assuming this would not work).
 
G. (awaiting moderation)