tags:

views:

77

answers:

3

I am porting some Solaris code to Linux. This code uses the Solaris-specific door functions.

Is there a Linux equivalent? I found a couple of examples but they dont't appear to have been updated for many years.

http://www.rampant.org/doors

http://sourceforge.net/projects/ldoor

Thanks for any help. NickB

+1  A: 

Linux does not have doors, as you already know. Doors are a kind of different RPC mechanism. You are pretty much going to have to recode using shared memory. Or use an API.

There is an API that is not actively maintained:

http://www.rampant.org/doors/

jim mcnamara
A: 

Wiki says it is an RPC and Solaris-specific at that. On Linux for RPC you can use Corba for the purpose. Googling for "Linux Corba" shows lots of hits.

As portability apparently becomes a concern, first, before the actual porting, converting the application to use some portable RPC framework (Corba probably the most portable) makes a lot of sense. If portability isn't concern then the D-Bus seems has became the de facto standard for the IPC on Linux.

Door's article on Wikipedia also mentions that the mechanism also allows to pass list of file descriptors back and forth. On Linux check man 7 unix for SCM_RIGHTS.

Dummy00001
A: 

Solaris doors are a speed bastard. For example, call to the door in an another process shares the same process scheduler's timeslice of the caller. I really doubt you can get this with Corba and if doors in your application are used because of its speed, you may run into performance problems. I would suggest you to use another unix IPC(already mentioned shared memory, ... ), but that of course depends on your application.

Peter Vrabel