9fans archive / 1995 / 12 / 59 /    prev next

From: G. David Butler gdb@dbS...
Subject: Permissions on names served by the kernel
Date: Wed, 20 Dec 1995 14:06:33 -0500

Hi all!

I am running into an interesting problem.  I have been working on
getting the LP subsystem up using a PostScript printer connected
to the COM port of my PC cpu server.  It all works great (after
creating a "postio" and fixing lpdaemon) from the cpu server console.

When printing from a terminal (yes tcpsend works now) or from
a cpu window on the terminal,  the postio program can't do I/O to
/dev/eia0 since it doesn't have permissions.

The question.  How do you change the permissions of a file that is
served by the kernel?  Since the lpdaemon runs as "none" and the
permissions on #t/eia0 are 660 bootes bootes, it won't work.

Also, is there a problem binding something like '#t' in multiple
processes and doing I/O?

If the answer to the question is "you can't" (that is what it looks
like), it would seem my only alternative is to start up a process on
the cpuserver that keeps an eye on the print queue and fires up the
daemon.  Perhaps using pipe(3) to synchronize the spooler and daemon?

I would like to see a discussion about unrelated namespace processes
binding '#|" for IPC.  Does this work or does each bind create
another pair of fd's?  There are some things about this local
namespace that makes one feel uncomfortable.

If anyone has a better idea or a different view of the whole issue,
I would appreciate any input.

(As soon as I get it all to work, I will make it available.)

Thanks.

db