Final SUMMARY: Q: ioctl(fd, PIOCGETUTK, pr_utask);

From: Randy M. Hayman <haymanr_at_icefog.sois.alaska.edu>
Date: Thu, 28 Mar 96 16:07:58 -0900

The answer was to include the definition of SHOW_UTT, which I could have
sworn I tried once or twice or, ...

Thanks a bunch to John Kohl <jtk_at_atria.com> for the definitive.


Randy M. Hayman
haymanr_at_icefog.alaska.edu


my original posting follows:

|>I'm running DU v3.2D-1.
|>
|>I'm looking for a way to gather the 'uu_ioch' data for a process and
|>am currently attempting to use the procfs ioctl call PIOCGETUTK to get
|>a utask structure which I can glean this information from. The compilation
|>fails with:
|>
|>/usr/lib/cmplrs/cc/cfe: Error: get_user_info.c, line 127: Reference an
|>expression of void type or an incomplete type.
|> ioctl(fd, (0x40000000 | (( sizeof(struct utask) & 0x1fff
|> ) << 16) | (( ('F')) << 8) | ( (43))) ,
|> &pr_utask);
|> ------------------ ----------- -------------^
|>
|>
|>I have the following in my code:
|>
|>struct utask pr_utask;
|>...
|>fd = open(procfs_pid, O_RDONLY | O_NDELAY);
|>ioctl(fd, PIOCGETUTK, &pr_utask);
|>
|>I'm able to get PIOCCRED, PIOCGETPR, PIOCGETU, etc... data.
|>Apparently I'm not reading procfs.h correctly. Can anybody point me towards
|>some information such that I can get uu_ioch for a given process? Isn't
|>PIOCGETUTK implemented (PIOCGETTK isn't implemented either)? Is there a
|>better method?
|>
|>TIA
Received on Fri Mar 29 1996 - 02:27:47 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:46 NZDT