home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume3 / xenix-fuser / README < prev   
Encoding:
Text File  |  1989-02-03  |  2.1 KB  |  46 lines

  1. [  This has been ported to SCO Xenix for the Intel 80386.  There are
  2.    two versions of the program.  The differences were large than the
  3.    entire sharchive, so I saw no point in including context diffs.
  4.    The Makefile should explain everything.  Ideally, the machine
  5.    dependencies would be separated into different files. - john. ]
  6.  
  7. [  This program takes a filename, searches the kernel's open file
  8.    table, and determines who has that file open.  You can to kill the
  9.    offending process(es).  This is useful for backups, e.g.  A port of
  10.    this to BSD and other Unices would be nice.  --r$  ]
  11.  
  12. Here is the latest source to my version of the fuser(1M) command, written
  13. and running on the Unix PC.  A man page and makefile are included.
  14.  
  15. Verify that the macros in "Makefile" are correct for you (LBIN, for example
  16. should be where you want the program to be installed), and run make AS ROOT.
  17. It is important to do the make as root so that the resulting program will
  18. have the set-uid bit set, allowing it to read the kernel's memory.
  19.  
  20.  
  21. Some notes to anyone who wants to port this program to something other
  22. than the Unix PC:
  23.  
  24. The Unix PC has "tunable kernel parameters", which mean that things that
  25. are constants on most older Unix systems are variable.  This version of
  26. fuser reads the values of these variables from the kernel's memory.  I have
  27. tried to make most of this transparent, for ease of porting to a more plain-
  28. vanilla Unix.  For example, I have 'int' varialbes called 'NOFILE', 'NPROC',
  29. etc., which emulate the #defines present in 'standard' Unix.  To make it
  30. run on such systems, it should be possible to remove these variables and
  31. the code that sets them, and the program will use the #defines from
  32. <sys/*.h>.  The only other significant change is that because NOFILE is
  33. variable, the u_ofile field in the user structure is a pointer rather than
  34. an array.  This means that you can delete the code that copies the u_ofile
  35. list since it is already right in the user structure.
  36.  
  37.  
  38.                     -=] Ford [=-
  39.  
  40. "GNU does not eliminate            (In Real Life:  Michael Ditto)
  41. all the world's problems,        kenobi!ford@crash.CTS.COM
  42. only some of them." -rms        ...!crash!kenobi!ford
  43.  
  44.  
  45. Here's the shar file:
  46.