View previous topic :: View next topic |
Author |
Message |
Geoff Russell n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Blade Runner/movie_blade_runner_howl.gif)
Joined: 28 Apr 2004 Posts: 16
|
Posted: Mon Jan 10, 2005 11:08 pm Post subject: Writing /proc type programs |
|
|
As I understand it, when a program reads a file in /proc, there is no actual file, just a program that gets called to simulate a
file. Can the same functionality be achieved outside of
the /proc filesystem?
I want to point a Crystal Reports ODBC XML driver at
a file and have my program called to generate the contents
on the fly based on the name of the file which the
driver opens.
Any pointers in the right direction will be greatly appreciated. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
scarr Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/19388791740e344b7f367a.gif)
Joined: 24 Jun 2002 Posts: 88 Location: Lebanon, TN
|
Posted: Tue Jan 11, 2005 1:48 am Post subject: |
|
|
This would depend on how the Crystal Reports XML driver works.
More than likely it doesn't execute the file, it just reads from it. What you could do though is write your program to populate the file before the report is run.
/proc is part of the linux kernel. So it knows what to run when a file is called from that directory. If you used the XML ODBC driver it would have to know that the file is a script or program and run it to get the output. _________________ Scott Carr * OpenOffice.org * Documentation Maintainer
http://documentation.openoffice.org
jabber: scarr@progbits.com |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Geoff Russell n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Blade Runner/movie_blade_runner_howl.gif)
Joined: 28 Apr 2004 Posts: 16
|
Posted: Tue Jan 11, 2005 2:17 am Post subject: /proc |
|
|
The whole aim is precisely not to do anything until the
report accesses the file - at which point a program would
be called to generate the required data.
cat /proc/timetable/north would generate
xml data for the CURRENT state of the northern timetable.
My understanding of the driver is that yes, it just reads
files - and I have no control over its operations (not being
open source!). |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
alv n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/40902655420e5d84bfacd.jpg)
Joined: 06 Sep 2004 Posts: 58
|
Posted: Wed Jan 12, 2005 6:30 pm Post subject: LUFS and similar things. |
|
|
You should take a look at LUFS and other user-mode based filesystems.
Link to Lufs:http://lufs.sourceforge.net/lufs/
Basically the idea is that they provide in the kernel drivers, and execute whatever you want when the file operations are called.
Be careful though, as improperly coding these may be a security risk. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Geoff Russell n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Blade Runner/movie_blade_runner_howl.gif)
Joined: 28 Apr 2004 Posts: 16
|
Posted: Thu Jan 13, 2005 12:29 am Post subject: So far... |
|
|
Thanks, lufs looks like a definite possibility.
Also using the amd automounter looks a little more ugly but
possible since you can configure arbitrary co
The fallback solution is to keep track of all updates to
the necessary tables and refresh the xml when appropriate. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
alv n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/40902655420e5d84bfacd.jpg)
Joined: 06 Sep 2004 Posts: 58
|
Posted: Wed Jan 19, 2005 1:10 pm Post subject: |
|
|
Actually it seems that lufs is a bit dated, and FUSE is supposedly the new thing.
http://fuse.sourceforge.net/ |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|