I am not sure how I would use this, so my ideas of an appropriate interface are probably a bit off. For what it's worth, I would imagine a file system like the one mounted on /proc. One subdirectory per process. The files in the subdirectory would vary a bit depending on whether the job is finished, running or queued. In addition to the numbered directories there would be a special directory next, containing only the args file. Writing to /queue/next/args would create a job, which would then appear as a numbered directory like all the others. Feel free to ignore any of this if it doesn't fit your idea of what the spooler is for.
John ps Since I started writing this, Ron's answer has appeared. It may well be a better idea, since he has actually implemented it and therefore knows where the pitfalls are. > I'm the developer of a Unix program that may be useful in plan9, and > as an exercise, I'd like it to build in plan9 native. > > Now, I've written it assuming POSIX (int signals, PF_UNIX available, > BSD sockets API, ...). I know more or less some details on plan9 (per > process namespaces, network not in a library to link with, notes, > ...), but I barely know the 'common' use of the environment. > > My concern is that I need some local processes to communicate to a > local server. Now I use a SOCK_STREAM PF_UNIX in a path in /tmp, where > I suppose I can write. I think it's something I can suppose in a POSIX > system, but not in plan9. > How would you connect local processes (which can be launched at any > time) with a central server in plan9? Making that central server serve > a filesystem, where the clients write/read? > If I knew what's the path I should follow, I could think more easily > on a proper API for POSIX and Plan9 for my program. > > I may not have not worked in plan9 enough to deserve your attention, > but I hope a quick answer (even in the form of "man ___") will not > take much time. > > btw, the program I'd like to be able to run in plan9 is > http://vicerveza.homeunix.net/~viric/soft/ts/ . I wrote it because I > couldn't find anything similar to fit my needs, and maybe in plan9 you > already have something quick-and-useful for that purpose, and 'ts' > would not make any sense in p9 now. That's also something I'd be glad > to know. > > Thanks in advance, > Llu=EDs. -- John Stalker School of Mathematics Trinity College Dublin tel +353 1 896 1983 fax +353 1 896 2282
