summaryrefslogtreecommitdiffstats
path: root/winsup/utils/ps.cc
Commit message (Collapse)AuthorAgeFilesLines
* Don't leave Windows 2000 behind.Corinna Vinschen2011-12-221-21/+62
| | | | | | | | | * Makefile.in (ps.exe): Revert previous change. * ps.cc: Include psapi.h again. (main): In CW_GETPINFO_FULL case. Evaluate minimal process access mask required per OS and use that in OpenProcess call. Use GetModuleFileNameExW on Windows 2000 or if fetching the drive mapping failed. Handle empty process name.
* * Makefile.in (ps.exe): Drop -lpsapi from ALL_LDFLAGS.Corinna Vinschen2011-12-221-62/+33
| | | | | | | | * ps.cc: Don't include psapi.h. (dosdevs): Drop. (unicode_buf): Define. (main): Simplify path evaluation in CW_GETPINFO_FULL case. Fetch drive map from Cygwin DLL. Use it to convert NT device paths to Win32 paths.
* Clean up whitespace.Christopher Faylor2011-12-171-9/+9
|
* * ps.cc: Remove all Win 9x considerations. Use psapi functionsCorinna Vinschen2011-11-281-119/+15
| | | | | | | | directly. Drop support for older Cygwin DLLs. Just use progname_long as is since it's already a POSIX path now. Rename "tty" to "pty" as in the Cygwin DLL. Call setlocale to make sure wcstombs does the right thing according to the current locale. * Makefile.in (ps.exe): Link against psapi.dll.
* * Align usage output, version output, as well as usage and versionCorinna Vinschen2011-10-101-34/+23
| | | | | | | | | option handling to use the same style throughout all Cygwin utils. Throughout use program_invocation_short_name to refer to current process name in Cygwin executables. * utils.sgml: Align documentation to above change. Add missing sections for getconf, ldd, and setmetamode. * strace.cc (proc_child): Avoid compiler warning.
* * ps.cc (main): Don't overwrite process name, just attach <defunct>Corinna Vinschen2011-08-101-5/+5
| | | | to it for zombie processes.
* * ps.cc (ttynam): Accommodate new console numbering.Christopher Faylor2011-05-291-8/+11
| | | | (main): Ditto.
* * loadlib.h: New header implementing safe LoadLibrary calls.Corinna Vinschen2010-08-281-1/+2
| | | | | | | | | | | | Include throughout files using LoadLibrary function. * cygcheck.cc (dump_sysinfo): Retrieve kernel32.dll handle via GetModuleHandle, rather than using LoadLibrary. * cygpath.cc (get_long_name): Ditto. (do_sysfolders): Append .dll suffix in LoadLibrary call. * ldh.cc (WinMain): Use LoadLibraryExW with DONT_RESOLVE_DLL_REFERENCES to avoid loading malicious library code. * locale.cc (print_locale_with_codeset): Change way to retrieve kernel32.dll path.
* * ps.cc (main): Return 0 if pid found.Christopher Faylor2009-12-181-2/+5
|
* * Makefile.in: Link ps.exe agains ntdll.dll.Corinna Vinschen2009-05-111-2/+74
| | | | | | | * ps.cc (main): Enable SE_DEBUG_NAME privilege if Windows processes have to be enumerated. Workaround EnumProcessModules problem when running under WOW64 and use NtQueryInformationProcess to fetch process image name.
* * cygcheck.cc (pathlike::check_existence): Remove class name from declaration.Christopher Faylor2008-09-121-8/+9
| | | | | | | | | | | | | | | | | | | | | (display_internet_error): Use proper format specifier for DWORD. (environ): Remove unneeded declaration. (main): Use brace around nested if to avoid an overly-helpful compiler warning. * dump_setup.cc (parse_filename): Reorganize nested if to avoid an overly-helpful compiler warning. * path.cc (GUID_shortcut): Use braces around part of initializer which needs them. (conv_fstab_spaces): Parenthesize assignment in while loop to avoid a compiler warning. (struct opt): Make static. * ps.cc (main): Reorganize nested if to avoid an overly-helpful compiler warning. * regtool.cc: Make some anonymous structs static to avoid a compiler warning. * ssp.c (lookup_thread_id): Initialize *tix to zero to avoid potential uninitialized use. * strace.cc (add_child): Use proper format specifier for DWORD. (remove_child): Ditto. (proc_child): Ditto.
* * Makefile.in (cygcheck.exe): Link against ntdll.Corinna Vinschen2008-07-221-1/+2
| | | | | | | | | | | | | | | | | | | | * bloda.cc: Use statically linked functions throughout. * cygpath.cc: Drop 9x considerations. * mkgroup.c: Revamp. Redefine -l and -d options to take optional machine and domain parameters. Redefine -c to work always, using token information. Add -L, -D, -C to create unique groupnames in domain\group syntax. Add -S option to define domain\group separator char. Ignore -u and -s options. * mkpasswd.c: Revamp. Redefine -l and -d options to take optional machine and domain parameters. Redefine -c to work always, using token information. Add -L, -D, -C to create unique usernames in domain\user syntax. Add -S option to define domain\user separator char. Ignore -g and -s options. Prefer to take homedir from $HOME over $HOMEDRIVE/$HOMEPATH. * path.cc (oopts): Add "acl", "noacl", "posix=0" and "posix=1" options. (getmntent): Accomodate throughout. * ps.cc: Fix copyright dates. * utils.sgml: Fix text for mkgroup and mkpasswd.
* * cygpath.cc (do_sysfolders): Use cygwin_conv_path.Corinna Vinschen2008-03-121-3/+11
| | | | | | | | | | | | (do_pathconv): Use cygwin_conv_path and cygwin_conv_path_list. * dumper.cc (main): Use cygwin_conv_path. Allocate target path dynamically. * mkpasswd.c (current_user): Use cygwin_conv_path. (enum_users): Ditto. * ps.cc (NT_MAX_PATH): Define. (main): Use cygwin_conv_path. * regtool.cc (find_key): Ditto. Allocate target path dynamically. (cmd_save): Ditto.
* * ps.cc: Include limits.h.Corinna Vinschen2007-12-061-3/+7
| | | | | | (main): Set file name buffer size to PATH_MAX. Use progname or progname_long member of struct external_pinfo dependent of the value of the struct's version member.
* * ps.cc (main): Set aflag if -p option is given.Corinna Vinschen2006-02-171-0/+1
|
* * ps.cc (longopts): Add --process option.Corinna Vinschen2006-02-161-3/+12
| | | | | | | (opts): Add -p option. (usage): Mention -p/--process option. (main): Handle -p option. * utils.sgml: Describe -p/--process option.
* * ps.cc (main): Eliminate use of PID_ZOMBIE.Christopher Faylor2005-01-161-1/+1
| | | | | | | * strace.cc (main): Recognize new option for displaying hex value of strace type. (handle_output_debug_string): Prepend output with hex value of strace message if -H is specified.
* fix whitespace, update some copyrightsChristopher Faylor2004-10-251-48/+48
|
* * cygcheck.cc (usage) Add description output.Joshua Daniel Franklin2003-04-261-0/+2
|
* Add final newlines to utilsJoshua Daniel Franklin2002-09-151-1/+2
|
* * ps.cc (main): Use uid or uid32 member of struct external_pinfoCorinna Vinschen2002-05-291-7/+20
| | | | dependent of the value of the struct's version member.
* * ps.cc (main): Change print format for uid to unsigned. Use uid32Corinna Vinschen2002-05-291-5/+5
| | | | member of struct external_pinfo instead of uid.
* * ps.cc (usage): Fix typo.Corinna Vinschen2002-05-281-1/+2
|
* * ps.cc (prog_name): New global variable.Christopher Faylor2002-05-281-11/+77
| | | | | | | | (longopts): Ditto. (opts): Ditto. (usage): New function. (print_version): New function. (main): Accomodate longopts and new --help, --version options.
* * Makefile.in: Add define to CXXFLAGS.Christopher Faylor2001-12-111-1/+1
|
* * passwd.cc (ttymnam): New function.Christopher Faylor2001-04-291-7/+19
| | | | (main): Use ttynam() to report name of tty.
* * ps.cc (main): Add some extra space to Windows pid output for Windows 95.Christopher Faylor2000-10-181-2/+2
|
* * ps.cc (main): Add some extra space to pid output for Windows 95.Christopher Faylor2000-10-181-6/+6
|
* * ps.cc (main): Accomodate new PID_ constant.Christopher Faylor2000-10-151-3/+1
|
* * ps.cc (main): Change order of reporting slightly so that windows pids areChristopher Faylor2000-10-091-3/+3
| | | | | | | | more obvious. * strace.cc (add_child): Just add child's pid directly. (remove_child): No need to close the child process pid since ContinueDebugEvent does that automatically. (proc_child): Ditto for child thread.
* * ps.cc (main): Always print a cygwin process using cygwin paths.Christopher Faylor2000-08-251-2/+2
|
* * Makefile.in: Add dumper.exe target and associated mechanisms for building it.Christopher Faylor2000-08-241-1/+2
| | | | | | | * dumper.cc: New file. * dumper.h: New file. * module_info.cc: New file. * parse_pe.cc: New file.
* * kill.cc (main): Add '-f' option to force termination of a process.Christopher Faylor2000-07-291-16/+181
| | | | | | | | | (forcekill): New function. * ps.cc (main): Add '-W' option to list Windows pids as well as Cygwin pids. (dummyprocessmodules): New function. (GetModuleFileNameEx95): New function. (init_win): New function. (to_time_t): New function.
* * Makefile.in: Eliminate WINSUP_DEPS.Christopher Faylor2000-05-181-2/+1
| | | | | | | | | * cygpath.cc: Reorganize includes to accomodate sys/cygwin.h changes. * mkgroup.c: Ditto. * mkpasswd.c: Ditto. * mount.cc: Ditto. Eliminate use of cygwin source specific includes. * ps.cc: Ditto. * cygwin.cc: Eliminate obsolete file.
* import winsup-2000-02-17 snapshotChristopher Faylor2000-02-171-0/+150