This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
Re: Re[6]: vmstat
- From: "Chris January" <chris at atomice dot net>
- To: "Pavel Tsekov" <cygwin-apps at cygwin dot com>
- Cc: <cygwin-developers at cygwin dot com>
- Date: Thu, 4 Jul 2002 16:21:07 +0100
- Subject: Re: Re[6]: vmstat
- References: <OF9302AC86.0EB950DE-ON85256BE4.005579C2@isn.instinet.com> <00b901c21df9$1c9e3df0$0100a8c0@advent02> <20020627163750.GA27819@redhat.com> <010901c21dfa$de6d74e0$0100a8c0@advent02> <3D1B5A59.7090609@ece.gatech.edu> <3D1B92A6.4020707@ece.gatech < <001601c22365$9e42eb50$0100a8c0@advent02> <14716164963.20020704162722@syntrex.com>
> CJ> uptime reads the /proc files regardless of what options you pass.
>
> int main(int argc, char *argv[]) {
> if(argc == 1) print_uptime();
> if((argc == 2) && (!strcmp(argv[1], "-V"))) display_version();
> return 0;
> }
>
> How ?
Try re-compiling with print_uptime commented out. Notice how it works. Now
put print_uptime back in. Notice how it doesn't work, regardless of what
arguments you pass. Magic!
Run it in gdb - notice how it doesn't reach the first line after main().
Notice how stepping assembly instructions the program wanders off into
invalid memory.
Sorry, but I have no idea why this happens. It does *not* happen with my own
build of the Cygwin DLL. With this, all the procps utilities work fine. This
would suggest something is seriously wrong with:
a) the 1.3.12 DLL
or
b) my build environment
or
c) a combination of both
It would be greatly appreciated if you could build the package yourself and
see what happens. If you still see the same problem, this would suggest a
problem with the DLL. If not, this would suggest a problem with my build
environment.
Chris