Re: old_procfs.h and large file environment
From: Joerg Schilling (js_at_cs.tu-berlin.de)
Date: 11/29/04
- Next message: Drazen Kacar: "Re: old_procfs.h and large file environment"
- Previous message: Daniel Haude: "Re: A GNU autotools question"
- In reply to: Roger Faulkner: "Re: old_procfs.h and large file environment"
- Next in thread: Roger Faulkner: "Re: old_procfs.h and large file environment"
- Reply: Roger Faulkner: "Re: old_procfs.h and large file environment"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 Nov 2004 10:53:02 GMT
In article <a412da98.0411282219.4bc9b042@posting.google.com>,
Roger Faulkner <roger.faulkner@sun.com> wrote:
>The /proc data structures defined in <sys/procfs.h> and
><sys/old_procfs.h> contain types, such as 'off_t' which
>are redefined by the large file compilation environment
>(32 bit types vs 64 bit types).
...
>There are several things you can/should do:
>
>1. Put the code that uses the /proc interfaces in
> separate source files and compile them without
> using the large file compilation environment.
> Be careful not to pass objects like 'struct stat'
> between functions compiled with and without the
> large file compilation environment (just be careful).
This seems to be a feasible solution, but.....
>2. Use the new structured /proc interfaces rather than
> the old ioctl-based interfaces (include <procfs.h>
> rather than <sys/procfs.h> and change your ioctl()s
> into lseek())/read()/write() or better, pread()/pwrite()).
This leads me to the question whether the existence of <procfs.h>
is an authoritive (and OS independent) answer to the question
whether there is a procfs-II interface.
It seems that SCO UnixWare does not have <procfs.h> but only
<sys/procfs.h> and does not even include procfs-I compatibility.
So how is it possible to find whether a procfs-II interface is available?
Is it the absence of the PIO* macros?
>3. Since a 32-bit process cannot examine or control a
> 64-bit process but a 64-bit process can examine/control
> a 32-bit process, make your /proc application be 64-bit-safe
> and compile it as a 64-bit application on machines that
> support 64-bit applications (like opteron for Solaris 10
> or sparc since Solaris 7) and compile it as a non-large-file
> 32-bit application for machines that support only 32-bit
> applications (like x86 machines).
Does this mean that a 32 bit shell cannot retrieve statistical
informations about it's 64 bit children?
--
EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
js@cs.tu-berlin.de (uni) If you don't have iso-8859-1
schilling@fokus.fraunhofer.de (work) chars I am J"org Schilling
URL: http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily
- Next message: Drazen Kacar: "Re: old_procfs.h and large file environment"
- Previous message: Daniel Haude: "Re: A GNU autotools question"
- In reply to: Roger Faulkner: "Re: old_procfs.h and large file environment"
- Next in thread: Roger Faulkner: "Re: old_procfs.h and large file environment"
- Reply: Roger Faulkner: "Re: old_procfs.h and large file environment"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]