Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: Steven Cox <steven.cox@vega.co.uk>
Subject: Re: X.25 for Digital UNIX
Date: 1998/04/16	[thread overview]
Message-ID: <3535B382.908C60F2@vega.co.uk> (raw)
In-Reply-To: 3534C83B.6818@vf.vodafone.co.uk


Paul Black wrote:
> 
> I don't think it uses standard file descriptors. The way we handled this
> is to do a poll() for 1 second then to do a non-blocking poll on the X25
> side for each open port. To be honest, it is messy. In the software
> being
> developed, it has to handle up to 120 X25 connections - I'm waiting to
> see how well the approach we've taken scales.
> 
> A contingency plan would be to create the X.25 stuff in another process,
> fork that and have one writing and one reading the X.25 stuff in
> blocking
> mode and communicating with the orignal parent through pipes.  I'm not
> sure
> of the gotchas hiding in that idea.
> 
The software is already forked as another process.  There are 255
simulated devices, connected in a mesh.  Of these, 3 can be real
(requiring real X.25 links).  A total of 765(!) X.25 links are required,
and so 765 processes are required (since our software uses a concept of
microservers to stop the simulator being blocked).  Luckily we have a
beefy computer to cope with this (and the simulation, and the TCP/IP
links...).  We hope.  The only gotchas we have found in that idea is
where a blocking function in the microserver process will make it tricky
to see if a command, or data has been sent to it.  By sending data down
a pipe from the simulator to a microserver, and then following this with
a SIGUSR1 signal, the microserver will interupt, and the appropriate
action can be taken.

> > I have also tried sending SIGUSR1 to the process, but this just
> > interupts the X25 call with an undefined error (not X25RC_SYSERR with
> > errno set to SIGUSR1 as I was informed).
> 
> Is errno set to EINTR (interrupted system call)?
> 
> Paul

After experimentation, I noticed that errno is set to EINTR.  Since we
only trap the SIGUSR1 signal in the microserver, checking to see if the
return value from any blocking X.25 library function is EINTR should be
a safe way of telling if the SIGUSR1 signal has been sent.

Cheers for the help, it seems that the problem is solved!!  Ace.


Steve.



      reply	other threads:[~1998-04-16  4:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-15  4:00 X.25 for Digital UNIX Steven Cox
1998-04-15  4:00 ` Paul Black
1998-04-16  4:00   ` Steven Cox [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox