delorie.com/archives/browse.cgi | search |
> 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |