This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re[6]: vmstat

> 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
b) my build environment
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]